16 #include "libmesh/quadrature.h" 17 #include "libmesh/utility.h" 22 template <
typename R2,
typename R4>
26 return MooseEnum(
"TaylorExpansion EigenSolution",
"TaylorExpansion");
29 template <
typename R2,
typename R4>
35 "Compute a strain increment and rotation increment for finite strains.");
38 "Methods to calculate the strain and rotation increments");
42 template <
typename R2,
typename R4>
45 _Fhat(this->_fe_problem.getMaxQps()),
46 _decomposition_method(
51 template <
typename R2,
typename R4>
56 for (_qp = 0; _qp < _qrule->n_points(); ++_qp)
60 (*_grad_disp[0])[_qp], (*_grad_disp[1])[_qp], (*_grad_disp[2])[_qp]);
64 (*_grad_disp_old[0])[_qp], (*_grad_disp_old[1])[_qp], (*_grad_disp_old[2])[_qp]);
73 _Fhat[_qp] =
A * Fbar.inverse();
74 _Fhat[_qp].addIa(1.0);
77 if (_volumetric_locking_correction)
78 ave_Fhat += _Fhat[_qp] * _JxW[_qp] * _coord[_qp];
81 if (_volumetric_locking_correction)
82 ave_Fhat /= _current_elem_volume;
84 const auto ave_Fhat_det = ave_Fhat.
det();
85 for (_qp = 0; _qp < _qrule->n_points(); ++_qp)
88 if (_volumetric_locking_correction)
89 _Fhat[_qp] *= std::cbrt(ave_Fhat_det / _Fhat[_qp].det());
95 template <
typename R2,
typename R4>
99 ADR2 total_strain_increment;
102 computeQpIncrements(total_strain_increment, _rotation_increment[_qp]);
104 _strain_increment[_qp] = total_strain_increment;
107 this->subtractEigenstrainIncrementFromStrain(_strain_increment[_qp]);
110 _strain_rate[_qp] = _strain_increment[_qp] / _dt;
112 _strain_rate[_qp].zero();
115 _mechanical_strain[_qp] = _mechanical_strain_old[_qp] + _strain_increment[_qp];
116 _total_strain[_qp] = _total_strain_old[_qp] + total_strain_increment;
119 _mechanical_strain[_qp].rotate(_rotation_increment[_qp]);
120 _total_strain[_qp].rotate(_rotation_increment[_qp]);
123 _total_strain[_qp] += (*_global_strain)[_qp];
126 template <
typename R2,
typename R4>
131 switch (_decomposition_method)
133 case DecompMethod::TaylorExpansion:
143 ADR2 Cinv_I = ADR2::timesTranspose(
A) - ADR2::plusTranspose(
A);
146 total_strain_increment = -Cinv_I * 0.5 + Cinv_I.square() * 0.25;
148 const ADReal a[3] = {invFhat(1, 2) - invFhat(2, 1),
149 invFhat(2, 0) - invFhat(0, 2),
150 invFhat(0, 1) - invFhat(1, 0)};
152 const auto q = (
a[0] *
a[0] +
a[1] *
a[1] +
a[2] *
a[2]) / 4.0;
153 const auto trFhatinv_1 = invFhat.
trace() - 1.0;
154 const auto p = trFhatinv_1 * trFhatinv_1 / 4.0;
158 p + 3.0 * Utility::pow<2>(p) * (1.0 - (p + q)) / Utility::pow<2>(p + q) -
159 2.0 * Utility::pow<3>(p) * (1.0 - (p + q)) / Utility::pow<3>(p + q);
160 if (C1_squared <= 0.0)
162 "Cannot take square root of a number less than or equal to zero in the calculation of " 163 "C1 for the Rashid approximation for the rotation tensor. This zero or negative number " 164 "may occur when elements become heavily distorted.");
166 const ADReal C1 = std::sqrt(C1_squared);
171 C2 = (1.0 - C1) / (4.0 * q);
174 C2 = 0.125 + q * 0.03125 * (Utility::pow<2>(p) - 12.0 * (p - 1.0)) / Utility::pow<2>(p) +
175 Utility::pow<2>(q) * (p - 2.0) * (Utility::pow<2>(p) - 10.0 * p + 32.0) /
178 (1104.0 - 992.0 * p + 376.0 * Utility::pow<2>(p) - 72.0 * Utility::pow<3>(p) +
179 5.0 * Utility::pow<4>(p)) /
180 (512.0 * Utility::pow<4>(p));
183 (p * q * (3.0 - q) + Utility::pow<3>(p) + Utility::pow<2>(q)) / Utility::pow<3>(p + q);
186 "Cannot take square root of a number less than or equal to zero in the calculation of " 187 "C3_test for the Rashid approximation for the rotation tensor. This zero or negative " 188 "number may occur when elements become heavily distorted.");
189 const ADReal C3 = 0.5 * std::sqrt(C3_test);
195 for (
unsigned int i = 0; i < 3; ++i)
196 for (
unsigned int j = 0;
j < 3; ++
j)
197 R_incr(i,
j) += C2 *
a[i] *
a[
j];
199 R_incr(0, 1) += C3 *
a[2];
200 R_incr(0, 2) -= C3 *
a[1];
201 R_incr(1, 0) -= C3 *
a[2];
202 R_incr(1, 2) += C3 *
a[0];
203 R_incr(2, 0) += C3 *
a[1];
204 R_incr(2, 1) -= C3 *
a[0];
210 case DecompMethod::EigenSolution:
215 if (this->_fe_problem.currentlyComputingJacobian() &&
218 ADRankTwoTensor(0.0, 5.0e-13, 5.0e-13, 5.0e-13, 0.0, 5.0e-13, 5.0e-13, 5.0e-13, 0.0);
220 FADR2 Chat = ADR2::transposeTimes(_Fhat[_qp]);
221 FADR2 Uhat = MathUtils::sqrt(Chat);
222 rotation_increment = _Fhat[_qp] * Uhat.
inverse().template get<ADRankTwoTensor>();
223 total_strain_increment = MathUtils::log(Uhat).template get<ADR2>();
228 mooseError(
"ADComputeFiniteStrain Error: Pass valid decomposition type: TaylorExpansion or " RankTwoTensorTempl< T > inverse() const
static InputParameters validParams()
Moose::GenericType< R2, true > ADR2
void mooseError(Args &&... args)
ADComputeIncrementalStrainBase is the base class for strain tensors using incremental formulations...
void computeProperties() override
static RankTwoTensorTempl Identity()
static RankTwoTensorTempl initializeFromRows(const libMesh::TypeVector< ADReal > &row0, const libMesh::TypeVector< ADReal > &row1, const libMesh::TypeVector< ADReal > &row2)
ADComputeFiniteStrainTempl(const InputParameters ¶meters)
ADComputeFiniteStrain defines a strain increment and rotation increment, for finite strains...
static MooseEnum decompositionType()
RankTwoTensorTempl< T > transpose() const
virtual void computeQpStrain()
static InputParameters validParams()
virtual void computeQpIncrements(ADR2 &e, ADRankTwoTensor &r)
static const std::complex< double > j(0, 1)
Complex number "j" (also known as "i")
registerMooseObject("SolidMechanicsApp", ADComputeFiniteStrain)
FactorizedRankTwoTensorTempl< T > inverse() const