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
LinearViscoelasticityBase Class Referenceabstract

This class is a base class for materials consisting of an assembly of linear springs and dashpots. More...

#include <LinearViscoelasticityBase.h>

Inheritance diagram for LinearViscoelasticityBase:
[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

 LinearViscoelasticityBase (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 initQpStatefulProperties () override
 
virtual void computeQpElasticityTensor () final
 Inherited from ComputeElasticityTensorBase.
 
virtual void computeQpViscoelasticProperties ()=0
 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 ()=0
 This method computes the apparent elasticity tensor used in the internal time-stepping scheme.
 
virtual void computeQpApparentCreepStrain ()=0
 This method computes the apparent creep strain corresponding to the current viscous_strain of each dashpot.
 
virtual void updateQpViscousStrains ()=0
 Update the internal viscous strains at a quadrature point.
 
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

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 a base class for materials consisting of an assembly of linear springs and dashpots.

It represents the arrangement of the system (typically, in parallel or in series), the mechanical * properties of each individual spring and dashpot in the model, and the internal strains associated with each dashpot.

To use a linear viscoelastic model, the user must provide a LinearViscoelasticityManager, that will initialize and update the internal time-stepping scheme at the beginning and the end of each time step.

To compute the stress associated with a linear viscoelastic model, the user must either use a ComputeLinearViscoelasticStress material (for total small strain formulations), or a ComputeMultipleInelasticStress material associated with a LinearViscoelasticStressUpdate material if there are multiple sources of inelastic strains (this requires to use incremental strains).

The rate-dependent problem is solved using an internal 1-step finite difference scheme. The scheme itself depends only on the arrangement of the system, and not the individual properties. The scheme acts upon a series of internal strain variables, stored in the _viscous_strains material properties. At the start of each time step, the apparent elastic properties of the assembly and the apparent creep strain are calculated. The rate-dependent problem becomes then equivalent to a purely elastic system. At the end of the time step, the internal strain variables are updated according to the current values of the stress and the strain.

The real system refers to stress = elasticity_tensor : (mechanical_strain - creep_strain)

The internal time-stepping scheme uses the following conversion: stress = apparent_elasticity_tensor : (mechanical_strain - apparent_creep_strain)

The creep strain is generally driven only by the mechanical stress, but it can be driven by an eigenstrain in addition to the stress. This means that the creep strain is calculated as if the eigenstrain were to contribute to the global mechanical stress of the system.

The determination of the apparent properties, as well as the update of the internal strain variables depend only on the arrangement of the system (in parralel or series), and not their actual properties. These calculations are generally only performed at the beginning of the time step, but the user (or derived classes) can enforce these to be performed at each step of the nonlinear solver if necessary.

The time-integration uses a 1-step Newmark finite difference scheme. This scheme is controlled by a parameter theta (between 0 and 1, default-value 1). Theta can be automatically calibrated depending on the value of the dashpot viscosities in order to reproduce the exact integral of exponential series (integration_rule = "zienkiewicz"). Theta cannot be set to 0 (purely explicit system), and setting theta < 0.5 may cause the scheme to diverge (the "backward_euler" "mid_point" and "zienkiewicz" schemes are unconditionally stable).

This class is virtual. Deriving this class must be done in two steps.

  1. Classes inheriting directly from LinearViscoelasticityBase must represent a distinct spring-dashpot architecture (examples in GeneralizedKelvinVoigtBase and GeneralizedMaxwellBase), and must inherit only methods related to the time-stepping scheme itself.
  2. Classes inheriting inderectly from LinearViscoelasticityBase must provide the actual properties of each spring and dashpot in the assembly (examples in GeneralizedKelvinVoigtModel and GeneralizedMaxwellModel). These classes must not override methods related to the time-stepping scheme.

This class does not store the true creep strain of the material, but an equivalent creep strain adapted for numerical efficiency. The true creep strain itself is declared by ComputeLinearViscoelasticStress or LinearViscoelasticStressUpdate.

Definition at line 76 of file LinearViscoelasticityBase.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 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

◆ LinearViscoelasticityBase()

LinearViscoelasticityBase::LinearViscoelasticityBase ( const InputParameters parameters)

Definition at line 48 of file LinearViscoelasticityBase.C.

49 : ComputeElasticityTensorBase(parameters),
50 _integration_rule(getParam<MooseEnum>("integration_rule").getEnum<IntegrationRule>()),
51 _theta(getParam<Real>("theta")),
53 declareProperty<RankFourTensor>(_base_name + "apparent_elasticity_tensor")),
55 declareProperty<RankFourTensor>(_base_name + "apparent_elasticity_tensor_inv")),
56 _elasticity_tensor_inv(declareProperty<RankFourTensor>(_elasticity_tensor_name + "_inv")),
57 _need_viscoelastic_properties_inverse(getParam<bool>("need_viscoelastic_properties_inverse")),
59 _components(0),
61 declareProperty<RankFourTensor>(_base_name + "spring_elasticity_tensor_0")),
64 ? &declareProperty<RankFourTensor>(_base_name + "spring_elasticity_tensor_0_inv")
65 : nullptr),
68 _apparent_creep_strain(declareProperty<RankTwoTensor>(_base_name + "apparent_creep_strain")),
70 getMaterialPropertyOld<RankTwoTensor>(_base_name + "apparent_creep_strain")),
72 getMaterialPropertyOld<RankTwoTensor>(getParam<std::string>("elastic_strain_name"))),
74 getMaterialPropertyOld<RankTwoTensor>(getParam<std::string>("creep_strain_name"))),
75 _has_driving_eigenstrain(isParamValid("driving_eigenstrain")),
77 _has_driving_eigenstrain ? getParam<std::string>("driving_eigenstrain") : ""),
79 ? &getMaterialPropertyByName<RankTwoTensor>(_driving_eigenstrain_name)
80 : nullptr),
82 ? &getMaterialPropertyOld<RankTwoTensor>(_driving_eigenstrain_name)
83 : nullptr),
84 _force_recompute_properties(getParam<bool>("force_recompute_properties")),
85 _step_zero(declareRestartableData<bool>("step_zero", true))
86{
87 if (_theta < 0.5)
88 mooseWarning("theta parameter for LinearViscoelasticityBase is below 0.5; time integration may "
89 "not converge!");
90
91 // force material properties to be considered stateful
92 getMaterialPropertyOld<RankFourTensor>(_base_name + "apparent_elasticity_tensor");
93 getMaterialPropertyOld<RankFourTensor>(_base_name + "apparent_elasticity_tensor_inv");
94 getMaterialPropertyOld<RankFourTensor>(_elasticity_tensor_name);
95 getMaterialPropertyOld<RankFourTensor>(_elasticity_tensor_name + "_inv");
96 getMaterialPropertyOld<RankFourTensor>(_base_name + "spring_elasticity_tensor_0");
98 getMaterialPropertyOld<RankFourTensor>(_base_name + "spring_elasticity_tensor_0_inv");
99}
ComputeElasticityTensorBaseTempl< false > ComputeElasticityTensorBase
void mooseWarning(Args &&... args)
const std::string _base_name
Base name of the material system.
std::string _driving_eigenstrain_name
Name of the eigenstrain that drives the additional creep strain.
bool _has_driving_eigenstrain
Indicates if the model is only driven by the stress, or also by an additional eigenstrain.
Real _theta
User-defined value for theta.
const MaterialProperty< RankTwoTensor > *const _driving_eigenstrain_old
const MaterialProperty< RankTwoTensor > & _creep_strain_old
Previous value of the true creep strain for update purposes.
MaterialProperty< RankFourTensor > & _apparent_elasticity_tensor
Apparent elasticity tensor. This is NOT the elasticity tensor of the material.
MaterialProperty< RankTwoTensor > & _apparent_creep_strain
The apparent creep strain resulting from the internal viscous strains.
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()
const MaterialProperty< RankTwoTensor > & _apparent_creep_strain_old
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.
bool _force_recompute_properties
If activated, the time-stepping scheme will be re-initialized at each step of the solver.
const MaterialProperty< RankTwoTensor > & _elastic_strain_old
previous value of the elastic strain for update purposes
unsigned int _components
This is the number of internal variables required by the model.
bool & _step_zero
checks whether we are at the first time step
MaterialProperty< RankFourTensor > & _elasticity_tensor_inv
Instantaneous elasticity tensor. This IS the real elasticity tensor of the material.
IntegrationRule _integration_rule
Determines how theta is computed.
MaterialProperty< RankFourTensor > & _first_elasticity_tensor
Elasticity tensor of a stand-alone elastic spring in the chain.
MaterialProperty< RankFourTensor > * _first_elasticity_tensor_inv
MaterialProperty< RankFourTensor > * _longterm_elasticity_tensor
Elasticity tensor corresponding to the long-term dashpot.
MaterialProperty< RankFourTensor > * _longterm_elasticity_tensor_inv

Member Function Documentation

◆ computeQpApparentCreepStrain()

virtual void LinearViscoelasticityBase::computeQpApparentCreepStrain ( )
protectedpure virtual

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.

Implemented in GeneralizedKelvinVoigtBase, and GeneralizedMaxwellBase.

Referenced by recomputeQpApparentProperties().

◆ computeQpApparentElasticityTensors()

virtual void LinearViscoelasticityBase::computeQpApparentElasticityTensors ( )
protectedpure virtual

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.

Implemented in GeneralizedKelvinVoigtBase, and GeneralizedMaxwellBase.

Referenced by recomputeQpApparentProperties().

◆ computeQpElasticityTensor()

void LinearViscoelasticityBase::computeQpElasticityTensor ( )
finalprotectedvirtual

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.

◆ computeQpProperties()

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

◆ computeQpViscoelasticProperties()

virtual void LinearViscoelasticityBase::computeQpViscoelasticProperties ( )
protectedpure virtual

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.

Implemented in GeneralizedKelvinVoigtModel, and GeneralizedMaxwellModel.

Referenced by recomputeQpApparentProperties().

◆ computeQpViscoelasticPropertiesInv()

void LinearViscoelasticityBase::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 in GeneralizedKelvinVoigtModel, and GeneralizedMaxwellModel.

Definition at line 213 of file LinearViscoelasticityBase.C.

214{
215 mooseAssert(_first_elasticity_tensor_inv, "_first_elasticity_tensor_inv is null");
216 if (MooseUtils::absoluteFuzzyEqual(_first_elasticity_tensor[_qp].L2norm(), 0.0))
217 (*_first_elasticity_tensor_inv)[_qp].zero();
218 else
220
221 for (unsigned int i = 0; i < _springs_elasticity_tensors.size(); ++i)
222 {
223 mooseAssert(_springs_elasticity_tensors_inv[i], "_springs_elasticity_tensors_inv[i] is null");
224 if (MooseUtils::absoluteFuzzyEqual((*_springs_elasticity_tensors[i])[_qp].L2norm(), 0.0))
226 else
227 (*_springs_elasticity_tensors_inv[i])[_qp] = (*_springs_elasticity_tensors[i])[_qp].invSymm();
228 }
229
231 {
232 mooseAssert(_longterm_elasticity_tensor_inv, "_longterm_elasticity_tensor_inv is null");
233 if (MooseUtils::absoluteFuzzyEqual((*_longterm_elasticity_tensor)[_qp].L2norm(), 0.0))
234 (*_longterm_elasticity_tensor_inv)[_qp].zero();
235 else
236 (*_longterm_elasticity_tensor_inv)[_qp] = (*_longterm_elasticity_tensor)[_qp].invSymm();
237 }
238}
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
T L2norm(const RankTwoTensorTempl< T > &r2tensor)
const Number zero

Referenced by recomputeQpApparentProperties().

◆ computeTheta()

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

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}
void mooseError(Args &&... args)

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

◆ declareViscoelasticProperties()

void LinearViscoelasticityBase::declareViscoelasticProperties ( )
protectedvirtual

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}
std::vector< MaterialProperty< RankTwoTensor > * > _viscous_strains
std::vector< MaterialProperty< Real > * > _dashpot_viscosities
List of viscosities of each subsequent dashpot in the chain.
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
std::string stringify(const T &t)

Referenced by GeneralizedKelvinVoigtBase::declareViscoelasticProperties(), and GeneralizedMaxwellModel::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 ( )
overrideprotectedvirtual

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}

◆ issueGuarantee()

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

◆ recomputeQpApparentProperties()

void LinearViscoelasticityBase::recomputeQpApparentProperties ( unsigned int  qp)

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.
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 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()

virtual void LinearViscoelasticityBase::updateQpViscousStrains ( )
protectedpure virtual

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.

Implemented in GeneralizedKelvinVoigtBase, and GeneralizedMaxwellBase.

Referenced by recomputeQpApparentProperties().

◆ validParams()

InputParameters LinearViscoelasticityBase::validParams ( )
static

Definition at line 14 of file LinearViscoelasticityBase.C.

15{
16 MooseEnum integration("backward-euler mid-point newmark zienkiewicz", "backward-euler");
17
19 params.addParam<MooseEnum>("integration_rule",
20 integration,
21 "describes how the viscoelastic behavior is integrated through time");
22 params.addRangeCheckedParam<Real>("theta",
23 1,
24 "theta > 0 & theta <= 1",
25 "coefficient for Newmark integration rule (between 0 and 1)");
26 params.addParam<std::string>("driving_eigenstrain",
27 "name of the eigenstrain that increases the creep strains");
28 params.addParam<std::string>(
29 "elastic_strain_name", "elastic_strain", "name of the true elastic strain of the material");
30 params.addParam<std::string>("creep_strain_name",
31 "creep_strain",
32 "name of the true creep strain of the material"
33 "(computed by LinearViscoelasticStressUpdate or"
34 "ComputeLinearViscoelasticStress)");
35 params.addParam<bool>("force_recompute_properties",
36 false,
37 "forces the computation of the viscoelastic properties at each step of"
38 "the solver (default: false)");
39 params.addParam<bool>(
40 "need_viscoelastic_properties_inverse",
41 false,
42 "checks whether the model requires the computation of the inverse viscoelastic"
43 "properties (default: false)");
44 params.suppressParameter<FunctionName>("elasticity_tensor_prefactor");
45 return params;
46}
static InputParameters validParams()
void suppressParameter(const std::string &name)
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
void addRangeCheckedParam(const std::string &name, const T &value, const std::string &parsed_function, const std::string &doc_string)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real

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

Member Data Documentation

◆ _apparent_creep_strain

MaterialProperty<RankTwoTensor>& LinearViscoelasticityBase::_apparent_creep_strain
protected

The apparent creep strain resulting from the internal viscous strains.

Definition at line 241 of file LinearViscoelasticityBase.h.

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

◆ _apparent_creep_strain_old

const MaterialProperty<RankTwoTensor>& LinearViscoelasticityBase::_apparent_creep_strain_old
protected

Definition at line 242 of file LinearViscoelasticityBase.h.

◆ _apparent_elasticity_tensor

MaterialProperty<RankFourTensor>& LinearViscoelasticityBase::_apparent_elasticity_tensor
protected

Apparent elasticity tensor. This is NOT the elasticity tensor of the material.

Definition at line 192 of file LinearViscoelasticityBase.h.

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

◆ _apparent_elasticity_tensor_inv

MaterialProperty<RankFourTensor>& LinearViscoelasticityBase::_apparent_elasticity_tensor_inv
protected

◆ _base_name

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

◆ _components

unsigned int LinearViscoelasticityBase::_components
protected

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 declareViscoelasticProperties(), GeneralizedKelvinVoigtModel::GeneralizedKelvinVoigtModel(), GeneralizedMaxwellModel::GeneralizedMaxwellModel(), and initQpStatefulProperties().

◆ _creep_strain_old

const MaterialProperty<RankTwoTensor>& LinearViscoelasticityBase::_creep_strain_old
protected

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
protected

◆ _dashpot_viscosities_old

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

◆ _driving_eigenstrain

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

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
protected

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
protected

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
protected

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
protected

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 initQpStatefulProperties().

◆ _elasticity_tensor_name

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

◆ _first_elasticity_tensor

MaterialProperty<RankFourTensor>& LinearViscoelasticityBase::_first_elasticity_tensor
protected

◆ _first_elasticity_tensor_inv

MaterialProperty<RankFourTensor>* LinearViscoelasticityBase::_first_elasticity_tensor_inv
protected

◆ _force_recompute_properties

bool LinearViscoelasticityBase::_force_recompute_properties
protected

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 computeQpElasticityTensor().

◆ _guarantees

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

◆ _has_driving_eigenstrain

bool LinearViscoelasticityBase::_has_driving_eigenstrain
protected

◆ _has_longterm_dashpot

bool LinearViscoelasticityBase::_has_longterm_dashpot
protected

◆ _integration_rule

IntegrationRule LinearViscoelasticityBase::_integration_rule
protected

Determines how theta is computed.

Definition at line 187 of file LinearViscoelasticityBase.h.

Referenced by computeTheta().

◆ _longterm_elasticity_tensor

MaterialProperty<RankFourTensor>* LinearViscoelasticityBase::_longterm_elasticity_tensor
protected

Elasticity tensor corresponding to the long-term dashpot.

Definition at line 228 of file LinearViscoelasticityBase.h.

Referenced by computeQpViscoelasticPropertiesInv(), declareViscoelasticProperties(), and initQpStatefulProperties().

◆ _longterm_elasticity_tensor_inv

MaterialProperty<RankFourTensor>* LinearViscoelasticityBase::_longterm_elasticity_tensor_inv
protected

◆ _need_viscoelastic_properties_inverse

bool LinearViscoelasticityBase::_need_viscoelastic_properties_inverse
protected

◆ _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().

◆ _springs_elasticity_tensors

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

◆ _springs_elasticity_tensors_inv

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

◆ _springs_elasticity_tensors_inv_old

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

◆ _step_zero

bool& LinearViscoelasticityBase::_step_zero
protected

checks whether we are at the first time step

Definition at line 271 of file LinearViscoelasticityBase.h.

Referenced by recomputeQpApparentProperties().

◆ _theta

Real LinearViscoelasticityBase::_theta
protected

User-defined value for theta.

Definition at line 189 of file LinearViscoelasticityBase.h.

Referenced by computeTheta(), and LinearViscoelasticityBase().

◆ _viscous_strains

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

◆ _viscous_strains_old

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

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