www.mooseframework.org
GeneralizedKelvinVoigtModel.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
11 
13 
15 
16 InputParameters
18 {
19  InputParameters params = GeneralizedKelvinVoigtBase::validParams();
20  params.addClassDescription(
21  "Generalized Kelvin-Voigt model composed of a serial assembly of unit Kelvin-Voigt modules");
22  params.addRequiredParam<Real>("young_modulus", "initial elastic modulus of the material");
23  params.addRequiredParam<Real>("poisson_ratio", "initial poisson ratio of the material");
24  params.addRequiredParam<std::vector<Real>>(
25  "creep_modulus", "list of the elastic moduli of the different springs in the material");
26  params.addRequiredParam<std::vector<Real>>(
27  "creep_viscosity",
28  "list of the characteristic times of the different dashpots in the material");
29  params.addParam<std::vector<Real>>(
30  "creep_ratio", "list of the poisson ratios of the different springs in the material");
31  params.set<bool>("force_recompute_properties") = false;
32  params.suppressParameter<bool>("force_recompute_properties");
33  return params;
34 }
35 
37  : GeneralizedKelvinVoigtBase(parameters),
38  _Ci(getParam<std::vector<Real>>("creep_modulus").size()),
39  _eta_i(getParam<std::vector<Real>>("creep_viscosity")),
40  _Si(getParam<std::vector<Real>>("creep_modulus").size())
41 {
42  Real young_modulus = getParam<Real>("young_modulus");
43  Real poisson_ratio = getParam<Real>("poisson_ratio");
44 
45  _C0.fillFromInputVector({young_modulus, poisson_ratio}, RankFourTensor::symmetric_isotropic_E_nu);
46  _S0 = _C0.invSymm();
47 
48  std::vector<Real> creep_modulus = getParam<std::vector<Real>>("creep_modulus");
49  std::vector<Real> creep_ratio;
50  if (isParamValid("creep_ratio"))
51  creep_ratio = getParam<std::vector<Real>>("creep_ratio");
52  else
53  creep_ratio.resize(_Ci.size(), poisson_ratio);
54 
55  if (creep_modulus.size() != _Ci.size())
56  mooseError("incompatible number of creep moduli and viscosities");
57  if (creep_ratio.size() != _Ci.size())
58  mooseError("incompatible number of creep ratios and viscosities");
59  if (!(_Ci.size() == _eta_i.size() || _Ci.size() + 1 == _eta_i.size()))
60  mooseError("incompatible number of creep ratios and viscosities");
61 
62  for (unsigned int i = 0; i < _Ci.size(); ++i)
63  {
64  _Ci[i].fillFromInputVector({creep_modulus[i], creep_ratio[i]},
65  RankFourTensor::symmetric_isotropic_E_nu);
66  _Si[i] = _Ci[i].invSymm();
67  }
68 
69  for (unsigned int i = 0; i < _eta_i.size(); ++i)
70  {
71  if (_eta_i[i] < 0 || MooseUtils::absoluteFuzzyEqual(_eta_i[i], 0.0))
72  mooseError("material viscosity must be strictly > 0");
73  }
74 
75  _components = _eta_i.size();
76  _has_longterm_dashpot = (_eta_i.size() == _Ci.size() + 1);
77 
80 }
81 
82 void
84 {
86 
87  for (unsigned int i = 0; i < _Ci.size(); ++i)
88  (*_springs_elasticity_tensors[i])[_qp] = _Ci[i];
89 
90  for (unsigned int i = 0; i < _eta_i.size(); ++i)
91  (*_dashpot_viscosities[i])[_qp] = _eta_i[i];
92 }
93 
94 void
96 {
97  (*_first_elasticity_tensor_inv)[_qp] = _S0;
98 
99  for (unsigned int i = 0; i < _Si.size(); ++i)
100  (*_springs_elasticity_tensors_inv[i])[_qp] = _Si[i];
101 }
LinearViscoelasticityBase::_first_elasticity_tensor
MaterialProperty< RankFourTensor > & _first_elasticity_tensor
Elasticity tensor of a stand-alone elastic spring in the chain.
Definition: LinearViscoelasticityBase.h:217
GeneralizedKelvinVoigtModel::_C0
RankFourTensor _C0
The elasticity tensor associated with the first spring.
Definition: GeneralizedKelvinVoigtModel.h:40
GeneralizedKelvinVoigtModel
This class is an implementation of a generalized Kelvin-Voigt model with constant mechanical properti...
Definition: GeneralizedKelvinVoigtModel.h:25
GeneralizedKelvinVoigtModel::_Si
std::vector< RankFourTensor > _Si
The inverse of each subsequent spring elasticity tensor.
Definition: GeneralizedKelvinVoigtModel.h:49
LinearViscoelasticityBase::_springs_elasticity_tensors_inv
std::vector< MaterialProperty< RankFourTensor > * > _springs_elasticity_tensors_inv
Definition: LinearViscoelasticityBase.h:223
LinearViscoelasticityBase::_dashpot_viscosities
std::vector< MaterialProperty< Real > * > _dashpot_viscosities
List of viscosities of each subsequent dashpot in the chain.
Definition: LinearViscoelasticityBase.h:228
GeneralizedKelvinVoigtBase
This class represents an assembly of springs and dashpots following a generalized Kelvin-Voigt model ...
Definition: GeneralizedKelvinVoigtBase.h:35
LinearViscoelasticityBase::declareViscoelasticProperties
void declareViscoelasticProperties()
Declare all necessary MaterialProperties for the model.
Definition: LinearViscoelasticityBase.C:102
registerMooseObject
registerMooseObject("TensorMechanicsApp", GeneralizedKelvinVoigtModel)
GeneralizedKelvinVoigtModel::computeQpViscoelasticProperties
virtual void computeQpViscoelasticProperties()
This method assigns the mechanical properties of each spring and dashpot in the system.
Definition: GeneralizedKelvinVoigtModel.C:83
GeneralizedKelvinVoigtModel::validParams
static InputParameters validParams()
Definition: GeneralizedKelvinVoigtModel.C:17
GeneralizedKelvinVoigtModel::computeQpViscoelasticPropertiesInv
virtual void computeQpViscoelasticPropertiesInv()
This method computes the inverse elasticity tensor of each spring in the system (if required).
Definition: GeneralizedKelvinVoigtModel.C:95
GuaranteeProvider::issueGuarantee
void issueGuarantee(const MaterialPropertyName &prop_name, Guarantee guarantee)
Definition: GuaranteeProvider.C:27
LinearViscoelasticityBase::_has_longterm_dashpot
bool _has_longterm_dashpot
Indicates if the spring-dashpot assembly has a single dashpot not associated with a spring.
Definition: LinearViscoelasticityBase.h:209
GeneralizedKelvinVoigtModel.h
GeneralizedKelvinVoigtModel::_eta_i
std::vector< Real > _eta_i
The viscosity of each dashpot.
Definition: GeneralizedKelvinVoigtModel.h:44
GeneralizedKelvinVoigtModel::GeneralizedKelvinVoigtModel
GeneralizedKelvinVoigtModel(const InputParameters &parameters)
Definition: GeneralizedKelvinVoigtModel.C:36
defineLegacyParams
defineLegacyParams(GeneralizedKelvinVoigtModel)
GeneralizedKelvinVoigtModel::_S0
RankFourTensor _S0
The inverse of the elasticity tensor of the first spring.
Definition: GeneralizedKelvinVoigtModel.h:47
ComputeElasticityTensorBase::_elasticity_tensor_name
std::string _elasticity_tensor_name
Definition: ComputeElasticityTensorBase.h:38
GeneralizedKelvinVoigtBase::validParams
static InputParameters validParams()
Definition: GeneralizedKelvinVoigtBase.C:15
LinearViscoelasticityBase::_springs_elasticity_tensors
std::vector< MaterialProperty< RankFourTensor > * > _springs_elasticity_tensors
List of elasticity tensor of each subsequent spring in the chain.
Definition: LinearViscoelasticityBase.h:222
GeneralizedKelvinVoigtModel::_Ci
std::vector< RankFourTensor > _Ci
The elasticity tensor of each subsequent spring.
Definition: GeneralizedKelvinVoigtModel.h:42
Guarantee::ISOTROPIC
LinearViscoelasticityBase::_components
unsigned int _components
This is the number of internal variables required by the model.
Definition: LinearViscoelasticityBase.h:214