44 #define HOOKE_PROFILE_FUNC() PROFILE_FUNC_GROUP("Hooke")
45 #define HOOKE_PROFILE_BEGIN(name) PROFILE_BEGIN_GROUP(name, "Hooke")
46 #define HOOKE_PROFILE_END() PROFILE_END()
48 #define HOOKE_PROFILE_FUNC()
49 #define HOOKE_PROFILE_BEGIN(name)
50 #define HOOKE_PROFILE_END()
54 namespace SmallStrainMechanics{
56 template <
typename TDomain>
62 if (m_spElastTensorFunct.invalid())
63 UG_THROW(
"No elasticity tensor set in HookeLaw::init()!");
65 base_type::m_bInit =
true;
68 template <
typename TDomain>
78 strainTensor(strainTens, GradU);
81 for(
size_t i = 0; i < (size_t)
dim; ++i)
82 for(
size_t j = 0; j < (size_t)
dim; ++j)
84 stressTens[i][j] = 0.0;
86 for(
size_t k = 0; k < (size_t)
dim; ++k)
87 for(
size_t l = 0; l < (size_t)
dim; ++l)
88 stressTens[i][j] += (*m_spElastTensorFunct)[i][j][k][l]
95 template <
typename TDomain>
102 return m_spElastTensorFunct;
105 template <
typename TDomain>
111 for(
size_t i = 0; i < (size_t)
dim; ++i)
112 for(
size_t j = 0; j < (size_t)
dim; ++j)
113 strainTens[i][j] = 0.5 * (GradU[i][j] + GradU[j][i]);
118 template <
typename TDomain>
127 if(
dim != 2)
UG_THROW(
"Orthotrope Tensor PLAIN STRESS only for 2 dimensions" );
132 for (
size_t i = 0; i < (size_t)
dim; ++i)
133 for (
size_t j = 0; j < (size_t)
dim; ++j)
134 for (
size_t k = 0; k < (size_t)
dim; ++k)
135 for (
size_t l = 0; l < (size_t)
dim; ++l)
136 elastTensorFunct[i][j][k][l] = 0.0;
139 const number v21 = (E2/E1) * v12;
143 const number D = 1 - v12*v21;
148 elastTensorFunct[0][0][0][0] = E1/D;
149 elastTensorFunct[1][1][1][1] = E2/D;
151 elastTensorFunct[0][0][1][1] =
152 elastTensorFunct[1][1][0][0] = E2*v12/D;
154 elastTensorFunct[0][1][0][1] =
155 elastTensorFunct[1][0][0][1] =
156 elastTensorFunct[0][1][1][0] =
157 elastTensorFunct[1][0][1][0] = 2*G12;
161 m_spElastTensorFunct = spElastTens;
164 std::stringstream ss;
166 ss <<
"Hooke constants Orthotrope (PLAIN STRESS):\n";
168 sts <<
" E1 = " << E1 <<
"E2 = " << E2 <<
"\n";
169 sts <<
" v12 = " << v12 <<
"v21 = " << v21 <<
"\n";
170 sts <<
" G12 = " << G12 <<
"\n";
172 m_materialConfiguration = ss.str();
173 UG_LOG(
"\nset_elasticity_tensor_orthotropic " <<
ConfigShift(m_materialConfiguration) <<
"\n");
177 template <
typename TDomain>
186 if(
dim != 2)
UG_THROW(
"Orthotrope Tensor PLAIN STRAIN only for 2 dimensions" );
191 for (
size_t i = 0; i < (size_t)
dim; ++i)
192 for (
size_t j = 0; j < (size_t)
dim; ++j)
193 for (
size_t k = 0; k < (size_t)
dim; ++k)
194 for (
size_t l = 0; l < (size_t)
dim; ++l)
195 elastTensorFunct[i][j][k][l] = 0.0;
198 const number v21 = (E2/E1) * v12;
199 const number v31 = (E3/E1) * v13;
200 const number v32 = (E3/E2) * v23;
202 const number D = 1 - v12*v21 - v13*v31 - v23*v32 - 2*v12*v23*v31;
207 elastTensorFunct[0][0][0][0] = E1*(1-v23*v32)/D;
208 elastTensorFunct[1][1][1][1] = E2*(1-v13*v31)/D;
210 elastTensorFunct[0][0][1][1] =
211 elastTensorFunct[1][1][0][0] = E2*(v13*v32+v12)/D;
213 elastTensorFunct[0][1][0][1] =
214 elastTensorFunct[1][0][0][1] =
215 elastTensorFunct[0][1][1][0] =
216 elastTensorFunct[1][0][1][0] = 2*G12;
220 m_spElastTensorFunct = spElastTens;
223 std::stringstream ss;
225 ss <<
"Hooke constants Orthotrope (PLAIN STRAIN):\n";
227 sts <<
" E1 = " << E1 <<
"E2 = " << E2 <<
"E3 = " << E3 <<
"\n";
228 sts <<
" v12 = " << v12 <<
"v23 = " << v23 <<
"v13 = " << v13 <<
"\n";
229 sts <<
" G12 = " << G12 <<
"G23 = " << G23 <<
"G13 = " << G13 <<
"\n";
231 m_materialConfiguration = ss.str();
232 UG_LOG(
"\nset_elasticity_tensor_orthotropic " <<
ConfigShift(m_materialConfiguration) <<
"\n");
237 template <
typename TDomain>
246 if(
dim != 3)
UG_THROW(
"Orthotrope Tensor only for 3 dimensions" );
251 const number v21 = (E2/E1) * v12;
252 const number v31 = (E3/E1) * v13;
253 const number v32 = (E3/E2) * v23;
255 const number D = 1 - v12*v21 - v13*v31 - v23*v32 - 2*v12*v23*v31;
257 const number C11 = E1*(1-v23*v32)/D;
258 const number C22 = E2*(1-v13*v31)/D;
259 const number C33 = E3*(1-v12*v21)/D;
261 const number C12 = E2*(v13*v32+v12)/D;
262 const number C13 = E3*(v12*v23+v13)/D;
263 const number C23 = E3*(v21*v13+v23)/D;
275 m_spElastTensorFunct = spElastTens;
278 std::stringstream ss;
280 ss <<
"Hooke constants Orthotrope:\n";
282 sts <<
" E1 = " << E1 <<
"E2 = " << E2 <<
"E3 = " << E3 <<
"\n";
283 sts <<
" v12 = " << v12 <<
"v23 = " << v23 <<
"v13 = " << v13 <<
"\n";
284 sts <<
" G12 = " << G12 <<
"G23 = " << G23 <<
"G13 = " << G13 <<
"\n";
286 m_materialConfiguration = ss.str();
287 UG_LOG(
"\nset_elasticity_tensor_orthotropic " <<
ConfigShift(m_materialConfiguration) <<
"\n");
291 template <
typename TDomain>
299 if(
dim != 3)
UG_THROW(
"Orthotrope Tensor only for 3 dimensions" );
309 m_spElastTensorFunct = spElastTens;
312 mat(0,0) = C11; mat(0,1) = C12; mat(0,2) = C13;
313 mat(1,0) = C12; mat(1,1) = C22; mat(1,2) = C23;
314 mat(2,0) = C13; mat(2,1) = C23; mat(2,2) = C33;
318 number E1 = 1/mat(0,0), E2 = 1/mat(1,1), E3 = 1/mat(2,2);
319 number v12 = -mat(1, 0)/E1;
321 number v23 = -mat(2, 1)/E2;
323 number v13 = -mat(2, 0)/E1;
330 std::stringstream ss;
331 ss <<
"Orthrope Elasticity Tensor: \n";
333 sts << C11 << C12 << C13 <<
"\n";
334 sts << C12 << C22 << C23 <<
"\n";
335 sts << C13 << C23 << C33 <<
"\n";
341 ss <<
"Hooke constants Orthotrope:\n";
343 sts <<
" E1 = " << E1 <<
"E2 = " << E2 <<
"E3 = " << E3 <<
"\n";
344 sts <<
" v12 = " << v12 <<
"v23 = " << v23 <<
"v13 = " << v13 <<
"\n";
345 sts <<
" G12 = " << G12 <<
"G23 = " << G23 <<
"G13 = " << G13 <<
"\n";
347 m_materialConfiguration = ss.str();
348 UG_LOG(
"\nset_elasticity_tensor_orthotropic " <<
ConfigShift(m_materialConfiguration) <<
"\n");
352 template <
typename TDomain>
357 if(
dim != 2)
UG_THROW(
"Plain Stress Tensor only for 2 dimensions" );
362 for (
size_t i = 0; i < (size_t)
dim; ++i)
363 for (
size_t j = 0; j < (size_t)
dim; ++j)
364 for (
size_t k = 0; k < (size_t)
dim; ++k)
365 for (
size_t l = 0; l < (size_t)
dim; ++l)
366 elastTensorFunct[i][j][k][l] = 0.0;
370 elastTensorFunct[0][0][0][0] = E/(1-nu*nu);
371 elastTensorFunct[1][1][1][1] = E/(1-nu*nu);
373 elastTensorFunct[0][0][1][1] =
374 elastTensorFunct[1][1][0][0] = (E*nu)/(1-nu*nu);
376 elastTensorFunct[0][1][0][1] =
377 elastTensorFunct[1][0][0][1] =
378 elastTensorFunct[0][1][1][0] =
379 elastTensorFunct[1][0][1][0] = E*(1-nu)/(1-nu*nu);
383 m_spElastTensorFunct = spElastTens;
385 std::stringstream ss;
386 ss <<
"Hooke Elasticity Isotropic (PLAIN STRESS): \n";
387 ss <<
" young modulus (Elastizitaetsmodul): " << E <<
"\n";
388 ss <<
" poisson ratio (Querkontraktionszahl) v: " << nu <<
"\n";
389 ss <<
" Elasticity Tensor = " << elastTensorFunct <<
"\n";
390 m_materialConfiguration = ss.str();
393 template <
typename TDomain>
398 if(
dim != 2)
UG_THROW(
"Plain Strain Tensor only for 2 dimensions" );
400 set_hooke_elasticity_tensor_E_nu(E, nu);
404 template <
typename TDomain>
409 number lambda = (E*nu) / ((1+nu)*(1-2*nu));
411 set_hooke_elasticity_tensor(lambda, mu);
414 template <
typename TDomain>
426 for (
size_t i = 0; i < (size_t)
dim; ++i)
427 for (
size_t j = 0; j < (size_t)
dim; ++j)
428 for (
size_t k = 0; k < (size_t)
dim; ++k)
429 for (
size_t l = 0; l < (size_t)
dim; ++l)
431 elastTensorFunct[i][j][k][l] = 0.0;
433 if ((i == j) && (k == l))
434 elastTensorFunct[i][j][k][l] += lambda;
436 if ((i == k) && (j == l))
437 elastTensorFunct[i][j][k][l] += mu;
439 if ((i == l) && (j == k))
440 elastTensorFunct[i][j][k][l] += mu;
446 m_spElastTensorFunct = spElastTens;
448 number E = mu * (3.0 * lambda + 2.0 * mu)/(lambda + mu);
449 number v = 0.5 * lambda/(lambda + mu);
450 number kappa = lambda + 2.0/3.0 * mu;
452 std::stringstream ss;
453 ss <<
"Hooke Elasticity Isotropic: \n";
454 ss <<
" Lame`s first constant lambda: " << lambda <<
"\n";
455 ss <<
" Lame`s second constant mue (sometimes 'G', shear modulus) (Schubmodul): " << mu <<
"\n";
456 ss <<
" This setting equals: \n";
457 ss <<
" young modulus (Elastizitaetsmodul): " << E <<
"\n";
458 ss <<
" poisson ratio (Querkontraktionszahl) v: " << v <<
"\n";
459 ss <<
" bulk modulus (Kompressionsmodul): " << kappa <<
"\n";
460 ss <<
" Elasticity Tensor = " << elastTensorFunct <<
"\n";
461 m_materialConfiguration = ss.str();
Definition: voigtian_notation.h:40
void set_orthotropic(const number C11, const number C12, const number C13, const number C22, const number C23, const number C33, const number C44, const number C55, const number C66)
Definition: voigtian_notation.h:46
void copy_to_tensor(MathTensor4< dim, dim, dim, dim > &elastTensorFunct)
Definition: voigtian_notation.h:77
bool Invert(DenseMatrix< FixedArray2< double, 1, 1 > > &mat)
void set_elasticity_tensor_orthotropic_E_G_nu(const number E1, const number E2, const number E3, const number G12, const number G13, const number G23, const number v12, const number v13, const number v23)
Definition: hooke_impl.h:240
virtual SmartPtr< MathTensor4< TDomain::dim, TDomain::dim, TDomain::dim, TDomain::dim > > elasticityTensor()
computes the elasticity tensor; commonly denoted by C
Definition: hooke_impl.h:99
void set_hooke_elasticity_tensor_plain_strain_E_nu(const number E, const number nu)
Definition: hooke_impl.h:396
void strainTensor(MathMatrix< dim, dim > &strainTens, const MathMatrix< dim, dim > &GradU)
Definition: hooke_impl.h:109
void set_hooke_elasticity_tensor_E_nu(const number E, const number nu)
Definition: hooke_impl.h:407
void set_hooke_elasticity_tensor(const number lambda, const number mu)
Definition: hooke_impl.h:417
void set_elasticity_tensor_orthotropic(const number C11, const number C12, const number C13, const number C22, const number C23, const number C33, const number C44, const number C55, const number C66)
Definition: hooke_impl.h:294
void set_elasticity_tensor_orthotropic_plain_strain_E_G_nu(const number E1, const number E2, const number E3, const number G12, const number G13, const number G23, const number v12, const number v13, const number v23)
Definition: hooke_impl.h:180
virtual 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: hooke_impl.h:71
void set_hooke_elasticity_tensor_plain_stress_E_nu(const number E, const number nu)
Definition: hooke_impl.h:355
void set_elasticity_tensor_orthotropic_plain_stress_E_G_nu(const number E1, const number E2, const number G12, const number v12)
Definition: hooke_impl.h:121
virtual void init()
Definition: hooke_impl.h:59
RepeatedCol empty_col(size_t i)
#define HOOKE_PROFILE_BEGIN(name)
Definition: hooke_impl.h:45
UG_API std::string ConfigShift(std::string s)