RFFGen
 All Classes Namespaces Files Functions Typedefs Enumerations Groups
muscleTissue_Martins.hh
Go to the documentation of this file.
1 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2 /* */
3 /* This file is part of the C++-library RFFGen. */
4 /* Copyright 2015 Lars Lubkoll */
5 /* */
6 /* RFFGen is free software: you can redistribute it and/or modify */
7 /* it under the terms of the GNU General Public License as published by */
8 /* the Free Software Foundation, either version 3 of the License, or */
9 /* (at your option) any later version. */
10 /* */
11 /* RFFGen is distributed in the hope that it will be useful, */
12 /* but WITHOUT ANY WARRANTY; without even the implied warranty of */
13 /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
14 /* GNU General Public License for more details. */
15 /* */
16 /* You should have received a copy of the GNU General Public License */
17 /* along with RFFGen. If not, see <http://www.gnu.org/licenses/>. */
18 /* */
19 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
20 
21 #ifndef RFFGEN_MUSCLE_TISSUE_MARTINS_HH
22 #define RFFGEN_MUSCLE_TISSUE_MARTINS_HH
23 
24 #include "../../LinearAlgebra/modifiedPrincipalInvariants.hh"
25 #include "../../LinearAlgebra/modifiedMixedInvariants.hh"
26 #include "../../LinearAlgebra/strainTensor.hh"
27 #include "../../LinearAlgebra/tensorProduct.hh"
28 #include "../../CMath/exp.hh"
29 #include "../volumetricPenaltyFunctions.hh"
30 #include "../../generate.hh"
31 
38 namespace RFFGen
39 {
43  namespace MuscleTissueDetail
44  {
45  template < class Matrix , int offset = LinearAlgebra::dimension<Matrix>() >
46  auto generateIncompressibleMuscleTissue_Martins(double c, double b, double A, double a, const Matrix& M, const Matrix& F )
47  {
48  using CMath::exp;
49  using namespace LinearAlgebra;
50  auto i1 = ShiftedFirstModifiedPrincipalInvariant<Matrix,offset>();
51  auto i6 = ShiftedThirdModifiedMixedInvariant<Matrix>(F,M);
52 
53  return ( c * ( exp( b * i1 ) - 1 ) +
54  A * ( exp( a * ( i6^2 ) ) - 1 )
55  ) << LeftCauchyGreenStrainTensor<Matrix>(F);
56  }
57  }
77  template < class Matrix , int offset = LinearAlgebra::dimension<Matrix>()>
78  auto incompressibleMuscleTissue_Martins(double c, double b, double A, double a, const Matrix& M, const Matrix& F)
79  {
80  return MuscleTissueDetail::generateIncompressibleMuscleTissue_Martins<Matrix,offset>(c,b,A,a,M,F);
81  }
82 
97  template < class Matrix , int offset = LinearAlgebra::dimension<Matrix>()>
98  auto incompressibleMuscleTissue_Martins(const Matrix& M, const Matrix& F)
99  {
100  return incompressibleMuscleTissue_Martins<Matrix,offset>(0.387, 23.46, 0.584, 12.43, M, F);
101  }
102 
120  template < class Inflation , class Compression , class Matrix , int offset = LinearAlgebra::dimension<Matrix>()>
121  auto compressibleMuscleTissue_Martins(double c, double b, double A, double a, double d0, double d1, const Matrix& M, const Matrix& F)
122  {
123  return MuscleTissueDetail::generateIncompressibleMuscleTissue_Martins<Matrix,offset>(c,b,A,a,M,F) + volumetricPenalty<Inflation,Compression>(d0,d1,F);
124  }
125 
142  template < class Inflation , class Compression , class Matrix , int offset = LinearAlgebra::dimension<Matrix>()>
143  auto compressibleMuscleTissue_Martins(double d0, double d1, const Matrix& M, const Matrix& F)
144  {
145  return compressibleMuscleTissue_Martins<Inflation,Compression,Matrix,offset>(0.387, 23.46, 0.584, 12.43, d0, d1, M, F);
146  }
147 }
148 
149 #endif // RFFGEN_MUSCLE_TISSUE_MARTINS_HH
auto compressibleMuscleTissue_Martins(double c, double b, double A, double a, double d0, double d1, const Matrix &M, const Matrix &F)
Compressible version of the model for muscle tissue of Martins et al.: A numerical model of passive a...
Definition: muscleTissue_Martins.hh:121
auto incompressibleMuscleTissue_Martins(double c, double b, double A, double a, const Matrix &M, const Matrix &F)
Incompressible version of the model for muscle tissue of Martins et al.: A numerical model of passive...
Definition: muscleTissue_Martins.hh:78