OOFEM 3.0
Loading...
Searching...
No Matches
ogdencompressiblematerial.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 "floatmatrix.h"
37#include "floatarray.h"
38#include "classfactory.h"
39#include "mathfem.h"
40
41namespace oofem {
43
46
49// returns 9 components of the first Piola-Kirchhoff stress corresponding to the given deformation gradient
50{
51 //store deformation gradient into tensor
52 Tensor2_3d F(vF), P;
53 Tensor2_3d C, S;
54 // @todo:replace C by Tensor2sym_3d C = F^F, where ^ is leads to symmetric tensor
55 C(i_3, j_3) = F(k_3, i_3) * F(k_3, j_3);
57 P(i_3, j_3) = F(i_3, k_3) * S(k_3, j_3) + this->compute_dVolumetricEnergy_dF(F)(i_3, j_3);
58 auto vP = P.to_voigt_form();
59 // update gp
60 StructuralMaterialStatus *status = static_cast< StructuralMaterialStatus * >( this->giveStatus(gp) );
61
62 status->letTempFVectorBe(vF);
63 status->letTempPVectorBe(vP);
64
65 //
66 return vP;
67}
68
69
72// returns the 9x9 tangent stiffness matrix - dP/dF
73{
74 StructuralMaterialStatus *status = static_cast< StructuralMaterialStatus * >( this->giveStatus(gp) );
75
76 double J;
78 Tensor2_3d F(vF), P, C, iC, Sdev;
79 Tensor4_3d dSdE, dPdF, iCiC;
80
81 J = F.compute_determinant();
82 //
83 // @todo:replace C by Tensor2sym_3d and C = F^F, where ^ leads to symmetric tensor
84 C(i_3, j_3) = F(k_3, i_3) * F(k_3, j_3);
85 // compute eigen values and eigen vectors of C
86 auto [ eVals, eVecs ] = C.eigs();
87 //compute inverse of the right Cauchy-Green tensor
88 iC = C.compute_inverse();
89 //compute symetric dyadic product
90 iCiC(i_3, j_3, k_3, l_3) = ( iC(i_3, k_3) * iC(j_3, l_3) ) + ( iC(i_3, l_3) * iC(j_3, k_3) );
91 for ( int i = 1; i <= N; i++ ) {
92 double l1a, l2a, l3a, Ja;
93 //
94 Ja = pow(J, -alpha.at(i) / 3.);
95 l1a = pow(eVals.at(1), alpha.at(i) / 2.);
96 l2a = pow(eVals.at(2), alpha.at(i) / 2.);
97 l3a = pow(eVals.at(3), alpha.at(i) / 2.);
98 //
99 double I1a = ( l1a + l2a + l3a ) / 3.;
100 //
101 Tensor2_3d powC, iSdev;
102 powC = Tensor2_3d::computeTensorPowerFromEigs(eVals, eVecs, ( alpha.at(i) - 2. ) / 2.);
103 iSdev(i_3, j_3) = mu.at(i) * Ja * ( powC(i_3, j_3) - I1a * iC(i_3, j_3) );
104 //
105 dSdE(i_3, j_3, k_3, l_3) += 2. * mu.at(i) * Ja * ( Tensor2_3d::compute_dCm_dC_fromEigs( ( alpha.at(i) - 2. ) / 2., eVals, eVecs )(i_3, j_3, k_3, l_3) - alpha.at(i) / 6. * iC(i_3, j_3) * powC(k_3, l_3) + I1a / 2. * iCiC(i_3, j_3, k_3, l_3) ) - alpha.at(i) / 3. * iSdev(i_3, j_3) * iC(k_3, l_3);
106 Sdev(i_3, j_3) += iSdev(i_3, j_3);
107 }
108
109 // transform the second elasticity tensor to the first elasticity tensor
111 mdSdE = dSdE.to_voigt_form();
112 FloatMatrix m2dSdE(mdSdE);
114 dPdF(i_3, j_3, k_3, l_3) = I(i_3, k_3) * Sdev(j_3, l_3) + F(i_3, m_3) * dSdE(m_3, j_3, n_3, l_3) * F(k_3, n_3);
115 // add volumetric part
116 dPdF(i_3, j_3, k_3, l_3) += this->compute_d2VolumetricEnergy_dF2(F)(i_3, j_3, k_3, l_3);
117
118 FloatMatrix mdP(dPdF.to_voigt_form() );
119 return dPdF.to_voigt_form();
120}
121
122
123
124
125
128{
129 // compute eigen values and eigen vectors of C
130 auto [ eVals, eVecs ] = C.eigs();
131 //
132 double J = sqrt(C.compute_determinant() );
133 Tensor2_3d S, iC;
134 //compute inverse of the right Cauchy-Green tensor
135 iC = C.compute_inverse();
136 for ( int i = 1; i <= N; i++ ) {
137 double l1a, l2a, l3a, Ja;
138 Tensor2_3d Si;
139 //
140 l1a = pow(eVals.at(1), alpha.at(i) / 2.);
141 l2a = pow(eVals.at(2), alpha.at(i) / 2.);
142 l3a = pow(eVals.at(3), alpha.at(i) / 2.);
143 Ja = pow(J, -alpha.at(i) / 3.);
144 double I1a = ( l1a + l2a + l3a ) / 3.;
145 S(i_3, j_3) += mu.at(i) * Ja * ( Tensor2_3d::computeTensorPowerFromEigs(eVals, eVecs, ( alpha.at(i) - 2. ) / 2.)(i_3, j_3) - I1a * iC(i_3, j_3) );
146 }
147 return S;
148}
149
150
151
152
153
154std::unique_ptr<MaterialStatus>
156{
157 return std::make_unique<StructuralMaterialStatus>(gp);
158}
159
160
161void
163{
166
169
170 N = alpha.giveSize();
171 int M = mu.giveSize();
172 if ( N != M ) {
173 OOFEM_ERROR("Inconsistent size of alpha and mu");
174 }
175}
176} // end namespace oofem
#define REGISTER_Material(class)
void initializeFrom(InputRecord &ir)
initialization for the input file
Tensor4_3d compute_d2VolumetricEnergy_dF2(const Tensor2_3d &F) const
Tensor2_3d compute_dVolumetricEnergy_dF(const Tensor2_3d &F) const
virtual MaterialStatus * giveStatus(GaussPoint *gp) const
Definition material.C:206
virtual void initializeFrom(InputRecord &ir) override
FloatArrayF< 9 > giveFirstPKStressVector_3d(const FloatArrayF< 9 > &vF, GaussPoint *gp, TimeStep *tStep) const override
Default implementation relies on giveRealStressVector for second Piola-Kirchoff stress.
FloatArray alpha
Array of Exponents alpha.
std::unique_ptr< MaterialStatus > CreateStatus(GaussPoint *gp) const override
Tensor2_3d giveDeviatoricSecondPKStressVector_3d(const Tensor2_3d &C) const
FloatMatrixF< 9, 9 > give3dMaterialStiffnessMatrix_dPdF(MatResponseMode, GaussPoint *gp, TimeStep *tStep) const override
int N
Number of material parameters in the arrays mu(alpha).
FloatArray mu
Array of Material parameters mu.
void letTempPVectorBe(const FloatArray &v)
Assigns tempPVector to given vector v.
const FloatArray & giveTempFVector() const
Returns the const pointer to receiver's temporary deformation gradient vector.
void letTempFVectorBe(const FloatArray &v)
Assigns tempFVector to given vector v.
void initializeFrom(InputRecord &ir) override
StructuralMaterial(int n, Domain *d)
const FloatArrayF< 9 > to_voigt_form()
Definition tensor2.h:99
std::pair< FloatArrayF< 3 >, FloatMatrixF< 3, 3 > > eigs(int nf=15) const
Definition tensor2.h:174
static Tensor2_3d computeTensorPowerFromEigs(const FloatArray &eVals, const FloatMatrix &eVecs, double m)
Definition tensor2.h:135
Tensor2_3d compute_inverse() const
Definition tensor2.h:465
static Tensor4_3d compute_dCm_dC_fromEigs(double m, const FloatArray &lam, const FloatMatrix &N)
Definition tensor2.h:300
static const Tensor2_3d UnitTensor()
Definition tensor2.h:423
double compute_determinant() const
Definition tensor2.h:444
FloatMatrixF< 9, 9 > to_voigt_form()
Definition tensor4.h:256
#define OOFEM_ERROR(...)
Definition error.h:79
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< 'n', 3 > n_3
Definition index.h:48
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 IR_GIVE_FIELD(__ir, __value, __id)
Definition inputrecord.h:67
#define S(p)
Definition mdm.C:469
#define _IFT_OgdenCompressibleMaterial_alpha
#define _IFT_OgdenCompressibleMaterial_mu

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