CompressibleExponentialLaw.cpp
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
00030
00031
00032
00033
00034
00035
00036 #include "CompressibleExponentialLaw.hpp"
00037
00038 template<unsigned DIM>
00039 CompressibleExponentialLaw<DIM>::CompressibleExponentialLaw()
00040 {
00041 mA = 0.88;
00042
00043 double bff = 18.5;
00044 double bss = 3.58;
00045 double bnn = 3.58;
00046 double bfn = 2.8;
00047 double bfs = 2.8;
00048 double bsn = 2.8;
00049
00050 mCompressibilityParam = 100.0;
00051
00052 mB.resize(DIM);
00053 for (unsigned i=0; i<DIM; i++)
00054 {
00055 mB[i].resize(DIM);
00056 }
00057
00058 mB[0][0] = bff;
00059 mB[0][1] = mB[1][0] = bfs;
00060 mB[1][1] = bss;
00061
00062 if (DIM > 2)
00063 {
00064 mB[2][2] = bnn;
00065 mB[0][2] = mB[2][0] = bfn;
00066 mB[2][1] = mB[1][2] = bsn;
00067 }
00068
00069 for (unsigned M=0; M<DIM; M++)
00070 {
00071 for (unsigned N=0; N<DIM; N++)
00072 {
00073 mIdentity(M,N) = M==N ? 1.0 : 0.0;
00074 }
00075 }
00076 }
00077
00078 template<unsigned DIM>
00079 void CompressibleExponentialLaw<DIM>::ComputeStressAndStressDerivative(c_matrix<double,DIM,DIM>& rC,
00080 c_matrix<double,DIM,DIM>& rInvC,
00081 double pressure ,
00082 c_matrix<double,DIM,DIM>& rT,
00083 FourthOrderTensor<DIM,DIM,DIM,DIM>& rDTdE,
00084 bool computeDTdE)
00085 {
00086 static c_matrix<double,DIM,DIM> C_transformed;
00087 static c_matrix<double,DIM,DIM> invC_transformed;
00088
00089
00090
00091
00092
00093
00094
00095 this->ComputeTransformedDeformationTensor(rC, rInvC, C_transformed, invC_transformed);
00096
00097
00098
00099 c_matrix<double,DIM,DIM> E = 0.5*(C_transformed - mIdentity);
00100
00101 double QQ = 0;
00102 for (unsigned M=0; M<DIM; M++)
00103 {
00104 for (unsigned N=0; N<DIM; N++)
00105 {
00106 QQ += mB[M][N]*E(M,N)*E(M,N);
00107 }
00108 }
00109 assert(QQ < 10.0);
00110 double multiplier = mA*exp(QQ);
00111 rDTdE.Zero();
00112
00113 double J = sqrt(Determinant(rC));
00114
00115 for (unsigned M=0; M<DIM; M++)
00116 {
00117 for (unsigned N=0; N<DIM; N++)
00118 {
00119 rT(M,N) = multiplier*mB[M][N]*E(M,N) + mCompressibilityParam * J*log(J)*invC_transformed(M,N);
00120
00121 if (computeDTdE)
00122 {
00123 for (unsigned P=0; P<DIM; P++)
00124 {
00125 for (unsigned Q=0; Q<DIM; Q++)
00126 {
00127 rDTdE(M,N,P,Q) = multiplier * mB[M][N] * (M==P)*(N==Q)
00128 + 2*multiplier*mB[M][N]*mB[P][Q]*E(M,N)*E(P,Q)
00129 + mCompressibilityParam * (J*log(J) + J) * invC_transformed(M,N) * invC_transformed(P,Q)
00130 - mCompressibilityParam * 2*J*log(J) * invC_transformed(M,P) * invC_transformed(Q,N);
00131 }
00132 }
00133 }
00134 }
00135 }
00136
00137
00138 this->TransformStressAndStressDerivative(rT, rDTdE, computeDTdE);
00139 }
00140
00142
00144
00145 template class CompressibleExponentialLaw<2>;
00146 template class CompressibleExponentialLaw<3>;