Go to the documentation of this file.
11 #include "Conversion.h"
18 MooseEnum integration(
"backward-euler mid-point newmark zienkiewicz",
"backward-euler");
21 params.addParam<MooseEnum>(
"integration_rule",
23 "describes how the viscoelastic behavior is integrated through time");
24 params.addRangeCheckedParam<Real>(
"theta",
26 "theta > 0 & theta <= 1",
27 "coefficient for Newmark integration rule (between 0 and 1)");
28 params.addParam<std::string>(
"driving_eigenstrain",
29 "name of the eigenstrain that increases the creep strains");
30 params.addParam<std::string>(
31 "elastic_strain_name",
"elastic_strain",
"name of the true elastic strain of the material");
32 params.addParam<std::string>(
"creep_strain_name",
34 "name of the true creep strain of the material"
35 "(computed by LinearViscoelasticStressUpdate or"
36 "ComputeLinearViscoelasticStress)");
37 params.addParam<
bool>(
"force_recompute_properties",
39 "forces the computation of the viscoelastic properties at each step of"
40 "the solver (default: false)");
41 params.addParam<
bool>(
42 "need_viscoelastic_properties_inverse",
44 "checks whether the model requires the computation of the inverse viscoelastic"
45 "properties (default: false)");
46 params.suppressParameter<FunctionName>(
"elasticity_tensor_prefactor");
52 _integration_rule(getParam<MooseEnum>(
"integration_rule").getEnum<
IntegrationRule>()),
53 _theta(getParam<Real>(
"theta")),
54 _apparent_elasticity_tensor(
55 declareProperty<
RankFourTensor>(_base_name +
"apparent_elasticity_tensor")),
56 _apparent_elasticity_tensor_inv(
57 declareProperty<
RankFourTensor>(_base_name +
"apparent_elasticity_tensor_inv")),
58 _elasticity_tensor_inv(declareProperty<
RankFourTensor>(_elasticity_tensor_name +
"_inv")),
59 _need_viscoelastic_properties_inverse(getParam<bool>(
"need_viscoelastic_properties_inverse")),
60 _has_longterm_dashpot(false),
62 _first_elasticity_tensor(
63 declareProperty<
RankFourTensor>(_base_name +
"spring_elasticity_tensor_0")),
64 _first_elasticity_tensor_inv(
65 _need_viscoelastic_properties_inverse
66 ? &declareProperty<
RankFourTensor>(_base_name +
"spring_elasticity_tensor_0_inv")
68 _apparent_creep_strain(declareProperty<
RankTwoTensor>(_base_name +
"apparent_creep_strain")),
69 _apparent_creep_strain_old(
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")),
76 _driving_eigenstrain_name(
77 _has_driving_eigenstrain ? getParam<std::string>(
"driving_eigenstrain") :
""),
78 _driving_eigenstrain(_has_driving_eigenstrain
79 ? &getMaterialPropertyByName<
RankTwoTensor>(_driving_eigenstrain_name)
81 _driving_eigenstrain_old(_has_driving_eigenstrain
82 ? &getMaterialPropertyOld<
RankTwoTensor>(_driving_eigenstrain_name)
84 _force_recompute_properties(getParam<bool>(
"force_recompute_properties")),
85 _step_zero(declareRestartableData<bool>(
"step_zero", true))
88 mooseWarning(
"theta parameter for LinearViscoelasticityBase is below 0.5; time integration may "
92 getMaterialPropertyOld<RankFourTensor>(
_base_name +
"apparent_elasticity_tensor");
93 getMaterialPropertyOld<RankFourTensor>(
_base_name +
"apparent_elasticity_tensor_inv");
96 getMaterialPropertyOld<RankFourTensor>(
_base_name +
"spring_elasticity_tensor_0");
98 getMaterialPropertyOld<RankFourTensor>(
_base_name +
"spring_elasticity_tensor_0_inv");
106 std::string ith = Moose::stringify(i + 1);
111 &declareProperty<RankFourTensor>(
_base_name +
"spring_elasticity_tensor_" + ith));
112 getMaterialPropertyOld<RankFourTensor>(
_base_name +
"spring_elasticity_tensor_" + ith);
117 &getMaterialPropertyOld<Real>(
_base_name +
"dashpot_viscosity_" + ith));
120 &declareProperty<RankTwoTensor>(
_base_name +
"viscous_strain_" + ith));
122 &getMaterialPropertyOld<RankTwoTensor>(
_base_name +
"viscous_strain_" + ith));
127 _base_name +
"spring_elasticity_tensor_" + ith +
"_inv"));
129 _base_name +
"spring_elasticity_tensor_" + ith +
"_inv"));
139 "inconsistent numbers of dashpots and viscous strains in LinearViscoelasticityBase;"
140 " Make sure declareViscoelasticProperties has been called in the viscoelastic model");
148 (*_first_elasticity_tensor_inv)[_qp].zero();
167 unsigned int qp_prev = _qp;
202 (*_first_elasticity_tensor_inv)[_qp].zero();
218 if (MooseUtils::absoluteFuzzyEqual(dt, 0.0))
219 mooseError(
"linear viscoelasticity cannot be integrated over a dt of ", dt);
230 return 1. / (1. - std::exp(-dt / viscosity)) - viscosity / dt;
MaterialProperty< RankFourTensor > & _first_elasticity_tensor
Elasticity tensor of a stand-alone elastic spring in the chain.
MaterialProperty< RankFourTensor > * _first_elasticity_tensor_inv
virtual void computeQpElasticityTensor() final
Inherited from ComputeElasticityTensorBase.
MaterialProperty< RankTwoTensor > & _apparent_creep_strain
The apparent creep strain resulting from the internal viscous strains.
MaterialProperty< RankFourTensor > & _apparent_elasticity_tensor
Apparent elasticity tensor. This is NOT the elasticity tensor of the material.
IntegrationRule _integration_rule
Determines how theta is computed.
std::vector< MaterialProperty< RankFourTensor > * > _springs_elasticity_tensors_inv
std::vector< MaterialProperty< Real > * > _dashpot_viscosities
List of viscosities of each subsequent dashpot in the chain.
void declareViscoelasticProperties()
Declare all necessary MaterialProperties for the model.
std::vector< const MaterialProperty< Real > * > _dashpot_viscosities_old
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...
void recomputeQpApparentProperties(unsigned int qp)
Compute the apparent properties at a quadrature point.
Real computeTheta(Real dt, Real viscosity) const
Provides theta as a function of the time step and a viscosity.
static InputParameters validParams()
ComputeElasticityTensorBase the base class for computing elasticity tensors.
bool _has_longterm_dashpot
Indicates if the spring-dashpot assembly has a single dashpot not associated with a spring.
Real _theta
User-defined value for theta.
std::vector< MaterialProperty< RankTwoTensor > * > _viscous_strains
MaterialProperty< RankFourTensor > & _apparent_elasticity_tensor_inv
Inverse of the apparent elasticity tensor.
std::vector< const MaterialProperty< RankFourTensor > * > _springs_elasticity_tensors_inv_old
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.
std::vector< const MaterialProperty< RankTwoTensor > * > _viscous_strains_old
virtual void initQpStatefulProperties() override
static InputParameters validParams()
std::string _elasticity_tensor_name
theta defined by the user
bool _force_recompute_properties
If activated, the time-stepping scheme will be re-initialized at each step of the solver.
LinearViscoelasticityBase(const InputParameters ¶meters)
MaterialProperty< RankFourTensor > & _elasticity_tensor_inv
Instantaneous elasticity tensor. This IS the real elasticity tensor of the material.
defineLegacyParams(LinearViscoelasticityBase)
const std::string _base_name
bool & _step_zero
checks whether we are at the first time step
std::vector< MaterialProperty< RankFourTensor > * > _springs_elasticity_tensors
List of elasticity tensor of each subsequent spring in the chain.
theta automatically adjusted as a function of the time step and the viscosity
IntegrationRule
Determines how theta is calculated for the time-integration system.
unsigned int _components
This is the number of internal variables required by the model.
This class is a base class for materials consisting of an assembly of linear springs and dashpots.