GRINS-0.8.0
hyperelasticity.C
Go to the documentation of this file.
1 //-----------------------------------------------------------------------bl-
2 //--------------------------------------------------------------------------
3 //
4 // GRINS - General Reacting Incompressible Navier-Stokes
5 //
6 // Copyright (C) 2014-2017 Paul T. Bauman, Roy H. Stogner
7 // Copyright (C) 2010-2013 The PECOS Development Team
8 //
9 // This library is free software; you can redistribute it and/or
10 // modify it under the terms of the Version 2.1 GNU Lesser General
11 // Public License as published by the Free Software Foundation.
12 //
13 // This library is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 // Lesser General Public License for more details.
17 //
18 // You should have received a copy of the GNU Lesser General Public
19 // License along with this library; if not, write to the Free Software
20 // Foundation, Inc. 51 Franklin Street, Fifth Floor,
21 // Boston, MA 02110-1301 USA
22 //
23 //-----------------------------------------------------------------------el-
24 
25 // This class
26 #include "grins/hyperelasticity.h"
27 
28 // libMesh
29 #include "libmesh/tensor_value.h"
30 
31 namespace GRINS
32 {
33 
34  template <typename StrainEnergy>
36  : _W(input)
37  {
38  return;
39  }
40 
41  template <typename StrainEnergy>
43  {
44  return;
45  }
46 
47  template <typename StrainEnergy>
54  {
55  stress.zero();
56 
57  // Compute strain invariants
58  libMesh::Real I3 = (g_contra*G_cov).det();
59 
60  libMesh::Real I1 = 0.0;
61  libMesh::Real I2 = 0.0;
62  for( unsigned int i = 0; i < dim; i++ )
63  {
64  for( unsigned int j = 0; j < dim; j++ )
65  {
66  I1 += g_contra(i,j)*G_cov(i,j);
67  I2 += G_contra(i,j)*g_cov(i,j);
68  }
69  }
70 
71  I2 *= I3;
72 
73  libMesh::Real dWdI1 = _W.dI1(I1,I2,I3);
74  libMesh::Real dWdI2 = _W.dI2(I1,I2,I3);
75  libMesh::Real dWdI3 = _W.dI3(I1,I2,I3);
76 
77  // Now compute stress
78  for( unsigned int i = 0; i < dim; i++ )
79  {
80  for( unsigned int j = 0; j < dim; j++ )
81  {
82  for( unsigned int k = 0; k < dim; k++ )
83  {
84  for( unsigned int l = 0; l < dim; l++ )
85  {
86  stress(i,j) += 2.0*dWdI1*g_contra(i,j)
87  + 2.0*dWdI2*(I1*g_contra(i,j) - g_contra(i,k)*g_contra(j,l)*G_cov(k,l))
88  + 2.0*dWdI3*G_contra(i,j);
89  }
90  }
91  }
92  }
93 
94  return;
95  }
96 
97  template <typename StrainEnergy>
101  const libMesh::TensorValue<libMesh::Real>& G_contra,
104  ElasticityTensor& C )
105  {
106  libmesh_not_implemented();
107  return;
108  }
109 
110  template <typename StrainEnergy>
112  const libMesh::TensorValue<libMesh::Real>& /*g_cov*/,
113  const libMesh::TensorValue<libMesh::Real>& /*G_contra*/,
114  const libMesh::TensorValue<libMesh::Real>& /*G_cov*/ )
115  {
116  libmesh_not_implemented();
117  return 0.0;
118  }
119 
120 } // end namespace GRINS
void compute_stress_imp(unsigned int dim, const libMesh::TensorValue< libMesh::Real > &g_contra, const libMesh::TensorValue< libMesh::Real > &g_cov, const libMesh::TensorValue< libMesh::Real > &G_contra, const libMesh::TensorValue< libMesh::Real > &G_cov, libMesh::TensorValue< libMesh::Real > &stress)
GRINS namespace.
void compute_stress_and_elasticity_imp(unsigned int dim, const libMesh::TensorValue< libMesh::Real > &g_contra, const libMesh::TensorValue< libMesh::Real > &g_cov, const libMesh::TensorValue< libMesh::Real > &G_contra, const libMesh::TensorValue< libMesh::Real > &G_cov, libMesh::TensorValue< libMesh::Real > &stress, ElasticityTensor &C)
libMesh::Real compute_33_stress_imp(const libMesh::TensorValue< libMesh::Real > &g_contra, const libMesh::TensorValue< libMesh::Real > &g_cov, const libMesh::TensorValue< libMesh::Real > &G_contra, const libMesh::TensorValue< libMesh::Real > &G_cov)
Hyperelasticity(const GetPot &input)

Generated on Tue Dec 19 2017 12:47:28 for GRINS-0.8.0 by  doxygen 1.8.9.1