45 c_matrix<double,DIM,DIM>& rC,
46 c_matrix<double,DIM,DIM>& rInvC,
48 c_matrix<double,DIM,DIM>& rT,
52 assert((DIM==2) || (DIM==3));
54 static c_matrix<double,DIM,DIM> identity = identity_matrix<double>(DIM);
56 double I1 =
Trace(rC);
59 double w1 = Get_dW_dI1(I1, I2);
70 rT = 2*w1*identity - pressure*rInvC;
73 w2 = Get_dW_dI2(I1, I2);
74 rT += 2*w2*(I1*identity - rC);
101 double w11 = Get_d2W_dI1(I1,I2);
108 w22 = Get_d2W_dI2(I1, I2);
109 w12 = Get_d2W_dI1I2(I1, I2);
112 for (
unsigned M=0; M<DIM; M++)
114 for (
unsigned N=0; N<DIM; N++)
116 for (
unsigned P=0; P<DIM; P++)
118 for (
unsigned Q=0; Q<DIM; Q++)
120 rDTdE(M,N,P,Q) = 4 * w11 * (M==N) * (P==Q)
121 + 2 * pressure * rInvC(M,P) * rInvC(Q,N);
125 rDTdE(M,N,P,Q) += 4 * w22 * (I1*(M==N) - rC(M,N)) * (I1*(P==Q) - rC(P,Q))
126 + 4 * w2 * ((M==N)*(P==Q) - (M==P)*(N==Q))
127 + 4 * w12 * ((M==N)*(I1*(P==Q) - rC(P,Q)) + (P==Q)*(I1*(M==N) - rC(M,N)));
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)