Chaste Commit::ca8ccdedf819b6e02855bc0e8e6f50bdecbc5208
SchmidCostaExponentialLaw2d.cpp
1/*
2
3Copyright (c) 2005-2024, University of Oxford.
4All rights reserved.
5
6University of Oxford means the Chancellor, Masters and Scholars of the
7University of Oxford, having an administrative office at Wellington
8Square, Oxford OX1 2JD, UK.
9
10This file is part of Chaste.
11
12Redistribution and use in source and binary forms, with or without
13modification, 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
23THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
24AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
27LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
28CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
29GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
32OF 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
130std::vector<std::vector<double> > SchmidCostaExponentialLaw2d::GetB()
131{
132 return mB;
133}
134
136{
137 return 0.0;
138}
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)
void TransformStressAndStressDerivative(c_matrix< double, DIM, DIM > &rT, FourthOrderTensor< DIM, DIM, DIM, DIM > &rDTdE, bool transformDTdE)
std::vector< std::vector< double > > GetB()
std::vector< std::vector< double > > mB
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)