33 #ifndef SKIN_LAW_IMPL_H_
34 #define SKIN_LAW_IMPL_H_
42 #define HOOKE_PROFILE_FUNC() PROFILE_FUNC_GROUP("Hooke")
43 #define HOOKE_PROFILE_BEGIN(name) PROFILE_BEGIN_GROUP(name, "Hooke")
44 #define HOOKE_PROFILE_END() PROFILE_END()
46 #define HOOKE_PROFILE_FUNC()
47 #define HOOKE_PROFILE_BEGIN(name)
48 #define HOOKE_PROFILE_END()
52 namespace SmallStrainMechanics{
54 template <
typename TDomain>
60 set_hooke_elasticity_tensor(-10000, -100000);
63 if (m_spElastTensorFunct.invalid())
64 UG_THROW(
"No elasticity tensor set in SkinMaterialLaw::init()!");
66 base_type::m_bInit =
true;
69 template <
typename TDomain>
75 for(
size_t i = 0; i < (size_t)
dim; ++i)
76 for(
size_t j = 0; j < (size_t)
dim; ++j)
77 strainTens[i][j] = 0.5 * (GradU[i][j] + GradU[j][i]);
81 template <
typename TDomain>
92 if (0.9375 >= y && y > 0.8125) _y = 0.875;
93 else if (0.8125 >= y && y > 0.6875) _y = 0.75;
94 else if (0.6875 >= y && y > 0.5625) _y = 0.625;
95 else if (0.5625 >= y && y > 0.4375) _y = 0.5;
96 else if (0.4375 >= y && y > 0.3125) _y = 0.375;
97 else if (0.3125 >= y && y > 0.1875) _y = 0.25;
98 else if (0.1875 >= y && y > 0.0625) _y = 0.125;
100 if(_y == 1.0)
UG_THROW(
"Position not found: " << y);
102 const number lambda_top = 1.0, lambda_bottom = 2.0;
103 const number mu_top = 0.1, mu_bottom = 0.2;
105 const number mu = mu_bottom * (1.0 - _y) + mu_top * (_y);
106 const number lambda = lambda_bottom * (1.0 - _y) + lambda_top * (_y);
119 strainTensor(strainTens, GradU);
121 MatScale(stressTens, 2*mu, strainTens);
124 for (
int d = 0; d <
dim; ++d)
125 stressTens[d][d] += lambda * trace;
129 template <
typename TDomain>
137 if (0.9375 >= y && y > 0.8125) _y = 0.875;
138 else if (0.8125 >= y && y > 0.6875) _y = 0.75;
139 else if (0.6875 >= y && y > 0.5625) _y = 0.625;
140 else if (0.5625 >= y && y > 0.4375) _y = 0.5;
141 else if (0.4375 >= y && y > 0.3125) _y = 0.375;
142 else if (0.3125 >= y && y > 0.1875) _y = 0.25;
143 else if (0.1875 >= y && y > 0.0625) _y = 0.125;
145 if(_y == 1.0)
UG_THROW(
"Position not found: " << y);
147 const number lambda_top = 1.0, lambda_bottom = 2.0;
148 const number mu_top = 0.1, mu_bottom = 0.2;
150 const number mu = mu_bottom * (1.0 - _y) + mu_top * (_y);
151 const number lambda = lambda_bottom * (1.0 - _y) + lambda_top * (_y);
153 set_hooke_elasticity_tensor(lambda, mu);
155 return m_spElastTensorFunct;
159 template <
typename TDomain>
164 if(
dim != 2)
UG_THROW(
"Plain Stress Tensor only for 2 dimensions" );
169 for (
size_t i = 0; i < (size_t)
dim; ++i)
170 for (
size_t j = 0; j < (size_t)
dim; ++j)
171 for (
size_t k = 0; k < (size_t)
dim; ++k)
172 for (
size_t l = 0; l < (size_t)
dim; ++l)
173 elastTensorFunct[i][j][k][l] = 0.0;
177 elastTensorFunct[0][0][0][0] = E/(1-nu*nu);
178 elastTensorFunct[1][1][1][1] = E/(1-nu*nu);
180 elastTensorFunct[0][0][1][1] =
181 elastTensorFunct[1][1][0][0] = (E*nu)/(1-nu*nu);
183 elastTensorFunct[0][1][0][1] =
184 elastTensorFunct[1][0][0][1] =
185 elastTensorFunct[0][1][1][0] =
186 elastTensorFunct[1][0][1][0] = E*(1-nu)/(1-nu*nu);
190 m_spElastTensorFunct = spElastTens;
192 std::stringstream ss;
193 ss <<
"Hooke Elasticity Isotropic (PLAIN STRESS): \n";
194 ss <<
" young modulus (Elastizitaetsmodul): " << E <<
"\n";
195 ss <<
" poisson ratio (Querkontraktionszahl) v: " << nu <<
"\n";
196 ss <<
" Elasticity Tensor = " << elastTensorFunct <<
"\n";
197 m_materialConfiguration = ss.str();
200 template <
typename TDomain>
205 if(
dim != 2)
UG_THROW(
"Plain Strain Tensor only for 2 dimensions" );
207 set_hooke_elasticity_tensor_E_nu(E, nu);
211 template <
typename TDomain>
216 number lambda = (E*nu) / ((1+nu)*(1-2*nu));
218 set_hooke_elasticity_tensor(lambda, mu);
221 template <
typename TDomain>
233 for (
size_t i = 0; i < (size_t)
dim; ++i)
234 for (
size_t j = 0; j < (size_t)
dim; ++j)
235 for (
size_t k = 0; k < (size_t)
dim; ++k)
236 for (
size_t l = 0; l < (size_t)
dim; ++l)
238 elastTensorFunct[i][j][k][l] = 0.0;
240 if ((i == j) && (k == l))
241 elastTensorFunct[i][j][k][l] += lambda;
243 if ((i == k) && (j == l))
244 elastTensorFunct[i][j][k][l] += mu;
246 if ((i == l) && (j == k))
247 elastTensorFunct[i][j][k][l] += mu;
253 m_spElastTensorFunct = spElastTens;
255 number E = mu * (3.0 * lambda + 2.0 * mu)/(lambda + mu);
256 number v = 0.5 * lambda/(lambda + mu);
257 number kappa = lambda + 2.0/3.0 * mu;
259 std::stringstream ss;
260 ss <<
"Hooke Elasticity Isotropic: \n";
261 ss <<
" Lame`s first constant lambda: " << lambda <<
"\n";
262 ss <<
" Lame`s second constant mue (sometimes 'G', shear modulus) (Schubmodul): " << mu <<
"\n";
263 ss <<
" This setting equals: \n";
264 ss <<
" young modulus (Elastizitaetsmodul): " << E <<
"\n";
265 ss <<
" poisson ratio (Querkontraktionszahl) v: " << v <<
"\n";
266 ss <<
" bulk modulus (Kompressionsmodul): " << kappa <<
"\n";
267 ss <<
" Elasticity Tensor = " << elastTensorFunct <<
"\n";
268 m_materialConfiguration = ss.str();
MathMatrix< 1, 1, T >::value_type Trace(const MathMatrix< 1, 1, T > &m)
void MatScale(matrix_t &mOut, typename matrix_t::value_type s, const matrix_t &m)
void init()
Definition: skin_law_impl.h:57
void strainTensor(MathMatrix< dim, dim > &strainTens, const MathMatrix< dim, dim > &GradU)
Definition: skin_law_impl.h:73
void set_hooke_elasticity_tensor(const number lambda, const number mu)
Definition: skin_law_impl.h:224
virtual SmartPtr< MathTensor4< dim, dim, dim, dim > > elasticityTensor()
computes the elasticity tensor; commonly denoted by C
Definition: skin_law.h:113
void set_hooke_elasticity_tensor_plain_strain_E_nu(const number E, const number nu)
Definition: skin_law_impl.h:203
void set_hooke_elasticity_tensor_plain_stress_E_nu(const number E, const number nu)
Definition: skin_law_impl.h:162
void set_hooke_elasticity_tensor_E_nu(const number E, const number nu)
Definition: skin_law_impl.h:214
void stressTensor(MathMatrix< dim, dim > &stressTens, const size_t ip, const MathMatrix< dim, dim > &GradU)
computes the cauchy stress tensor sigma at an integration point 'ip'
Definition: skin_law.h:105
#define HOOKE_PROFILE_BEGIN(name)
Definition: skin_law_impl.h:43