SchmidCostaExponentialLaw2d.cpp

00001 /*
00002 
00003 Copyright (C) University of Oxford, 2005-2011
00004 
00005 University of Oxford means the Chancellor, Masters and Scholars of the
00006 University of Oxford, having an administrative office at Wellington
00007 Square, Oxford OX1 2JD, UK.
00008 
00009 This file is part of Chaste.
00010 
00011 Chaste is free software: you can redistribute it and/or modify it
00012 under the terms of the GNU Lesser General Public License as published
00013 by the Free Software Foundation, either version 2.1 of the License, or
00014 (at your option) any later version.
00015 
00016 Chaste is distributed in the hope that it will be useful, but WITHOUT
00017 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00018 FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
00019 License for more details. The offer of Chaste under the terms of the
00020 License is subject to the License being interpreted in accordance with
00021 English Law and subject to any action against the University of Oxford
00022 being under the jurisdiction of the English Courts.
00023 
00024 You should have received a copy of the GNU Lesser General Public License
00025 along with Chaste. If not, see <http://www.gnu.org/licenses/>.
00026 
00027 */
00028 
00029 #include "SchmidCostaExponentialLaw2d.hpp"
00030 
00031 SchmidCostaExponentialLaw2d::SchmidCostaExponentialLaw2d()
00032 {
00033     mA = 0.221;    // kiloPascals, presumably, although the paper doesn't say.
00034                    // gives results matching Pole-zero anyway.
00035                    // Obtained from Table 1 of Schmid reference (see class doxygen), the mu (mean) value.
00036 
00037     double bff = 42.5; // dimensionless
00038     double bfs = 11.0; // dimensionless
00039     double bss = 18.6; // dimensionless
00040 
00041     mB.resize(2);
00042     mB[0].resize(2);
00043     mB[1].resize(2);
00044 
00045     mB[0][0] = bff;
00046     mB[0][1] = bfs;
00047     mB[1][0] = bfs;
00048     mB[1][1] = bss;
00049 
00050     for (unsigned M=0; M<2; M++)
00051     {
00052         for (unsigned N=0; N<2; N++)
00053         {
00054             mIdentity(M,N) = M==N ? 1.0 : 0.0;
00055         }
00056     }
00057 }
00058 
00059 void SchmidCostaExponentialLaw2d::ComputeStressAndStressDerivative(c_matrix<double,2,2>& rC,
00060                                                                    c_matrix<double,2,2>& rInvC,
00061                                                                    double                pressure,
00062                                                                    c_matrix<double,2,2>& rT,
00063                                                                    FourthOrderTensor<2,2,2,2>& rDTdE,
00064                                                                    bool                  computeDTdE)
00065 {
00066     static c_matrix<double,2,2> C_transformed;
00067     static c_matrix<double,2,2> invC_transformed;
00068 
00069     // The material law parameters are set up assuming the fibre direction is (1,0,0)
00070     // and sheet direction is (0,1,0), so we have to transform C,inv(C),and T.
00071     // Let P be the change-of-basis matrix P = (\mathbf{m}_f, \mathbf{m}_s, \mathbf{m}_n).
00072     // The transformed C for the fibre/sheet basis is C* = P^T C P.
00073     // We then compute T* = T*(C*), and then compute T = P T* P^T.
00074 
00075     ComputeTransformedDeformationTensor(rC, rInvC, C_transformed, invC_transformed);
00076 
00077 
00078     // compute T*
00079 
00080     c_matrix<double,2,2> E = 0.5*(C_transformed - mIdentity);
00081 
00082     double Q = 0;
00083     for (unsigned M=0; M<2; M++)
00084     {
00085         for (unsigned N=0; N<2; N++)
00086         {
00087             Q += mB[M][N]*E(M,N)*E(M,N);
00088         }
00089     }
00090 
00091     double multiplier = mA*exp(Q)/2;
00092     rDTdE.Zero();
00093 
00094     for (unsigned M=0; M<2; M++)
00095     {
00096         for (unsigned N=0; N<2; N++)
00097         {
00098             rT(M,N) = multiplier*mB[M][N]*E(M,N) - pressure*invC_transformed(M,N);
00099 
00100             if (computeDTdE)
00101             {
00102                 for (unsigned P=0; P<2; P++)
00103                 {
00104                     for (unsigned Q=0; Q<2; Q++)
00105                     {
00106                         rDTdE(M,N,P,Q) =   multiplier * mB[M][N] * (M==P)*(N==Q)
00107                                         +  2*multiplier*mB[M][N]*mB[P][Q]*E(M,N)*E(P,Q)
00108                                         +  2*pressure*invC_transformed(M,P)*invC_transformed(Q,N);
00109                     }
00110                 }
00111             }
00112         }
00113     }
00114 
00115     // now do:   T = P T* P^T   and   dTdE_{MNPQ}  =  P_{Mm}P_{Nn}P_{Pp}P_{Qq} dT*dE*_{mnpq}
00116     this->TransformStressAndStressDerivative(rT, rDTdE, computeDTdE);
00117 }
00118 
00119 double SchmidCostaExponentialLaw2d::GetA()
00120 {
00121     return mA;
00122 }
00123 
00124 std::vector<std::vector<double> > SchmidCostaExponentialLaw2d::GetB()
00125 {
00126     return mB;
00127 }
00128 
00129 double SchmidCostaExponentialLaw2d::GetZeroStrainPressure()
00130 {
00131     return 0.0;
00132 }

Generated on Tue May 31 14:31:49 2011 for Chaste by  doxygen 1.5.5