OOFEM 3.0
Loading...
Searching...
No Matches
basehyperelasticmaterial.h
Go to the documentation of this file.
1/*
2 *
3 * ##### ##### ###### ###### ### ###
4 * ## ## ## ## ## ## ## ### ##
5 * ## ## ## ## #### #### ## # ##
6 * ## ## ## ## ## ## ## ##
7 * ## ## ## ## ## ## ## ##
8 * ##### ##### ## ###### ## ##
9 *
10 *
11 * OOFEM : Object Oriented Finite Element Code
12 *
13 * Copyright (C) 1993 - 2025 Borek Patzak
14 *
15 *
16 *
17 * Czech Technical University, Faculty of Civil Engineering,
18 * Department of Structural Mechanics, 166 29 Prague, Czech Republic
19 *
20 * This library is free software; you can redistribute it and/or
21 * modify it under the terms of the GNU Lesser General Public
22 * License as published by the Free Software Foundation; either
23 * version 2.1 of the License, or (at your option) any later version.
24 *
25 * This program is distributed in the hope that it will be useful,
26 * but WITHOUT ANY WARRANTY; without even the implied warranty of
27 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
28 * Lesser General Public License for more details.
29 *
30 * You should have received a copy of the GNU Lesser General Public
31 * License along with this library; if not, write to the Free Software
32 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
33 */
34
35#include "dynamicinputrecord.h"
36#include "floatmatrix.h"
37#include "floatarray.h"
38#include "mathfem.h"
39#include "tensor/tensor2.h"
40#include "tensor/tensor4.h"
41
42#pragma once
43
44
46
47#define _IFT_BaseHyperElasticMaterial_k "k"
48#define _IFT_BaseHyperElasticMaterial "type"
50
51
52namespace oofem {
53class InputRecord;
62
64{
65protected:
76
77 double K = 0;
80
81
82public:
83
86
88 void initializeFrom(InputRecord &ir);
89
95 inline double compute_I1_C_from_F(const Tensor2_3d &F) const
96 {
97 return ( F(k_3, 0) * F(k_3, 0) + F(k_3, 1) * F(k_3, 1) + F(k_3, 2) * F(k_3, 2) );
98 }
99
105
106 inline double compute_I2_C_from_F(const Tensor2_3d &F) const
107 {
108 return ( 0.5 * ( ( F(k_3, 0) * F(k_3, 0) + F(k_3, 1) * F(k_3, 1) + F(k_3, 2) * F(k_3, 2) ) * ( F(k_3, 0) * F(k_3, 0) + F(k_3, 1) * F(k_3, 1) + F(k_3, 2) * F(k_3, 2) ) - F(k_3, 0) * F(k_3, l_3) * F(m_3, l_3) * F(m_3, 0) - F(k_3, 1) * F(k_3, l_3) * F(m_3, l_3) * F(m_3, 1) - F(k_3, 2) * F(k_3, l_3) * F(m_3, l_3) * F(m_3, 2) ) );
109 }
110
111
117 inline double compute_I3_C_from_F(const Tensor2_3d &F) const
118 {
119 double J = F.compute_determinant();
120 return ( J * J );
121 }
122
128 inline double compute_I1_C_from_C(const Tensor2_3d &C) const
129 {
130 return C(i_3, i_3);
131 }
132
138 inline double compute_I2_C_from_C(const Tensor2_3d &C) const
139 {
140 double trC = C(i_3, i_3);
141 return ( 0.5 * ( trC * trC - ( C(k_3, 0) * C(k_3, 0) + C(k_3, 1) * C(k_3, 1) + C(k_3, 2) * C(k_3, 2) ) ) );
142 }
143
149 inline double compute_I3_C_from_C(const Tensor2_3d &C) const
150 {
151 double J2 = C.compute_determinant();
152 return J2;
153 }
154
155
162 {
163 Tensor2_3d dI1_C_dF;
164 dI1_C_dF(i_3, j_3) = 2. * F(i_3, j_3);
165 return dI1_C_dF;
166 }
167
168
175 {
176 Tensor2_3d dI2_C_dF;
177 dI2_C_dF(i_3, j_3) = 2. * ( F(k_3, 0) * F(k_3, 0) + F(k_3, 1) * F(k_3, 1) + F(k_3, 2) * F(k_3, 2) ) * F(i_3, j_3) - 2. * F(i_3, m_3) * F(k_3, m_3) * F(k_3, j_3);
178 return dI2_C_dF;
179 }
180
181
182
189 {
190 auto [ detF, cofF ] = F.compute_determinant_and_cofactor();
191 Tensor2_3d dI3_C_dF;
192 dI3_C_dF(i_3, j_3) = 2. * detF * cofF(i_3, j_3);
193 return dI3_C_dF;
194 }
195
196
202 inline Tensor2_3d compute_dJ_dF(const Tensor2_3d &F) const
203 {
204 return F.compute_cofactor();
205 }
206
207
214 {
215 Tensor2_3d I(1.0, 0., 0., 0., 1.0, 0., 0., 0., 1.0);
216 Tensor4_3d d2I1_C_dF2;
217 d2I1_C_dF2(i_3, j_3, k_3, l_3) = 2. * I(i_3, k_3) * I(j_3, l_3);
218 return d2I1_C_dF2;
219 }
220
227 {
228 Tensor2_3d I(1.0, 0., 0., 0., 1.0, 0., 0., 0., 1.0);
229 Tensor4_3d d2I2_C_dF2;
230 d2I2_C_dF2(i_3, j_3, k_3, l_3) = 4. * F(i_3, j_3) * F(k_3, l_3) - 2. * F(i_3, l_3) * F(k_3, j_3) + 2. * ( F(m_3, 0) * F(m_3, 0) + F(m_3, 1) * F(m_3, 1) + F(m_3, 2) * F(m_3, 2) ) * I(i_3, k_3) * I(j_3, l_3) - 2. * F(m_3, l_3) * F(m_3, j_3) * I(i_3, k_3) - 2. * F(i_3, m_3) * F(k_3, m_3) * I(j_3, l_3);
231 return d2I2_C_dF2;
232 }
233
234
235
242 {
243 auto [ detF, cofF ] = F.compute_determinant_and_cofactor();
244 Tensor4_3d d2I3_C_dF2;
245 d2I3_C_dF2(i_3, j_3, k_3, l_3) = 2. * cofF(i_3, j_3) * cofF(k_3, l_3) + 2 * detF * F.compute_tensor_cross_product()(i_3, j_3, k_3, l_3);
246 return d2I3_C_dF2;
247 }
248
254 inline double compute_I1_Cdev_from_F(const Tensor2_3d &F) const
255 {
256 return pow(F.compute_determinant(), -2. / 3.) * compute_I1_C_from_F(F);
257 }
258
264 inline double compute_I2_Cdev_from_F(const Tensor2_3d &F) const
265 {
266 return pow(F.compute_determinant(), -4. / 3.) * compute_I2_C_from_F(F);
267 }
268
269
276 {
277 Tensor2_3d dI1_Cdev_dF;
278 auto [ J, cofF ] = F.compute_determinant_and_cofactor();
279 dI1_Cdev_dF(i_3, j_3) = 2. * pow(J, -2. / 3.) * ( F(i_3, j_3) - compute_I1_C_from_F(F) / ( 3. * J ) * cofF(i_3, j_3) );
280 return dI1_Cdev_dF;
281 }
282
289 {
290 Tensor2_3d iF, dI2_Cdev_dF, C;
291 auto [ J, cofF ] = F.compute_determinant_and_cofactor();
292 C(i_3, j_3) = F(k_3, i_3) * F(k_3, j_3);
293 auto I2 = compute_I2_C_from_C(C);
294
295 dI2_Cdev_dF(i_3, j_3) = 2. * pow(F.compute_determinant(), -4. / 3.) * ( C(k_3, k_3) * F(i_3, j_3) - F(i_3, k_3) * C(k_3, j_3) - 2. * I2 / ( 3. * J ) * cofF(i_3, j_3) );
296 return dI2_Cdev_dF;
297 }
298
305 {
306 Tensor2_3d I(1.0, 0., 0., 0., 1.0, 0., 0., 0., 1.0);
307 auto I1 = compute_I1_C_from_F(F);
308 auto iF = F.compute_inverse();
309 Tensor4_3d d2I1_Cdev_dF2;
310 d2I1_Cdev_dF2(i_3, j_3, k_3, l_3) = 2. / 3. * pow(F.compute_determinant(), -2. / 3.) * ( 3. * I(i_3, k_3) * I(j_3, l_3) + I1 * iF(j_3, k_3) * iF(l_3, i_3) + 2. / 3. * I1 * iF(j_3, i_3) * iF(l_3, k_3) - 2. * iF(l_3, k_3) * F(i_3, j_3) - 2. * iF(j_3, i_3) * F(k_3, l_3) );
311 return d2I1_Cdev_dF2;
312 }
313
320 {
321 Tensor2_3d I(1.0, 0., 0., 0., 1.0, 0., 0., 0., 1.0);
322 auto [ J, cofF ] = F.compute_determinant_and_cofactor();
323 auto J_43 = pow(J, -4. / 3.);
324 Tensor2_3d iF, C, B, FC;
325 iF(i_3, j_3) = cofF(j_3, i_3) / J;
326 C(i_3, j_3) = F(k_3, i_3) * F(k_3, j_3);
327 B(i_3, j_3) = F(i_3, k_3) * F(j_3, k_3);
328 FC(i_3, j_3) = F(i_3, k_3) * C(k_3, j_3);
329 auto I1 = compute_I1_C_from_C(C);
330 auto I2 = compute_I2_C_from_C(C);
331 Tensor4_3d d2I2_Cdev_dF2;
332 d2I2_Cdev_dF2(i_3, j_3, k_3, l_3) = 2. * J_43 * ( I1 * I(i_3, k_3) * I(j_3, l_3) + 2. * F(i_3, j_3) * F(k_3, l_3) - 4. / 3. * I1 * F(i_3, j_3) * iF(l_3, k_3) + 8. / 9. * I2 * iF(j_3, i_3) * iF(l_3, k_3) - 4. / 3. * I1 * iF(j_3, i_3) * F(k_3, l_3) + 4. / 3. * FC(k_3, l_3) * iF(j_3, i_3) + 2. / 3. * I2 * iF(j_3, k_3) * iF(l_3, i_3) + 4. / 3. * FC(i_3, j_3) * iF(l_3, k_3) - C(l_3, j_3) * I(i_3, k_3) - F(i_3, l_3) * F(k_3, j_3) - B(i_3, k_3) * I(l_3, j_3) );
333 return d2I2_Cdev_dF2;
334 }
335
336
342 inline Tensor4_3d compute_d2J_dF2(const Tensor2_3d &F) const
343 {
345 }
346
352 Tensor2_3d compute_dVolumetricEnergy_dF(const Tensor2_3d &F) const;
353
359 Tensor4_3d compute_d2VolumetricEnergy_dF2(const Tensor2_3d &F) const;
360};
361} // end namespace oofem
Tensor2_3d compute_dJ_dF(const Tensor2_3d &F) const
Tensor4_3d compute_d2I1_Cdev_dF2(const Tensor2_3d &F) const
double compute_I1_C_from_C(const Tensor2_3d &C) const
double compute_I3_C_from_F(const Tensor2_3d &F) const
Tensor4_3d compute_d2J_dF2(const Tensor2_3d &F) const
Tensor4_3d compute_d2I2_Cdev_dF2(const Tensor2_3d &F) const
double compute_I3_C_from_C(const Tensor2_3d &C) const
Tensor4_3d compute_d2I3_C_dF2(const Tensor2_3d &F) const
Tensor2_3d compute_dI2_Cdev_dF(const Tensor2_3d &F) const
Tensor4_3d compute_d2I2_C_dF2(const Tensor2_3d &F) const
Tensor2_3d compute_dI1_Cdev_dF(const Tensor2_3d &F) const
double compute_I2_C_from_F(const Tensor2_3d &F) const
double compute_I2_C_from_C(const Tensor2_3d &C) const
VolumetricEnergyType VET_Type
volumetric energy type
double compute_I1_Cdev_from_F(const Tensor2_3d &F) const
double compute_I1_C_from_F(const Tensor2_3d &F) const
Tensor2_3d compute_dI1_C_dF(const Tensor2_3d &F) const
double compute_I2_Cdev_from_F(const Tensor2_3d &F) const
Tensor2_3d compute_dI3_C_dF(const Tensor2_3d &F) const
Tensor2_3d compute_dI2_C_dF(const Tensor2_3d &F) const
Tensor4_3d compute_d2I1_C_dF2(const Tensor2_3d &F) const
Tensor2_3d compute_inverse() const
Definition tensor2.h:465
Tensor2_3d compute_cofactor() const
Definition tensor2.h:433
double compute_determinant() const
Definition tensor2.h:444
Tensor2_3d compute_tensor_cross_product(const Tensor2_3d &B) const
Definition tensor2.h:478
std::pair< double, Tensor2_3d > compute_determinant_and_cofactor() const
Definition tensor2.h:453
static FTensor::Index< 'k', 3 > k_3
Definition index.h:45
static FTensor::Index< 'j', 3 > j_3
Definition index.h:44
static FTensor::Index< 'i', 3 > i_3
Definition index.h:43
static FTensor::Index< 'l', 3 > l_3
Definition index.h:46
static FTensor::Index< 'm', 3 > m_3
Definition index.h:47
#define OOFEM_EXPORT
Definition oofemcfg.h:7

This page is part of the OOFEM-3.0 documentation. Copyright Copyright (C) 1994-2025 Borek Patzak Bořek Patzák
Project e-mail: oofem@fsv.cvut.cz
Generated at for OOFEM by doxygen 1.15.0 written by Dimitri van Heesch, © 1997-2011