Chaste  Release::3.4
SchmidCostaExponentialLaw2d.cpp
1 /*
2 
3 Copyright (c) 2005-2016, University of Oxford.
4 All rights reserved.
5 
6 University of Oxford means the Chancellor, Masters and Scholars of the
7 University of Oxford, having an administrative office at Wellington
8 Square, Oxford OX1 2JD, UK.
9 
10 This file is part of Chaste.
11 
12 Redistribution and use in source and binary forms, with or without
13 modification, are permitted provided that the following conditions are met:
14  * Redistributions of source code must retain the above copyright notice,
15  this list of conditions and the following disclaimer.
16  * Redistributions in binary form must reproduce the above copyright notice,
17  this list of conditions and the following disclaimer in the documentation
18  and/or other materials provided with the distribution.
19  * Neither the name of the University of Oxford nor the names of its
20  contributors may be used to endorse or promote products derived from this
21  software without specific prior written permission.
22 
23 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
24 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26 ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
27 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
28 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
29 GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30 HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31 LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
32 OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 
34 */
35 
36 #include "SchmidCostaExponentialLaw2d.hpp"
37 
39 {
40  mA = 0.221; // kiloPascals, presumably, although the paper doesn't say.
41  // gives results matching Pole-zero anyway.
42  // Obtained from Table 1 of Schmid reference (see class doxygen), the mu (mean) value.
43 
44  double bff = 42.5; // dimensionless
45  double bfs = 11.0; // dimensionless
46  double bss = 18.6; // dimensionless
47 
48  mB.resize(2);
49  mB[0].resize(2);
50  mB[1].resize(2);
51 
52  mB[0][0] = bff;
53  mB[0][1] = bfs;
54  mB[1][0] = bfs;
55  mB[1][1] = bss;
56 
57  for (unsigned M=0; M<2; M++)
58  {
59  for (unsigned N=0; N<2; N++)
60  {
61  mIdentity(M,N) = M==N ? 1.0 : 0.0;
62  }
63  }
64 }
65 
67  c_matrix<double,2,2>& rInvC,
68  double pressure,
69  c_matrix<double,2,2>& rT,
71  bool computeDTdE)
72 {
73  static c_matrix<double,2,2> C_transformed;
74  static c_matrix<double,2,2> invC_transformed;
75 
76  // The material law parameters are set up assuming the fibre direction is (1,0,0)
77  // and sheet direction is (0,1,0), so we have to transform C,inv(C),and T.
78  // Let P be the change-of-basis matrix P = (\mathbf{m}_f, \mathbf{m}_s, \mathbf{m}_n).
79  // The transformed C for the fibre/sheet basis is C* = P^T C P.
80  // We then compute T* = T*(C*), and then compute T = P T* P^T.
81 
82  ComputeTransformedDeformationTensor(rC, rInvC, C_transformed, invC_transformed);
83 
84  // Compute T*
85 
86  c_matrix<double,2,2> E = 0.5*(C_transformed - mIdentity);
87 
88  double QQ = 0;
89  for (unsigned M=0; M<2; M++)
90  {
91  for (unsigned N=0; N<2; N++)
92  {
93  QQ += mB[M][N]*E(M,N)*E(M,N);
94  }
95  }
96 
97  double multiplier = mA*exp(QQ)/2;
98  rDTdE.Zero();
99 
100  for (unsigned M=0; M<2; M++)
101  {
102  for (unsigned N=0; N<2; N++)
103  {
104  rT(M,N) = multiplier*mB[M][N]*E(M,N) - pressure*invC_transformed(M,N);
105 
106  if (computeDTdE)
107  {
108  for (unsigned P=0; P<2; P++)
109  {
110  for (unsigned Q=0; Q<2; Q++)
111  {
112  rDTdE(M,N,P,Q) = multiplier * mB[M][N] * (M==P)*(N==Q)
113  + 2*multiplier*mB[M][N]*mB[P][Q]*E(M,N)*E(P,Q)
114  + 2*pressure*invC_transformed(M,P)*invC_transformed(Q,N);
115  }
116  }
117  }
118  }
119  }
120 
121  // Now do: T = P T* P^T and dTdE_{MNPQ} = P_{Mm}P_{Nn}P_{Pp}P_{Qq} dT*dE*_{mnpq}
122  this->TransformStressAndStressDerivative(rT, rDTdE, computeDTdE);
123 }
124 
126 {
127  return mA;
128 }
129 
130 std::vector<std::vector<double> > SchmidCostaExponentialLaw2d::GetB()
131 {
132  return mB;
133 }
134 
136 {
137  return 0.0;
138 }
void TransformStressAndStressDerivative(c_matrix< double, DIM, DIM > &rT, FourthOrderTensor< DIM, DIM, DIM, DIM > &rDTdE, bool transformDTdE)
void ComputeStressAndStressDerivative(c_matrix< double, 2, 2 > &rC, c_matrix< double, 2, 2 > &rInvC, double pressure, c_matrix< double, 2, 2 > &rT, FourthOrderTensor< 2, 2, 2, 2 > &rDTdE, bool computeDTdE)
std::vector< std::vector< double > > mB
void ComputeTransformedDeformationTensor(c_matrix< double, DIM, DIM > &rC, c_matrix< double, DIM, DIM > &rInvC, c_matrix< double, DIM, DIM > &rCTransformed, c_matrix< double, DIM, DIM > &rInvCTransformed)
std::vector< std::vector< double > > GetB()