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 "AbstractIncompressibleMaterialLaw.hpp"
00030
00031 template<unsigned DIM>
00032 AbstractIncompressibleMaterialLaw<DIM>::~AbstractIncompressibleMaterialLaw()
00033 {
00034 }
00035
00036 template<unsigned DIM>
00037 void AbstractIncompressibleMaterialLaw<DIM>::ComputeCauchyStress(c_matrix<double,DIM,DIM>& F, double pressure, c_matrix<double,DIM,DIM>& sigma)
00038 {
00039 double detF = Determinant(F);
00040
00041 c_matrix<double,DIM,DIM> C = prod(trans(F),F);
00042 c_matrix<double,DIM,DIM> invC = Inverse(C);
00043
00044 c_matrix<double,DIM,DIM> T;
00045
00046 static FourthOrderTensor2<DIM> dTdE;
00047
00048 ComputeStressAndStressDerivative(C,invC,pressure,T,dTdE,false);
00049
00050
00051
00052
00053 for (unsigned i=0; i<DIM; i++)
00054 {
00055 for (unsigned j=0; j<DIM; j++)
00056 {
00057 sigma(i,j) = 0.0;
00058 for (unsigned M=0; M<DIM; M++)
00059 {
00060 for (unsigned N=0; N<DIM; N++)
00061 {
00062 sigma(i,j) += F(i,M)*T(M,N)*F(j,N);
00063 }
00064 }
00065 sigma(i,j) /= detF;
00066 }
00067 }
00068 }
00069
00070 template<unsigned DIM>
00071 void AbstractIncompressibleMaterialLaw<DIM>::Compute1stPiolaKirchoffStress(c_matrix<double,DIM,DIM>& F, double pressure, c_matrix<double,DIM,DIM>& S)
00072 {
00073 c_matrix<double,DIM,DIM> C = prod(trans(F),F);
00074 c_matrix<double,DIM,DIM> invC = Inverse(C);
00075
00076 c_matrix<double,DIM,DIM> T;
00077
00078 static FourthOrderTensor2<DIM> dTdE;
00079
00080 ComputeStressAndStressDerivative(C,invC,pressure,T,dTdE,false);
00081
00082 S = prod(T,trans(F));
00083 }
00084
00085 template<unsigned DIM>
00086 void AbstractIncompressibleMaterialLaw<DIM>::Compute2ndPiolaKirchoffStress(c_matrix<double,DIM,DIM>& C, double pressure, c_matrix<double,DIM,DIM>& T)
00087 {
00088 c_matrix<double,DIM,DIM> invC = Inverse(C);
00089
00090 static FourthOrderTensor2<DIM> dTdE;
00091
00092 ComputeStressAndStressDerivative(C,invC,pressure,T,dTdE,false);
00093 }
00094
00095 template<unsigned DIM>
00096 void AbstractIncompressibleMaterialLaw<DIM>::ScaleMaterialParameters(double scaleFactor)
00097 {
00098 #define COVERAGE_IGNORE
00099 EXCEPTION("[the material law you are using]::ScaleMaterialParameters() has not been implemented\n");
00100 #undef COVERAGE_IGNORE
00101 }
00102
00103
00105
00107
00108
00109 template class AbstractIncompressibleMaterialLaw<2>;
00110 template class AbstractIncompressibleMaterialLaw<3>;