https://mooseframework.inl.gov
Loading...
Searching...
No Matches
GeneralizedKelvinVoigtBase.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
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 _longterm_elasticity_tensor_inv_old(nullptr)
26{
27}
28
29void
39
40void
42{
43 if (_t_step <= 1)
44 return;
45
47
49 effective_stress += _first_elasticity_tensor_old[_qp] * (*_driving_eigenstrain_old)[_qp];
50
51 for (unsigned int i = 0; i < _springs_elasticity_tensors.size(); ++i)
52 {
53 Real theta_i = computeTheta(_dt_old, (*_dashpot_viscosities_old[i])[_qp]);
54 Real gamma = (*_dashpot_viscosities_old[i])[_qp] / (_dt_old * theta_i);
55 (*_viscous_strains[i])[_qp] =
56 ((*_springs_elasticity_tensors_inv_old[i])[_qp] * effective_stress) /
57 (theta_i * (1. + gamma));
58 (*_viscous_strains[i])[_qp] += (*_viscous_strains_old[i])[_qp] *
59 (gamma / (theta_i * (1. + gamma)) - (1. - theta_i) / theta_i);
60 }
61
63 {
64 (*_viscous_strains.back())[_qp] =
65 ((*_longterm_elasticity_tensor_inv_old)[_qp] * effective_stress) *
66 (_dt_old / (*_dashpot_viscosities_old.back())[_qp]);
67 (*_viscous_strains.back())[_qp] += (*_viscous_strains_old.back())[_qp];
68 }
69}
70
71void
73{
75 _elasticity_tensor_inv[_qp] = (*_first_elasticity_tensor_inv)[_qp];
76 _apparent_elasticity_tensor_inv[_qp] = (*_first_elasticity_tensor_inv)[_qp];
77
78 for (unsigned int i = 0; i < _springs_elasticity_tensors.size(); ++i)
79 {
80 Real theta_i = computeTheta(_dt, (*_dashpot_viscosities[i])[_qp]);
81 Real gamma = (*_dashpot_viscosities[i])[_qp] / (_dt * theta_i);
83 (*_springs_elasticity_tensors_inv[i])[_qp] / (1. + gamma);
84 }
85
87 {
88 Real theta_i = computeTheta(_dt, (*_dashpot_viscosities.back())[_qp]);
89 Real gamma = (*_dashpot_viscosities.back())[_qp] / (_dt * theta_i);
90 _apparent_elasticity_tensor_inv[_qp] += (*_longterm_elasticity_tensor_inv)[_qp] / gamma;
91 }
92
94}
95
96void
98{
99 _apparent_creep_strain[_qp].zero();
100
101 for (unsigned int i = 0; i < _springs_elasticity_tensors.size(); ++i)
102 {
103 Real theta_i = computeTheta(_dt, (*_dashpot_viscosities[i])[_qp]);
104 Real gamma = (*_dashpot_viscosities[i])[_qp] / (_dt * theta_i);
105 _apparent_creep_strain[_qp] += (*_viscous_strains[i])[_qp] * (gamma / (1. + gamma));
106 }
107
109 _apparent_creep_strain[_qp] += (*_viscous_strains.back())[_qp];
110
112 {
113 RankFourTensor cumulated_driving_tensor;
114 cumulated_driving_tensor.zero();
115 for (unsigned int i = 0; i < _springs_elasticity_tensors.size(); ++i)
116 {
117 double theta_i = computeTheta(_dt, (*_dashpot_viscosities[i])[_qp]);
118 double gamma = (*_dashpot_viscosities[i])[_qp] / (_dt * theta_i);
119 cumulated_driving_tensor += (*_springs_elasticity_tensors_inv[i])[_qp] / (1. + gamma);
120 }
121
123 (_elasticity_tensor[_qp] * cumulated_driving_tensor) * (*_driving_eigenstrain)[_qp];
124
126 {
127 double theta_i = computeTheta(_dt, (*_dashpot_viscosities.back())[_qp]);
128 double gamma = (*_dashpot_viscosities.back())[_qp] / (_dt * theta_i);
129 _apparent_creep_strain[_qp] += (*_driving_eigenstrain)[_qp] / gamma;
130 }
131 }
132}
GenericMaterialProperty< T, is_ad > & _elasticity_tensor
const std::string _base_name
Base name of the material system.
virtual void computeQpApparentElasticityTensors() final
This method computes the apparent elasticity tensor used in the internal time-stepping scheme.
GeneralizedKelvinVoigtBase(const InputParameters &parameters)
virtual void declareViscoelasticProperties() override
Declare all necessary MaterialProperties for the model.
static InputParameters validParams()
const MaterialProperty< RankFourTensor > & _first_elasticity_tensor_old
old material properties required for the update of the viscoelastic strain
virtual void computeQpApparentCreepStrain() final
This method computes the apparent creep strain corresponding to the current viscous_strain of each da...
const MaterialProperty< RankFourTensor > * _longterm_elasticity_tensor_inv_old
virtual void updateQpViscousStrains() final
Update the internal viscous strains at a quadrature point.
void suppressParameter(const std::string &name)
T & set(const std::string &name, bool quiet_mode=false)
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
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.
std::vector< MaterialProperty< RankFourTensor > * > _springs_elasticity_tensors_inv
virtual void declareViscoelasticProperties()
Declare all necessary MaterialProperties for the model.
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
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< 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.