36 #include "AbstractIsotropicCompressibleMaterialLaw.hpp"
38 template<
unsigned DIM>
43 template<
unsigned DIM>
45 c_matrix<double,DIM,DIM>& rInvC,
47 c_matrix<double,DIM,DIM>& rT,
55 #define COVERAGE_IGNORE
56 assert((DIM==2) || (DIM==3));
57 #undef COVERAGE_IGNORE
59 assert(pressure==0.0);
61 static c_matrix<double,DIM,DIM> identity = identity_matrix<double>(DIM);
63 double I1 =
Trace(rC);
67 static c_matrix<double,DIM,DIM> dI2dC;
68 dI2dC = I1*identity - rC;
70 double w1 = Get_dW_dI1(I1,I2,I3);
71 double w2 = Get_dW_dI2(I1,I2,I3);
72 double w3 = Get_dW_dI3(I1,I2,I3);
84 rT = 2*w1*identity + 2*w3*I3*rInvC;
107 double w11 = Get_d2W_dI1(I1,I2,I3);
108 double w22 = Get_d2W_dI2(I1,I2,I3);
109 double w33 = Get_d2W_dI3(I1,I2,I3);
111 double w23 = Get_d2W_dI2I3(I1,I2,I3);
112 double w13 = Get_d2W_dI1I3(I1,I2,I3);
113 double w12 = Get_d2W_dI1I2(I1,I2,I3);
115 for (
unsigned M=0; M<DIM; M++)
117 for (
unsigned N=0; N<DIM; N++)
119 for (
unsigned P=0; P<DIM; P++)
121 for (
unsigned Q=0; Q<DIM; Q++)
123 rDTdE(M,N,P,Q) = 4 * w11 * (M==N) * (P==Q)
124 + 4 * w13 * I3 * ( (M==N) * rInvC(P,Q) + rInvC(M,N)*(P==Q) )
125 + 4 * (w33*I3 + w3) * I3 * rInvC(M,N) * rInvC(P,Q)
126 - 4 * w3 * I3 * rInvC(M,P) * rInvC(Q,N);
130 rDTdE(M,N,P,Q) += 4 * w22 * dI2dC(M,N) * dI2dC(P,Q)
131 + 4 * w12 * ((M==N)*dI2dC(P,Q) + (P==Q)*dI2dC(M,N))
132 + 4 * w23 * I3 * ( dI2dC(M,N)*rInvC(P,Q) + rInvC(M,N)*dI2dC(P,Q))
133 + 4 * w2 * ((M==N)*(P==Q) - (M==P)*(N==Q));
T SecondInvariant(const c_matrix< T, 3, 3 > &rM)
T Trace(const c_matrix< T, 1, 1 > &rM)
T Determinant(const boost::numeric::ublas::c_matrix< T, 1, 1 > &rM)
virtual ~AbstractIsotropicCompressibleMaterialLaw()
void ComputeStressAndStressDerivative(c_matrix< double, DIM, DIM > &rC, c_matrix< double, DIM, DIM > &rInvC, double pressure, c_matrix< double, DIM, DIM > &rT, FourthOrderTensor< DIM, DIM, DIM, DIM > &rDTdE, bool computeDTdE)