OOFEM 3.0
Loading...
Searching...
No Matches
hyperelasticmaterial1d.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
41
42
43namespace oofem {
45
48
51// returns 9 components of the first piola kirchhoff stress corresponding to the given deformation gradinet
52{
53 StructuralMaterialStatus *status = static_cast< StructuralMaterialStatus * >( this->giveStatus(gp) );
54
57 vP.at(1) = this->E * (vF.at(1) - 1.);
59 vP.at(1) = vF.at(1) * this->E * 0.5 * (vF.at(1) * vF.at(1) - 1.);
60 } else {
61 OOFEM_ERROR("Unknow material type");
62 }
63 // update gp
64 status->letTempFVectorBe(vF);
65 status->letTempPVectorBe(vP);
66 //
67 return vP;
68}
69
70
71
74// returns the 9x9 tangent stiffness matrix - dP/dF
75{
76 StructuralMaterialStatus *status = static_cast< StructuralMaterialStatus * >( this->giveStatus(gp) );
77
78 double e = this->E;
80 return {e};
82 FloatArray vF(status->giveTempFVector() );
83 FloatMatrix d(1,1);
84 d.at(1,1)= e * 0.5 * (vF.at(1) * vF.at(1) - 1.) + e * vF.at(1)*vF.at(1);
85 return d;
86 } else {
87 OOFEM_ERROR("Unknow material type");
88 }
89
90
91}
92
93
94
95
96
97
98std::unique_ptr<MaterialStatus>
100{
101 return std::make_unique<StructuralMaterialStatus>(gp);
102}
103
104
105void
107{
108 StructuralMaterial :: initializeFrom(ir);
109
110 int hyperTypeRecord = 0; // default
112 // specify the type of hyperelasticmaterial
113 if ( hyperTypeRecord == 0 ) {
115 } else if ( hyperTypeRecord == 1 ) {
117 } else {
118 throw ValueInputException(ir, _IFT_HyperelasticMaterial1d_type, "Unknown hyperelastic material type");
119 }
120
121
123
124}
125} // end namespace oofem
#define REGISTER_Material(class)
double & at(std::size_t i)
double & at(Index i)
Definition floatarray.h:202
double at(std::size_t i, std::size_t j) const
void initializeFrom(InputRecord &ir) override
HyperElasticMaterialType hyperelasticMaterialType
Parameter specifying the definition of used constitutive model.
FloatMatrixF< 1, 1 > give1dStressStiffnessMatrix_dPdF(MatResponseMode mmode, GaussPoint *gp, TimeStep *tStep) const override
std::unique_ptr< MaterialStatus > CreateStatus(GaussPoint *gp) const override
FloatArrayF< 1 > giveFirstPKStressVector_1d(const FloatArrayF< 1 > &vF, GaussPoint *gp, TimeStep *tStep) const override
Default implementation relies on giveFirstPKStressVector_StressControl.
virtual MaterialStatus * giveStatus(GaussPoint *gp) const
Definition material.C:206
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.
StructuralMaterial(int n, Domain *d)
#define OOFEM_ERROR(...)
Definition error.h:79
#define _IFT_HyperelasticMaterial1d_E
#define _IFT_HyperelasticMaterial1d_type
#define IR_GIVE_OPTIONAL_FIELD(__ir, __value, __id)
Definition inputrecord.h:75
#define IR_GIVE_FIELD(__ir, __value, __id)
Definition inputrecord.h:67

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