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 "SchmidCostaExponentialLaw2d.hpp"
00030
00031 SchmidCostaExponentialLaw2d::SchmidCostaExponentialLaw2d()
00032 {
00033 mA = 0.221;
00034
00035
00036 double bff = 42.5;
00037 double bfs = 11.0;
00038 double bss = 18.6;
00039
00040 mB.resize(2);
00041 mB[0].resize(2);
00042 mB[1].resize(2);
00043
00044 mB[0][0] = bff;
00045 mB[0][1] = bfs;
00046 mB[1][0] = bfs;
00047 mB[1][1] = bss;
00048
00049 for (unsigned M=0; M<2; M++)
00050 {
00051 for (unsigned N=0; N<2; N++)
00052 {
00053 mIdentity(M,N) = M==N ? 1.0 : 0.0;
00054 }
00055 }
00056
00057 mpChangeOfBasisMatrix = NULL;
00058 }
00059
00060 void SchmidCostaExponentialLaw2d::ComputeStressAndStressDerivative(c_matrix<double,2,2>& rC,
00061 c_matrix<double,2,2>& rInvC,
00062 double pressure,
00063 c_matrix<double,2,2>& rT,
00064 FourthOrderTensor<2>& rDTdE,
00065 bool computeDTdE)
00066 {
00067 static c_matrix<double,2,2> C_transformed;
00068 static c_matrix<double,2,2> invC_transformed;
00069
00070
00071
00072
00073
00074
00075
00076 if(mpChangeOfBasisMatrix)
00077 {
00078
00079 C_transformed = prod(trans(*mpChangeOfBasisMatrix),(c_matrix<double,2,2>)prod(rC,*mpChangeOfBasisMatrix));
00080 invC_transformed = prod(trans(*mpChangeOfBasisMatrix),(c_matrix<double,2,2>)prod(rInvC,*mpChangeOfBasisMatrix));
00081 }
00082 else
00083 {
00084 C_transformed = rC;
00085 invC_transformed = rInvC;
00086 }
00087
00088
00089
00090 c_matrix<double,2,2> E = 0.5*(C_transformed - mIdentity);
00091
00092 double Q = 0;
00093 for (unsigned M=0; M<2; M++)
00094 {
00095 for (unsigned N=0; N<2; N++)
00096 {
00097 Q += mB[M][N]*E(M,N)*E(M,N);
00098 }
00099 }
00100
00101 double multiplier = mA*exp(Q-1);
00102 rDTdE.Zero();
00103
00104 for (unsigned M=0; M<2; M++)
00105 {
00106 for (unsigned N=0; N<2; N++)
00107 {
00108 rT(M,N) = multiplier*mB[M][N]*E(M,N) - pressure*invC_transformed(M,N);
00109
00110 if (computeDTdE)
00111 {
00112
00113 for (unsigned P=0; P<2; P++)
00114 {
00115 for (unsigned Q=0; Q<2; Q++)
00116 {
00117 rDTdE(M,N,P,Q) = multiplier * mB[M][N] * (M==P)*(N==Q)
00118 + 2*multiplier*mB[M][N]*mB[P][Q]*E(M,N)*E(P,Q)
00119 + 2*pressure*invC_transformed(M,P)*invC_transformed(Q,N);
00120 }
00121 }
00122 }
00123 }
00124 }
00125
00126
00127 if(mpChangeOfBasisMatrix)
00128 {
00129 static c_matrix<double,2,2> T_transformed_times_Ptrans;
00130 T_transformed_times_Ptrans = prod(rT, trans(*mpChangeOfBasisMatrix));
00131
00132 rT = prod(*mpChangeOfBasisMatrix, T_transformed_times_Ptrans);
00133
00134
00135 if (computeDTdE)
00136 {
00137 static FourthOrderTensor<2> temp;
00138 temp.SetAsProduct(rDTdE, *mpChangeOfBasisMatrix, 0);
00139 rDTdE.SetAsProduct(temp, *mpChangeOfBasisMatrix, 1);
00140 temp.SetAsProduct(rDTdE, *mpChangeOfBasisMatrix, 2);
00141 rDTdE.SetAsProduct(temp, *mpChangeOfBasisMatrix, 3);
00142 }
00143 }
00144 }
00145
00146 double SchmidCostaExponentialLaw2d::GetA()
00147 {
00148 return mA;
00149 }
00150
00151 std::vector<std::vector<double> > SchmidCostaExponentialLaw2d::GetB()
00152 {
00153 return mB;
00154 }
00155
00156 double SchmidCostaExponentialLaw2d::GetZeroStrainPressure()
00157 {
00158 return 0.0;
00159 }