https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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
11
18
24
25void
27{
28 if (_t_step <= 1)
29 return;
30
31 RankTwoTensor effective_strain = _elastic_strain_old[_qp] + _creep_strain_old[_qp];
33 effective_strain += (*_driving_eigenstrain_old)[_qp];
34
35 for (unsigned int i = 0; i < _springs_elasticity_tensors.size(); ++i)
36 {
37 Real theta_i = computeTheta(_dt_old, (*_dashpot_viscosities_old[i])[_qp]);
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
58void
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
85 _elasticity_tensor_inv[_qp] = _elasticity_tensor[_qp].invSymm();
86}
87
88void
90{
91 _apparent_creep_strain[_qp].zero();
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);
98 ((*_springs_elasticity_tensors[i])[_qp] * (*_viscous_strains[i])[_qp]) *
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 {
116 (*_driving_eigenstrain)[_qp];
117 _apparent_creep_strain[_qp] -= (*_driving_eigenstrain)[_qp];
118 }
119}
void mooseWarning(Args &&... args)
GenericMaterialProperty< T, is_ad > & _elasticity_tensor
virtual void computeQpApparentCreepStrain() final
This method computes the apparent creep strain corresponding to the current viscous_strain of each da...
virtual void updateQpViscousStrains() final
Update the internal viscous strains at a quadrature point.
GeneralizedMaxwellBase(const InputParameters &parameters)
static InputParameters validParams()
virtual void computeQpApparentElasticityTensors() final
This method computes the apparent elasticity tensor used in the internal time-stepping scheme.
This class is a base class for materials consisting of an assembly of linear springs and dashpots.
std::vector< MaterialProperty< RankFourTensor > * > _springs_elasticity_tensors
List of elasticity tensor of each subsequent spring in the chain.
bool _has_driving_eigenstrain
Indicates if the model is only driven by the stress, or also by an additional eigenstrain.
static InputParameters validParams()
std::vector< MaterialProperty< RankTwoTensor > * > _viscous_strains
const MaterialProperty< RankTwoTensor > & _creep_strain_old
Previous value of the true creep strain for update purposes.
MaterialProperty< RankFourTensor > & _apparent_elasticity_tensor
Apparent elasticity tensor. This is NOT the elasticity tensor of the material.
MaterialProperty< RankTwoTensor > & _apparent_creep_strain
The apparent creep strain resulting from the internal viscous strains.
bool _has_longterm_dashpot
Indicates if the spring-dashpot assembly has a single dashpot not associated with a spring.
Real computeTheta(Real dt, Real viscosity) const
Provides theta as a function of the time step and a viscosity.
std::vector< MaterialProperty< Real > * > _dashpot_viscosities
List of viscosities of each subsequent dashpot in the chain.
bool _need_viscoelastic_properties_inverse
If active, indicates that we need to call computeQpViscoelasticPropertiesInv()
std::vector< const MaterialProperty< Real > * > _dashpot_viscosities_old
MaterialProperty< RankFourTensor > & _apparent_elasticity_tensor_inv
Inverse of the apparent elasticity tensor.
std::vector< const MaterialProperty< RankTwoTensor > * > _viscous_strains_old
const MaterialProperty< RankTwoTensor > *const _driving_eigenstrain
Pointer to the value of the driving eigenstrain.
const MaterialProperty< RankTwoTensor > & _elastic_strain_old
previous value of the elastic strain for update purposes
MaterialProperty< RankFourTensor > & _elasticity_tensor_inv
Instantaneous elasticity tensor. This IS the real elasticity tensor of the material.
MaterialProperty< RankFourTensor > & _first_elasticity_tensor
Elasticity tensor of a stand-alone elastic spring in the chain.