https://mooseframework.inl.gov
GeneralizedMaxwellBase.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://mooseframework.inl.gov
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 
14 {
16  return params;
17 }
18 
20  : LinearViscoelasticityBase(parameters)
21 {
23 }
24 
25 void
27 {
28  if (_t_step <= 1)
29  return;
30 
33  effective_strain += (*_driving_eigenstrain_old)[_qp];
34 
35  for (unsigned int i = 0; i < _springs_elasticity_tensors.size(); ++i)
36  {
38  Real gamma = (*_dashpot_viscosities_old[i])[_qp] / (_dt_old * theta_i);
39  (*_viscous_strains[i])[_qp] =
40  (*_viscous_strains_old[i])[_qp] *
41  (((*_dashpot_viscosities_old[i])[_qp] * gamma - _dt_old * (1. - theta_i) * gamma) /
42  ((*_dashpot_viscosities_old[i])[_qp] * (1. + gamma)));
43  (*_viscous_strains[i])[_qp] +=
44  effective_strain *
45  (((*_dashpot_viscosities_old[i])[_qp] + _dt_old * (1. - theta_i) * gamma) /
46  ((*_dashpot_viscosities_old[i])[_qp] * (1. + gamma)));
47  }
48 
50  {
51  Real theta_i = computeTheta(_dt_old, (*_dashpot_viscosities_old.back())[_qp]);
52  (*_viscous_strains.back())[_qp] = effective_strain / theta_i;
53  (*_viscous_strains.back())[_qp] -=
54  (*_viscous_strains_old.back())[_qp] * ((1. - theta_i) / theta_i);
55  }
56 }
57 
58 void
60 {
61 
64 
65  for (unsigned int i = 0; i < _springs_elasticity_tensors.size(); ++i)
66  {
67  Real theta_i = computeTheta(_dt, (*_dashpot_viscosities[i])[_qp]);
68  Real gamma = (*_dashpot_viscosities[i])[_qp] / (_dt * theta_i);
71  (*_springs_elasticity_tensors[i])[_qp] * (gamma / (1. + gamma));
72  }
73 
75  {
76  Real theta_i = computeTheta(_dt, (*_dashpot_viscosities.back())[_qp]);
77  Real gamma = (*_dashpot_viscosities.back())[_qp] / (_dt * theta_i);
79 
80  mooseDoOnce(mooseWarning("Generalized Maxwell model with longterm viscosity may not converge "
81  "under Dirichlet boundary conditions"));
82  }
83 
86 }
87 
88 void
90 {
92 
93  for (unsigned int i = 0; i < _springs_elasticity_tensors.size(); ++i)
94  {
95  Real theta_i = computeTheta(_dt, (*_dashpot_viscosities[i])[_qp]);
96  Real gamma = (*_dashpot_viscosities[i])[_qp] / (_dt * theta_i);
99  (gamma / (1. + gamma));
100  }
101 
103  {
104  Real theta_i = computeTheta(_dt, (*_dashpot_viscosities.back())[_qp]);
105  Real gamma = (*_dashpot_viscosities.back())[_qp] / (_dt * theta_i);
107  (_first_elasticity_tensor[_qp] * (*_viscous_strains.back())[_qp]) * gamma;
108  }
109 
111 
113  {
117  _apparent_creep_strain[_qp] -= (*_driving_eigenstrain)[_qp];
118  }
119 }
virtual void computeQpApparentElasticityTensors() final
This method computes the apparent elasticity tensor used in the internal time-stepping scheme...
GeneralizedMaxwellBase(const InputParameters &parameters)
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...
void mooseWarning(Args &&... args) const
bool _need_viscoelastic_properties_inverse
If active, indicates that we need to call computeQpViscoelasticPropertiesInv()
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.
virtual void updateQpViscousStrains() final
Update the internal viscous strains at a quadrature point.
const MaterialProperty< RankTwoTensor > *const _driving_eigenstrain
Pointer to the value of the driving eigenstrain.
static InputParameters validParams()
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.
const MaterialProperty< RankTwoTensor > & _creep_strain_old
Previous value of the true creep strain for update purposes.
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.