@@ -17,6 +17,7 @@ HyperElasticIsotropic::validParams()
1717 InputParameters params = TensorOperator < > ::validParams ();
1818 params .addClassDescription ("Hyperelastic isotropic constitutive model." );
1919 params .addRequiredParam < TensorInputBufferName > ("F" , "Deformation gradient tensor" );
20+ params .addParam < TensorInputBufferName > ("Fstar" , "Optional eigenstrain tensor" );
2021 params .addRequiredParam < TensorInputBufferName > ("mu" , "Deformation gradient tensor" );
2122 params .addRequiredParam < TensorInputBufferName > ("K" , "Deformation gradient tensor" );
2223 params .addParam < TensorOutputBufferName > ("tangent_operator" , "dstressdstrain" , "Stiffness tensor" );
@@ -32,6 +33,7 @@ HyperElasticIsotropic::HyperElasticIsotropic(const InputParameters & parameters)
3233 _tI4s ((_tI4 + _tI4rt ) / 2.0 ),
3334 _tII (MooseTensor ::dyad22 (_tI , _tI )),
3435 _tF (getInputBuffer ("F" )),
36+ _pFstar (isParamValid ("Fstar" ) ? & getInputBuffer ("Fstar" ) : nullptr ),
3537 _tmu (getInputBuffer ("mu" )),
3638 _tK (getInputBuffer ("K" )),
3739 _tK4 (getOutputBuffer ("tangent_operator" ))
@@ -43,10 +45,25 @@ HyperElasticIsotropic::computeBuffer()
4345{
4446 using namespace MooseTensor ;
4547
48+ const auto F_e = _pFstar ? dot22 (_tF , torch ::inverse (* _pFstar )) : _tF ;
49+
50+ // Compute Green–Lagrange strain E = 0.5 (F_e^T * F_e - I)
51+ const auto E = 0.5 * (dot22 (trans2 (F_e ), F_e ) - _tI );
52+
53+ // Build material stiffness tensor
4654 const auto C4 = _tK .reshape (_domain .getValueShape ({1 , 1 , 1 , 1 })) * _tII +
4755 2. * _tmu .reshape (_domain .getValueShape ({1 , 1 , 1 , 1 })) * (_tI4s - 1. / 3. * _tII );
48- const auto S = ddot42 (C4 , .5 * (dot22 (trans2 (_tF ), _tF ) - _tI ));
4956
50- _u = dot22 (_tF , S );
51- _tK4 = dot24 (S , _tI4 ) + ddot44 (ddot44 (_tI4rt , dot42 (dot24 (_tF , C4 ), trans2 (_tF ))), _tI4rt );
57+ // Second Piola-Kirchhoff stress: S = C : E
58+ const auto S = ddot42 (C4 , E );
59+
60+ // First Piola-Kirchhoff stress: P = F_e * S
61+ _u = dot22 (F_e , S );
62+
63+ _tK4 = dot24 (S , _tI4 ) + ddot44 (ddot44 (_tI4rt , dot42 (dot24 (F_e , C4 ), trans2 (F_e ))), _tI4rt );
64+
65+ // Consistent tangent: K_ijkl = F^e_{im} C_{jlmn} F^e_{kn} + delta_{ik} S_{jl}
66+ // const auto K_geo = torch::einsum("...im,...jlmn,...kn->...ijkl", {F_e, C4, F_e});
67+ // const auto K_stress = torch::einsum("ik,jl,...jl->...ijkl", {_ti, _ti, S});
68+ // _tK4 = K_geo + K_stress;
5269}
0 commit comments