www.mooseframework.org
GeneralizedMaxwellBase.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 
10 #include "GeneralizedMaxwellBase.h"
11 
13 
14 InputParameters
16 {
17  InputParameters params = LinearViscoelasticityBase::validParams();
18  return params;
19 }
20 
21 GeneralizedMaxwellBase::GeneralizedMaxwellBase(const InputParameters & parameters)
22  : LinearViscoelasticityBase(parameters)
23 {
25 }
26 
27 void
29 {
30  if (_t_step <= 1)
31  return;
32 
33  RankTwoTensor effective_strain = _elastic_strain_old[_qp] + _creep_strain_old[_qp];
35  effective_strain += (*_driving_eigenstrain_old)[_qp];
36 
37  for (unsigned int i = 0; i < _springs_elasticity_tensors.size(); ++i)
38  {
39  Real theta_i = computeTheta(_dt_old, (*_dashpot_viscosities_old[i])[_qp]);
40  Real gamma = (*_dashpot_viscosities_old[i])[_qp] / (_dt_old * theta_i);
41  (*_viscous_strains[i])[_qp] =
42  (*_viscous_strains_old[i])[_qp] *
43  (((*_dashpot_viscosities_old[i])[_qp] * gamma - _dt_old * (1. - theta_i) * gamma) /
44  ((*_dashpot_viscosities_old[i])[_qp] * (1. + gamma)));
45  (*_viscous_strains[i])[_qp] +=
46  effective_strain *
47  (((*_dashpot_viscosities_old[i])[_qp] + _dt_old * (1. - theta_i) * gamma) /
48  ((*_dashpot_viscosities_old[i])[_qp] * (1. + gamma)));
49  }
50 
52  {
53  Real theta_i = computeTheta(_dt_old, (*_dashpot_viscosities_old.back())[_qp]);
54  (*_viscous_strains.back())[_qp] = effective_strain / theta_i;
55  (*_viscous_strains.back())[_qp] -=
56  (*_viscous_strains_old.back())[_qp] * ((1. - theta_i) / theta_i);
57  }
58 }
59 
60 void
62 {
63 
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);
73  (*_springs_elasticity_tensors[i])[_qp] * (gamma / (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);
81 
82  mooseDoOnce(mooseWarning("Generalized Maxwell model with longterm viscosity may not converge "
83  "under Dirichlet boundary conditions"));
84  }
85 
87  _elasticity_tensor_inv[_qp] = _elasticity_tensor[_qp].invSymm();
88 }
89 
90 void
92 {
93  _apparent_creep_strain[_qp].zero();
94 
95  for (unsigned int i = 0; i < _springs_elasticity_tensors.size(); ++i)
96  {
97  Real theta_i = computeTheta(_dt, (*_dashpot_viscosities[i])[_qp]);
98  Real gamma = (*_dashpot_viscosities[i])[_qp] / (_dt * theta_i);
100  ((*_springs_elasticity_tensors[i])[_qp] * (*_viscous_strains[i])[_qp]) *
101  (gamma / (1. + gamma));
102  }
103 
105  {
106  Real theta_i = computeTheta(_dt, (*_dashpot_viscosities.back())[_qp]);
107  Real gamma = (*_dashpot_viscosities.back())[_qp] / (_dt * theta_i);
108  _apparent_creep_strain[_qp] +=
109  (_first_elasticity_tensor[_qp] * (*_viscous_strains.back())[_qp]) * gamma;
110  }
111 
113 
115  {
116  _apparent_creep_strain[_qp] +=
118  (*_driving_eigenstrain)[_qp];
119  _apparent_creep_strain[_qp] -= (*_driving_eigenstrain)[_qp];
120  }
121 }
LinearViscoelasticityBase::_first_elasticity_tensor
MaterialProperty< RankFourTensor > & _first_elasticity_tensor
Elasticity tensor of a stand-alone elastic spring in the chain.
Definition: LinearViscoelasticityBase.h:217
LinearViscoelasticityBase::_apparent_creep_strain
MaterialProperty< RankTwoTensor > & _apparent_creep_strain
The apparent creep strain resulting from the internal viscous strains.
Definition: LinearViscoelasticityBase.h:241
LinearViscoelasticityBase::_apparent_elasticity_tensor
MaterialProperty< RankFourTensor > & _apparent_elasticity_tensor
Apparent elasticity tensor. This is NOT the elasticity tensor of the material.
Definition: LinearViscoelasticityBase.h:197
LinearViscoelasticityBase::_dashpot_viscosities
std::vector< MaterialProperty< Real > * > _dashpot_viscosities
List of viscosities of each subsequent dashpot in the chain.
Definition: LinearViscoelasticityBase.h:228
LinearViscoelasticityBase::_driving_eigenstrain
const MaterialProperty< RankTwoTensor > * _driving_eigenstrain
Pointer to the value of the driving eigenstrain.
Definition: LinearViscoelasticityBase.h:259
LinearViscoelasticityBase::_dashpot_viscosities_old
std::vector< const MaterialProperty< Real > * > _dashpot_viscosities_old
Definition: LinearViscoelasticityBase.h:229
GeneralizedMaxwellBase::updateQpViscousStrains
virtual void updateQpViscousStrains() final
Update the internal viscous strains at a quadrature point.
Definition: GeneralizedMaxwellBase.C:28
defineLegacyParams
defineLegacyParams(GeneralizedMaxwellBase)
LinearViscoelasticityBase::_has_driving_eigenstrain
bool _has_driving_eigenstrain
Indicates if the model is only driven by the stress, or also by an additional eigenstrain.
Definition: LinearViscoelasticityBase.h:255
LinearViscoelasticityBase::_creep_strain_old
const MaterialProperty< RankTwoTensor > & _creep_strain_old
Previous value of the true creep strain for update purposes.
Definition: LinearViscoelasticityBase.h:252
GeneralizedMaxwellBase.h
LinearViscoelasticityBase::computeTheta
Real computeTheta(Real dt, Real viscosity) const
Provides theta as a function of the time step and a viscosity.
Definition: LinearViscoelasticityBase.C:216
GeneralizedMaxwellBase::GeneralizedMaxwellBase
GeneralizedMaxwellBase(const InputParameters &parameters)
Definition: GeneralizedMaxwellBase.C:21
LinearViscoelasticityBase::validParams
static InputParameters validParams()
Definition: LinearViscoelasticityBase.C:16
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
GeneralizedMaxwellBase
This class represents an assembly of springs and dashpots following a generalized Maxwell model (an a...
Definition: GeneralizedMaxwellBase.h:35
LinearViscoelasticityBase::_viscous_strains
std::vector< MaterialProperty< RankTwoTensor > * > _viscous_strains
Definition: LinearViscoelasticityBase.h:236
LinearViscoelasticityBase::_apparent_elasticity_tensor_inv
MaterialProperty< RankFourTensor > & _apparent_elasticity_tensor_inv
Inverse of the apparent elasticity tensor.
Definition: LinearViscoelasticityBase.h:199
LinearViscoelasticityBase::_need_viscoelastic_properties_inverse
bool _need_viscoelastic_properties_inverse
If active, indicates that we need to call computeQpViscoelasticPropertiesInv()
Definition: LinearViscoelasticityBase.h:207
GeneralizedMaxwellBase::computeQpApparentCreepStrain
virtual void computeQpApparentCreepStrain() final
This method computes the apparent creep strain corresponding to the current viscous_strain of each da...
Definition: GeneralizedMaxwellBase.C:91
ComputeElasticityTensorBase::_elasticity_tensor
MaterialProperty< RankFourTensor > & _elasticity_tensor
Definition: ComputeElasticityTensorBase.h:40
LinearViscoelasticityBase::_viscous_strains_old
std::vector< const MaterialProperty< RankTwoTensor > * > _viscous_strains_old
Definition: LinearViscoelasticityBase.h:237
GeneralizedMaxwellBase::computeQpApparentElasticityTensors
virtual void computeQpApparentElasticityTensors() final
This method computes the apparent elasticity tensor used in the internal time-stepping scheme.
Definition: GeneralizedMaxwellBase.C:61
LinearViscoelasticityBase::_elastic_strain_old
const MaterialProperty< RankTwoTensor > & _elastic_strain_old
previous value of the elastic strain for update purposes
Definition: LinearViscoelasticityBase.h:246
RankTwoTensorTempl< Real >
LinearViscoelasticityBase::_elasticity_tensor_inv
MaterialProperty< RankFourTensor > & _elasticity_tensor_inv
Instantaneous elasticity tensor. This IS the real elasticity tensor of the material.
Definition: LinearViscoelasticityBase.h:204
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
GeneralizedMaxwellBase::validParams
static InputParameters validParams()
Definition: GeneralizedMaxwellBase.C:15
LinearViscoelasticityBase
This class is a base class for materials consisting of an assembly of linear springs and dashpots.
Definition: LinearViscoelasticityBase.h:81