32 #include "libmesh/tensor_value.h"
36 template <
typename StrainEnergy>
43 template <
typename StrainEnergy>
45 const std::string& material )
51 template <
typename StrainEnergy>
57 template <
typename StrainEnergy>
66 libMesh::Real lambda_sq = A_cov(2,2);
68 libMesh::Real A_over_a = 1.0/lambda_sq;
71 this->compute_I1_I2(a_contra,a_cov,A_contra,A_cov,lambda_sq,A_over_a,I1,I2);
73 libMesh::Real a_term, A_term;
74 this->compute_stress_terms( lambda_sq, A_over_a, I1, I2, a_term, A_term );
78 for(
unsigned int alpha = 0; alpha < 2; alpha++ )
80 for(
unsigned int beta = 0; beta < 2; beta++ )
82 stress(alpha,beta) = a_contra(alpha,beta)*a_term + A_contra(alpha,beta)*A_term;
89 template <
typename StrainEnergy>
99 libMesh::Real lambda_sq = A_cov(2,2);
101 libMesh::Real A_over_a = 1.0/lambda_sq;
103 libMesh::Real I1, I2;
104 this->compute_I1_I2(a_contra,a_cov,A_contra,A_cov,lambda_sq,A_over_a,I1,I2);
106 libMesh::Real a_term, A_term;
107 this->compute_stress_terms( lambda_sq, A_over_a, I1, I2, a_term, A_term );
110 this->compute_stress_deriv_terms( lambda_sq, A_over_a, I1, I2, a_contra, A_contra, daterm_dstrain, dAterm_dstrain );
113 this->compute_Acontra_deriv( A_contra, dAcontra_dstrain );
117 for(
unsigned int alpha = 0; alpha < 2; alpha++ )
119 for(
unsigned int beta = 0; beta < 2; beta++ )
121 stress(alpha,beta) = a_contra(alpha,beta)*a_term + A_contra(alpha,beta)*A_term;
123 for(
unsigned int lambda = 0; lambda < 2; lambda++ )
125 for(
unsigned int mu = 0; mu < 2; mu++ )
127 C(alpha,beta,lambda,mu) = a_contra(alpha,beta)*daterm_dstrain(lambda,mu)
128 + dAcontra_dstrain(alpha,beta,lambda,mu)*A_term
129 + A_contra(alpha,beta)*dAterm_dstrain(lambda,mu);
138 template <
typename StrainEnergy>
143 libMesh::Real lambda_sq, libMesh::Real A_over_a,
144 libMesh::Real& I1, libMesh::Real& I2 )
const
148 for(
unsigned int alpha = 0; alpha < 2; alpha++ )
150 for(
unsigned int beta = 0; beta < 2; beta++ )
152 I1 += a_contra(alpha,beta)*A_cov(alpha,beta);
153 I2 += a_cov(alpha,beta)*A_contra(alpha,beta);
163 template <
typename StrainEnergy>
165 libMesh::Real I1, libMesh::Real I2,
166 libMesh::Real& a_term, libMesh::Real& A_term )
const
168 libMesh::Real dWdI1 = _W.dI1(I1,I2,1.0);
169 libMesh::Real dWdI2 = _W.dI2(I1,I2,1.0);
173 libMesh::Real p = -2.0*lambda_sq*( dWdI1 + dWdI2*(I1-lambda_sq) );
175 a_term = 2.0*(dWdI1 + dWdI2*lambda_sq);
176 A_term = 2.0*dWdI2*A_over_a + p;
181 template <
typename StrainEnergy>
183 libMesh::Real I1, libMesh::Real I2,
189 daterm_dstrain.zero();
190 dAterm_dstrain.zero();
192 libMesh::Real dWdI1 = _W.dI1(I1,I2,1.0);
193 libMesh::Real dWdI2 = _W.dI2(I1,I2,1.0);
198 for(
unsigned int alpha = 0; alpha < 2; alpha++ )
200 for(
unsigned int beta = 0; beta < 2; beta++ )
205 const libMesh::Real dlamsq_dstrain = -2.0*lambda_sq*A_contra(alpha,beta);
207 daterm_dstrain(alpha,beta) = 2.0*dWdI2*dlamsq_dstrain;
212 const libMesh::Real dI1_dstrain = 2.0*a_contra(alpha,beta) + dlamsq_dstrain;
214 const libMesh::Real dp_dstrain = -2.0*dlamsq_dstrain*( dWdI1 + dWdI2*(I1-lambda_sq) )
215 -2.0*lambda_sq*dWdI2*(dI1_dstrain - dlamsq_dstrain);
217 dAterm_dstrain(alpha,beta) = 2.0*dWdI2*A_over_a*(2.0*A_contra(alpha,beta)) + dp_dstrain;
224 template <
typename StrainEnergy>
228 for(
unsigned int alpha = 0; alpha < 2; alpha++ )
230 for(
unsigned int beta = 0; beta < 2; beta++ )
232 for(
unsigned int lambda = 0; lambda < 2; lambda++ )
234 for(
unsigned int mu = 0; mu < 2; mu++ )
236 dAcontra_dstrain(alpha,beta,lambda,mu) = -( A_contra(alpha,lambda)*A_contra(beta,mu)
237 + A_contra(alpha,mu)*A_contra(beta,lambda) );
246 template <
typename StrainEnergy>
252 std::cerr <<
"Error: compute_33_stress shouldn't be called for incompressible materials." << std::endl;
void compute_Acontra_deriv(const libMesh::TensorValue< libMesh::Real > &A_contra, ElasticityTensor &dAcontra_dstrain) const
virtual ~IncompressiblePlaneStressHyperelasticity()
void compute_stress_deriv_terms(libMesh::Real lambda_sq, libMesh::Real A_over_a, libMesh::Real I1, libMesh::Real I2, const libMesh::TensorValue< libMesh::Real > &a_contra, const libMesh::TensorValue< libMesh::Real > &A_contra, libMesh::TensorValue< libMesh::Real > &daterm_dstrain, libMesh::TensorValue< libMesh::Real > &dAterm_dstrain) const
void compute_stress_imp(unsigned int dim, const libMesh::TensorValue< libMesh::Real > &a_contra, const libMesh::TensorValue< libMesh::Real > &a_cov, const libMesh::TensorValue< libMesh::Real > &A_contra, const libMesh::TensorValue< libMesh::Real > &A_cov, libMesh::TensorValue< libMesh::Real > &stress)
void compute_stress_terms(libMesh::Real lambda_sq, libMesh::Real A_over_a, libMesh::Real I1, libMesh::Real I2, libMesh::Real &a_term, libMesh::Real &A_term) const
libMesh::Real compute_33_stress_imp(const libMesh::TensorValue< libMesh::Real > &g_contra, const libMesh::TensorValue< libMesh::Real > &g_cov, const libMesh::TensorValue< libMesh::Real > &G_contra, const libMesh::TensorValue< libMesh::Real > &G_cov)
void compute_I1_I2(const libMesh::TensorValue< libMesh::Real > &a_contra, const libMesh::TensorValue< libMesh::Real > &a_cov, const libMesh::TensorValue< libMesh::Real > &A_contra, const libMesh::TensorValue< libMesh::Real > &A_cov, libMesh::Real lambda_sq, libMesh::Real A_over_a, libMesh::Real &I1, libMesh::Real &I2) const
IncompressiblePlaneStressHyperelasticity(const GetPot &input)
void compute_stress_and_elasticity_imp(unsigned int dim, const libMesh::TensorValue< libMesh::Real > &a_contra, const libMesh::TensorValue< libMesh::Real > &a_cov, const libMesh::TensorValue< libMesh::Real > &A_contra, const libMesh::TensorValue< libMesh::Real > &A_cov, libMesh::TensorValue< libMesh::Real > &stress, ElasticityTensor &C)