www.mooseframework.org
GeneralizedKelvinVoigtBase.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 
14 {
16  params.set<bool>("need_viscoelastic_properties_inverse") = true;
17  params.suppressParameter<bool>("need_viscoelastic_properties_inverse");
18  return params;
19 }
20 
22  : LinearViscoelasticityBase(parameters),
23  _first_elasticity_tensor_old(
24  getMaterialPropertyOld<RankFourTensor>(_base_name + "spring_elasticity_tensor_0")),
25  _first_elasticity_tensor_inv_old(
26  getMaterialPropertyOld<RankFourTensor>(_base_name + "spring_elasticity_tensor_0_inv"))
27 {
28 }
29 
30 void
32 {
33  if (_t_step <= 1)
34  return;
35 
37 
39  effective_stress += _first_elasticity_tensor_old[_qp] * (*_driving_eigenstrain_old)[_qp];
40 
41  for (unsigned int i = 0; i < _springs_elasticity_tensors.size(); ++i)
42  {
44  Real gamma = (*_dashpot_viscosities_old[i])[_qp] / (_dt_old * theta_i);
45  (*_viscous_strains[i])[_qp] =
46  ((*_springs_elasticity_tensors_inv_old[i])[_qp] * effective_stress) /
47  (theta_i * (1. + gamma));
48  (*_viscous_strains[i])[_qp] += (*_viscous_strains_old[i])[_qp] *
49  (gamma / (theta_i * (1. + gamma)) - (1. - theta_i) / theta_i);
50  }
51 
53  {
54  (*_viscous_strains.back())[_qp] = (_first_elasticity_tensor_inv_old[_qp] * effective_stress) *
55  (_dt_old / (*_dashpot_viscosities_old.back())[_qp]);
56  (*_viscous_strains.back())[_qp] += (*_viscous_strains_old.back())[_qp];
57  }
58 }
59 
60 void
62 {
64  _elasticity_tensor_inv[_qp] = (*_first_elasticity_tensor_inv)[_qp];
65  _apparent_elasticity_tensor_inv[_qp] = (*_first_elasticity_tensor_inv)[_qp];
66 
67  for (unsigned int i = 0; i < _springs_elasticity_tensors.size(); ++i)
68  {
69  Real theta_i = computeTheta(_dt, (*_dashpot_viscosities[i])[_qp]);
70  Real gamma = (*_dashpot_viscosities[i])[_qp] / (_dt * theta_i);
72  (*_springs_elasticity_tensors_inv[i])[_qp] / (1. + gamma);
73  }
74 
76  {
77  Real theta_i = computeTheta(_dt, (*_dashpot_viscosities.back())[_qp]);
78  Real gamma = (*_dashpot_viscosities.back())[_qp] / (_dt * theta_i);
79  _apparent_elasticity_tensor_inv[_qp] += (*_first_elasticity_tensor_inv)[_qp] / gamma;
80  }
81 
83 }
84 
85 void
87 {
89 
90  for (unsigned int i = 0; i < _springs_elasticity_tensors.size(); ++i)
91  {
92  Real theta_i = computeTheta(_dt, (*_dashpot_viscosities[i])[_qp]);
93  Real gamma = (*_dashpot_viscosities[i])[_qp] / (_dt * theta_i);
94  _apparent_creep_strain[_qp] += (*_viscous_strains[i])[_qp] * (gamma / (1. + gamma));
95  }
96 
99 
101  {
102  RankFourTensor cumulated_driving_tensor;
103  cumulated_driving_tensor.zero();
104  for (unsigned int i = 0; i < _springs_elasticity_tensors.size(); ++i)
105  {
106  double theta_i = computeTheta(_dt, (*_dashpot_viscosities[i])[_qp]);
107  double gamma = (*_dashpot_viscosities[i])[_qp] / (_dt * theta_i);
108  cumulated_driving_tensor += (*_springs_elasticity_tensors_inv[i])[_qp] / (1. + gamma);
109  }
110 
112  (_elasticity_tensor[_qp] * cumulated_driving_tensor) * (*_driving_eigenstrain)[_qp];
113 
115  {
116  double theta_i = computeTheta(_dt, (*_dashpot_viscosities.back())[_qp]);
117  double gamma = (*_dashpot_viscosities.back())[_qp] / (_dt * theta_i);
118  _apparent_creep_strain[_qp] += (*_driving_eigenstrain)[_qp] / gamma;
119  }
120  }
121 }
std::vector< MaterialProperty< RankFourTensor > * > _springs_elasticity_tensors_inv
virtual void updateQpViscousStrains() final
Update the internal viscous strains at a quadrature point.
T & set(const std::string &name, bool quiet_mode=false)
GenericMaterialProperty< T, is_ad > & _elasticity_tensor
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
virtual void computeQpApparentCreepStrain() final
This method computes the apparent creep strain corresponding to the current viscous_strain of each da...
static InputParameters validParams()
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...
static InputParameters validParams()
void suppressParameter(const std::string &name)
MaterialProperty< RankFourTensor > & _apparent_elasticity_tensor
Apparent elasticity tensor. This is NOT the elasticity tensor of the material.
const MaterialProperty< RankTwoTensor > & _elastic_strain_old
previous value of the elastic strain for update purposes
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.
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< RankTwoTensor > *const _driving_eigenstrain
Pointer to the value of the driving eigenstrain.
const MaterialProperty< RankFourTensor > & _first_elasticity_tensor_inv_old
GeneralizedKelvinVoigtBase(const InputParameters &parameters)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
MaterialProperty< RankTwoTensor > & _apparent_creep_strain
The apparent creep strain resulting from the internal viscous strains.
This class is a base class for materials consisting of an assembly of linear springs and dashpots...
bool _has_driving_eigenstrain
Indicates if the model is only driven by the stress, or also by an additional eigenstrain.
MaterialProperty< RankFourTensor > & _elasticity_tensor_inv
Instantaneous elasticity tensor. This IS the real elasticity tensor of the material.
virtual void computeQpApparentElasticityTensors() final
This method computes the apparent elasticity tensor used in the internal time-stepping scheme...
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 > & _apparent_elasticity_tensor_inv
Inverse of the apparent elasticity tensor.