OOFEM 3.0
Loading...
Searching...
No Matches
microplane_m1.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#ifndef microplane_m1_h
36#define microplane_m1_h
37
38// by commenting this out we can switch back to the old implementation (2D version not inheriting from MicroplaneMaterial)
39#define microplane_m1_new_implementation
40
41#ifdef microplane_m1_new_implementation
42// ========================= new implementation =========================
43
44 #include "structuralms.h"
45 #include "microplanematerial.h"
46 #include "gausspoint.h"
47
49
50 #define _IFT_M1Material_Name "microplane_m1"
51 #define _IFT_M1Material_s0 "s0"
52 #define _IFT_M1Material_hn "hn"
53 #define _IFT_M1Material_talpha "talpha"
55
56namespace oofem {
58{
59protected:
62
63public:
65
66 const char *giveClassName() const override { return "M1MaterialStatus"; }
67 void letTempNormalMplaneStressesBe(FloatArray sigmaN) { tempSigN = std :: move(sigmaN); }
68 void letTempNormalMplanePlasticStrainsBe(FloatArray epsilonpN) { tempEpspN = std :: move(epsilonpN); }
69 void letPlasticStateIndicatorsBe(IntArray plSt) { plasticState = std :: move(plSt); }
75 void initTempStatus() override;
76 void printOutputAt(FILE *file, TimeStep *tStep) const override;
77 void updateYourself(TimeStep *tStep) override;
78
79 void saveContext(DataStream &stream, ContextMode mode) override;
80 void restoreContext(DataStream &stream, ContextMode mode) override;
81};
82
87{
88protected:
89 double EN = 0.; // normal microplane elastic modulus
90 double ENtan = 0.; // normal microplane tangent (elastoplastic) modulus
91 double HN = 0.; // normal microplane hardening/softening modulus
92 double s0 = 0.; // normal microplane initial yield stress
93
94public:
100 M1Material(int n, Domain *d);
101
102 FloatArrayF<6> giveRealStressVector_3d(const FloatArrayF<6> &strain, GaussPoint *gp, TimeStep *tStep) const override;
103 FloatMatrixF<6,6> give3dMaterialStiffnessMatrix(MatResponseMode mode, GaussPoint *gp, TimeStep *tStep) const override;
104
105 const char *giveClassName() const override { return "M1Material"; }
106 const char *giveInputRecordName() const override { return _IFT_M1Material_Name; }
107 void initializeFrom(InputRecord &ir) override;
108
109 std::unique_ptr<MaterialStatus> CreateStatus(GaussPoint *gp) const override { return std::make_unique<M1MaterialStatus>(gp); }
110
111 int giveIPValue(FloatArray &answer, GaussPoint *gp, InternalStateType type, TimeStep *tStep) override;
112};
113} // end namespace oofem
114
115#else
116// ========================= old implementation =========================
117
118 #include "structuralms.h"
119 #include "structuralmaterial.h"
120 #include "gausspoint.h"
121
122
124
125 #define _IFT_M1Material_Name "microplane_m1"
126 #define _IFT_M1Material_e "e"
127 #define _IFT_M1Material_s0 "s0"
128 #define _IFT_M1Material_hn "hn"
129 #define _IFT_M1Material_talpha "talpha"
130 #define _IFT_M1Material_nmp "nmp"
132
133namespace oofem {
138{
139protected:
140 FloatArray sigN, tempSigN, sigNyield;
141
142public:
143 M1MaterialStatus(GaussPoint *g);
144
145 // definition
146 const char *giveClassName() const override { return "M1MaterialStatus"; }
147 void letTempNormalMplaneStressesBe(FloatArray sigmaN) { tempSigN = std :: move(sigmaN); }
148 void letNormalMplaneYieldStressesBe(FloatArray sigmaNyield) { sigNyield = std :: move(sigmaNyield); }
149 const FloatArray &giveNormalMplaneStresses() { return sigN; }
150 const FloatArray &giveTempNormalMplaneStresses() { return tempSigN; }
151 const FloatArray &giveNormalMplaneYieldStresses() { return sigNyield; }
152 void initTempStatus() override;
153 void printOutputAt(FILE *file, TimeStep *tStep) override;
154 void updateYourself(TimeStep *tStep) override;
155
156 void saveContext(DataStream &stream, ContextMode mode) override;
157 void restoreContext(DataStream &stream, ContextMode mode) override;
158};
159
160
164class M1Material : public StructuralMaterial
165{
166protected:
167 double E = 0.; // Young's modulus
168 double nu = 0.; // Poisson ratio
169 double EN = 0.; // normal microplane elastic modulus
170 double HN = 0.; // normal microplane hardening/softening modulus
171 double s0 = 0.; // normal microplane initial yield stress
172 int nmp = 0; // number of microplanes
173 FloatMatrix n; // microplane normals
174 FloatMatrix N; // N = n x n in Voigt notation
175 FloatMatrix NN; // NN = n x n x n x n in special notation
176 FloatArray mw; // microplane weights
177
178public:
184 M1Material(int n, Domain *d);
185
186 void giveRealStressVector_PlaneStress(FloatArray &answer, GaussPoint *gp,
187 const FloatArray &reducedStrain, TimeStep *tStep) override;
188 void giveElasticPlaneStressStiffMtrx(FloatMatrix &answer) override;
189 void givePlaneStressStiffMtrx(FloatMatrix &answer, MatResponseMode rMode, GaussPoint *gp, TimeStep *tStep) override;
190 const char *giveClassName() const override { return "M1Material"; }
191 const char *giveInputRecordName() const override { return _IFT_M1Material_Name; }
192 void initializeFrom(InputRecord &ir) override;
193 bool hasMaterialModeCapability(MaterialMode mode) const override;
194 MaterialStatus *CreateStatus(GaussPoint *gp) const override { return new M1MaterialStatus(gp); }
195
196protected:
197 int giveIPValue(FloatArray &answer, GaussPoint *gp, InternalStateType type, TimeStep *tStep) override;
198};
199} // end namespace oofem
200#endif // end of old implementation
201#endif // microplane_m1_h
void updateYourself(TimeStep *tStep) override
void printOutputAt(FILE *file, TimeStep *tStep) const override
Print receiver's output to given stream.
const FloatArray & giveTempNormalMplaneStresses()
M1MaterialStatus(GaussPoint *g)
const FloatArray & giveNormalMplaneStresses()
void letTempNormalMplanePlasticStrainsBe(FloatArray epsilonpN)
void letPlasticStateIndicatorsBe(IntArray plSt)
void letTempNormalMplaneStressesBe(FloatArray sigmaN)
void restoreContext(DataStream &stream, ContextMode mode) override
void initTempStatus() override
void saveContext(DataStream &stream, ContextMode mode) override
const char * giveClassName() const override
const IntArray & givePlasticStateIndicators()
const FloatArray & giveTempNormalMplanePlasticStrains()
const FloatArray & giveNormalMplanePlasticStrains()
const char * giveInputRecordName() const override
void initializeFrom(InputRecord &ir) override
int giveIPValue(FloatArray &answer, GaussPoint *gp, InternalStateType type, TimeStep *tStep) override
FloatMatrixF< 6, 6 > give3dMaterialStiffnessMatrix(MatResponseMode mode, GaussPoint *gp, TimeStep *tStep) const override
M1Material(int n, Domain *d)
const char * giveClassName() const override
FloatArrayF< 6 > giveRealStressVector_3d(const FloatArrayF< 6 > &strain, GaussPoint *gp, TimeStep *tStep) const override
Default implementation relies on giveRealStressVector for second Piola-Kirchoff stress.
std::unique_ptr< MaterialStatus > CreateStatus(GaussPoint *gp) const override
std::vector< FloatArrayF< 6 > > N
double E
Young's modulus.
double nu
Poisson's ratio.
MicroplaneMaterial(int n, Domain *d)
StructuralMaterialStatus(GaussPoint *g)
Constructor. Creates new StructuralMaterialStatus with IntegrationPoint g.
virtual FloatMatrixF< 3, 3 > givePlaneStressStiffMtrx(MatResponseMode mmode, GaussPoint *gp, TimeStep *tStep) const
bool hasMaterialModeCapability(MaterialMode mode) const override
virtual FloatArrayF< 3 > giveRealStressVector_PlaneStress(const FloatArrayF< 3 > &reducedE, GaussPoint *gp, TimeStep *tStep) const
Default implementation relies on giveRealStressVector_StressControl.
#define _IFT_M1Material_Name
long ContextMode
Definition contextmode.h:43

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