OOFEM 3.0
Loading...
Searching...
No Matches
volumetricenergyinterface.C
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
36#include "tensor/tensor.h"
37#include "dynamicinputrecord.h"
38
39
40
41namespace oofem {
42
43
45VolumetricEnergyInterface :: compute_dVolumetricEnergy_dF(const Tensor2_3d &F) const
46
47{
48 // compute jacobian and its logarithm
49 Tensor2_3d dVolumetricEnergy_dF;
50 if(type == 1) {
51 auto J = compute_determinant(F);
52 auto lnJ = log(J);
53 dVolumetricEnergy_dF(i_3,j_3) = K * lnJ / J * compute_dJ_dF(F)(i_3,j_3);
54 }
55 return dVolumetricEnergy_dF;
56}
57
58
60VolumetricEnergyInterface :: compute_d2VolumetricEnergy_dF2(const Tensor2_3d &F) const
61{
62 // compute jacobian and its logarithm
63
64 Tensor4_3d d2VolumetricEnergy_dF2;
65 if(type == 1) {
66 auto [J, cofF] = compute_determinant_and_cofactor(F);
67 auto lnJ = log(J);
68 d2VolumetricEnergy_dF2(i_3,j_3,k_3,l_3) = K * (1.-lnJ) / J / J * cofF(i_3, j_3) * cofF(k_3, l_3) + K * lnJ / J * compute_tensor_cross_product(F)(i_3,j_3,k_3,l_3);
69
70 }
71 return d2VolumetricEnergy_dF2;
72}
73
74
75
76
77void
78VolumetricEnergyInterface :: initializeFrom(InputRecord &ir)
79{
82}
83
84} // end namespace oofem
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
#define IR_GIVE_OPTIONAL_FIELD(__ir, __value, __id)
Definition inputrecord.h:75
#define IR_GIVE_FIELD(__ir, __value, __id)
Definition inputrecord.h:67
#define _IFT_VolumetricEnergyInterface_type
#define _IFT_VolumetricEnergyInterface_k

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