00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 #include "AbstractIsotropicIncompressibleMaterialLaw.hpp"
00030
00031 template<unsigned DIM>
00032 AbstractIsotropicIncompressibleMaterialLaw<DIM>::~AbstractIsotropicIncompressibleMaterialLaw()
00033 {
00034 }
00035
00036 template<unsigned DIM>
00037 void AbstractIsotropicIncompressibleMaterialLaw<DIM>::ComputeStressAndStressDerivative(
00038 c_matrix<double,DIM,DIM>& C,
00039 c_matrix<double,DIM,DIM>& invC,
00040 double pressure,
00041 c_matrix<double,DIM,DIM>& T,
00042 FourthOrderTensor2<DIM>& dTdE,
00043 bool computeDTdE)
00044 {
00045
00046
00047 #define COVERAGE_IGNORE
00048 assert((DIM==2) || (DIM==3));
00049 #undef COVERAGE_IGNORE
00050
00051 static c_matrix<double,DIM,DIM> identity = identity_matrix<double>(DIM);
00052
00053 double I1 = Trace(C);
00054 double I2 = SecondInvariant(C);
00055
00056 double dW_dI1 = Get_dW_dI1(I1,I2);
00057 double dW_dI2;
00058
00059 double d2W_dI1;
00060 double d2W_dI2;
00061 double d2W_dI1I2;
00062
00063
00064
00065
00066
00067
00068
00069 T = 2*dW_dI1*identity - pressure*invC;
00070 if (DIM==3)
00071 {
00072 dW_dI2 = Get_dW_dI2(I1,I2);
00073 T += 2*dW_dI2*(I1*identity - C);
00074 }
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098 if (computeDTdE)
00099 {
00100 d2W_dI1 = Get_d2W_dI1(I1,I2);
00101
00102 if (DIM==3)
00103 {
00104 d2W_dI2 = Get_d2W_dI2(I1,I2);
00105 d2W_dI1I2 = Get_d2W_dI1I2(I1,I2);
00106 }
00107
00108 for (unsigned M=0;M<DIM;M++)
00109 {
00110 for (unsigned N=0;N<DIM;N++)
00111 {
00112 for (unsigned P=0;P<DIM;P++)
00113 {
00114 for (unsigned Q=0;Q<DIM;Q++)
00115 {
00116 dTdE(M,N,P,Q) = 4 * d2W_dI1 * (M==N) * (P==Q)
00117 + 2 * pressure * invC(M,P) * invC(Q,N);
00118
00119 if (DIM==3)
00120 {
00121 dTdE(M,N,P,Q) += 4 * d2W_dI2 * (I1*(M==N)-C(M,N)) * (I1*(P==Q)-C(P,Q))
00122 + 4 * dW_dI2 * ((M==N)*(P==Q)-(M==P)*(N==Q))
00123 + 4 * d2W_dI1I2 * ((M==N)*(I1*(P==Q)-C(P,Q)) + (P==Q)*(I1*(M==N)-C(M,N)));
00124 }
00125 }
00126 }
00127 }
00128 }
00129 }
00130 }
00131
00132 template<>
00133 double AbstractIsotropicIncompressibleMaterialLaw<2>::GetZeroStrainPressure()
00134 {
00135 return 2*Get_dW_dI1(2,0);
00136 }
00137
00138 template<>
00139 double AbstractIsotropicIncompressibleMaterialLaw<3>::GetZeroStrainPressure()
00140 {
00141 return 2*Get_dW_dI1(3,3) + 4*Get_dW_dI2(3,3);
00142 }
00143
00145
00147
00148 template class AbstractIsotropicIncompressibleMaterialLaw<2>;
00149 template class AbstractIsotropicIncompressibleMaterialLaw<3>;