OOFEM 3.0
Loading...
Searching...
No Matches
m4.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
35#include "m4.h"
36#include "floatmatrix.h"
37#include "floatarray.h"
38#include "mathfem.h"
39#include "classfactory.h"
40
41namespace oofem {
43
44M4Material :: M4Material(int n, Domain *d) :
46{ }
47
48inline double
49M4Material :: FVplus(double ev, double k1, double c13, double c14, double c15, double Ev)
50/*positive volumetric boundary */
51{
52 return ( Ev * k1 * c13 / ( 1 + ( c14 / k1 ) * macbra(ev - c13 * c15 * k1) ) );
53}
54
55inline double
56M4Material :: FVminus(double ev, double k1, double k3, double k4, double E)
57/*negative volumetric boundary */
58{
59 return ( -E * k1 * k3 * exp( -ev / ( k1 * k4 ) ) );
60}
61
62
63inline double
64M4Material :: FDminus(double ed, double k1, double c7, double c8, double c9,
65 double E)
66/*negative deviatoric boundary */
67{
68 double a;
69 a = macbra(-ed - c8 * c9 * k1) / ( k1 * c7 );
70 return ( -E * k1 * c8 / ( 1 + a * a ) );
71}
72
73inline double
74M4Material :: FDplus(double ed, double k1, double c5, double c6, double c7, double c20,
75 double E)
76/*positive deviatoric bondary */
77{
78 double a;
79 a = ( macbra(ed - c5 * c6 * k1) / ( k1 * c20 * c7 ) );
80 return ( E * k1 * c5 / ( 1 + a * a ) );
81}
82
83inline double
84M4Material :: FN(double en, double sv, double k1, double c1, double c2, double c3, double c4,
85 double E, double Ev)
86/*normal boundary */
87{
88 return ( E * k1 * c1 * exp( -macbra(en - c1 * c2 * k1) / ( k1 * c3 + macbra( -c4 * ( sv / Ev ) ) ) ) );
89}
90
91inline double
92M4Material :: FT(double sn, double ev, double k1, double k2, double c10,
93 double c11, double c12, double Et)
94/*shear boundary */
95{
96 double a, sn0;
97 //oprava sn0 fabs<=>macbra
98 sn0 = Et * k1 * c11 / ( 1 + c12 * macbra(ev) );
99 a = macbra(-sn + sn0);
100 return ( Et * k1 * k2 * c10 * a / ( Et * k1 * k2 + c10 * a ) );
101}
102
103
105M4Material :: giveRealMicroplaneStressVector(GaussPoint *gp, int mnumber,
106 const MicroplaneState &strain,
107 TimeStep *tStep) const
108{
109 M4MaterialStatus *status = static_cast< M4MaterialStatus * >( this->giveStatus(gp) );
110 double SEV, SVdash, SED, SEM, SEL, SD;
111 double SNdash, F;
112 double CV, CD;
113
114 // ask status for tempVH parameter
115 auto &prevStrain = status->giveMicroplaneStrain(mnumber);
116 auto &previousStress = status->giveMicroplaneStress(mnumber);
117
118 double EpsV = strain.v;
119 double EpsN = strain.n;
120 double DEpsV = strain.v - prevStrain.v;
121 double DEpsN = strain.n - prevStrain.n;
122 double DEpsL = strain.l - prevStrain.l;
123 double DEpsM = strain.m - prevStrain.m;
124 double EpsD = EpsN - EpsV;
125 double DEpsD = DEpsN - DEpsV;
126
127 // SVsum=0.0;
128 // novy koncept s odtizenim
129 CV = EV;
130 CD = ED;
131 /* EpsV0 = EpsV - DEpsV;
132 * EpsD0 = EpsD - DEpsD;
133 * SigV0 = previousStress.at(1);
134 * SigD0 = previousStress.at(2)-SigV0;
135 *
136 * if ((SigV0<0.0)&&(EpsV0<0.0)&&(DEpsV>0.0))
137 * CV = EV*(c11/(c11-EpsV0)+SigV0*EpsV0/(c11*c12*EV));
138 * if ((SigD0>0.0)&&(EpsD0>0.0)&&(DEpsD<0.0)) CD = (SigD0/EpsD0);
139 * if ((SigD0<0.0)&&(EpsD0<0.0)&&(DEpsD>0.0)) CD = (SigD0/EpsD0);
140 * // if (SigD0*DEpsD<0.0) CD = fabs(SigD0/EpsD0);
141 */
142
143 MicroplaneState answer;
144
145 SEV = previousStress.v + CV * DEpsV;
146
147 SVdash = min( max( SEV, this->FVminus(EpsV, k1, k3, k4, E) ), this->FVplus(EpsV, k1, c13, c14, c15, EV) );
148
149 SED = previousStress.n - previousStress.v + CD * DEpsD;
150 SD = min( max( SED, this->FDminus(EpsD, k1, c7, c8, c9, E) ),
151 this->FDplus(EpsD, k1, c5, c6, c7, c20, E) );
152
153 SNdash = SVdash + SD;
154 answer.n = min( SNdash, this->FN(EpsN, previousStress.v, k1, c1, c2, c3, c4, E, EV) );
155
156 SEM = previousStress.m + ET * DEpsM;
157 SEL = previousStress.l + ET * DEpsL;
158
159 F = this->FT(answer.n, EpsV, k1, k2, c10, c11, c12, ET);
160
161 if ( SEL > F ) {
162 answer.l = F;
163 } else if ( SEL < -F ) {
164 answer.l = -F;
165 } else {
166 answer.l = SEL;
167 }
168
169 if ( SEM > F ) {
170 answer.m = F;
171 } else if ( SEM < -F ) {
172 answer.m = -F;
173 } else {
174 answer.m = SEM;
175 }
176
177 answer.v = SVdash;
178
179 // uncomment this
180 //stressIncrement = answer;
181 //stressIncrement.subtract (previousStress);
182
183 // update gp
184 status->letTempMicroplaneStrainBe(mnumber, strain);
185 status->letTempMicroplaneStressBe(mnumber, answer);
186 return answer;
187}
188
189
190void
191M4Material :: initializeFrom(InputRecord &ir)
192{
193 MicroplaneMaterial_Bazant :: initializeFrom(ir);
194
195 c1 = 6.20e-1;
196 c2 = 2.76;
197 // c3 = 4.0;
199 c4 = 70.;
201 c5 = 2.50;
202 c6 = 1.30;
203 c7 = 50.;
204 c8 = 8.0;
205 c9 = 1.30;
206 c10 = 0.73;
207 c11 = 0.2;
208 c12 = 7000.;
209 c13 = 0.23;
210 c14 = 0.8;
211 c15 = 1.0;
212 c16 = 0.02;
213 c17 = 0.01;
214 c18 = 1.0;
215 c19 = 0.4;
216 //c20 = 14.0e-2;
218
224 mu = 1.0;
225 EV = E / ( 1 - 2 * nu );
226 ED = 5 * E / ( 2 + 3 * mu ) / ( 1 + nu );
227 ET = mu * ED;
228}
229
230
231void
232M4Material :: updateVolumetricStressTo(GaussPoint *gp, int mnumber, double sigv) const
233{
234 //FloatArray stressIncrement;
235 M4MaterialStatus *status = static_cast< M4MaterialStatus * >( this->giveStatus(gp) );
236 //stressIncrement = status->giveStressIncrementVector();
237 //stressIncrement.at(1) = sigv - status->giveStressVector().at(1);
238 //status->letStressIncrementVectorBe (stressIncrement);
239 auto stress = status->giveTempMicroplaneStress(mnumber);
240 stress.v = sigv;
241 status->letTempMicroplaneStressBe(mnumber, stress);
242}
243
244
246M4Material :: giveThermalDilatationVector(GaussPoint *gp, TimeStep *tStep) const
247//
248// returns a FloatArray(6) of initial strain vector
249// eps_0 = {exx_0, eyy_0, ezz_0, gyz_0, gxz_0, gxy_0}^T
250// caused by unit temperature in direction of
251// gp (element) local axes
252//
253{
254 return {
255 talpha,
256 talpha,
257 talpha,
258 0.,
259 0.,
260 0.,
261 };
262}
263
264
266
267M4MaterialStatus :: M4MaterialStatus(GaussPoint *g, int nplanes) :
269 microplaneStrain(nplanes), tempMicroplaneStrain(nplanes),
270 microplaneStress(nplanes), tempMicroplaneStress(nplanes)
271{ }
272
273
274void
275M4MaterialStatus :: initTempStatus()
276{
277 StructuralMaterialStatus :: initTempStatus();
278}
279
280void
281M4MaterialStatus :: updateYourself(TimeStep *tStep)
282{
283 StructuralMaterialStatus :: updateYourself(tStep);
286}
287
288void
289M4MaterialStatus :: saveContext(DataStream &stream, ContextMode mode)
290{
291 StructuralMaterialStatus :: saveContext(stream, mode);
293}
294
295void
296M4MaterialStatus :: restoreContext(DataStream &stream, ContextMode mode)
297{
298 StructuralMaterialStatus :: restoreContext(stream, mode);
300}
301} // end namespace oofem
#define REGISTER_Material(class)
void letTempMicroplaneStrainBe(int mnumber, const MicroplaneState &state)
Definition m4.h:79
const MicroplaneState & giveMicroplaneStress(int mnumber) const
Definition m4.h:75
const MicroplaneState & giveMicroplaneStrain(int mnumber) const
Definition m4.h:74
const MicroplaneState & giveTempMicroplaneStress(int mnumber) const
Definition m4.h:77
void letTempMicroplaneStressBe(int mnumber, const MicroplaneState &state)
Definition m4.h:80
std::vector< MicroplaneState > microplaneStrain
Definition m4.h:63
std::vector< MicroplaneState > tempMicroplaneStress
Definition m4.h:64
std::vector< MicroplaneState > tempMicroplaneStrain
Definition m4.h:63
std::vector< MicroplaneState > microplaneStress
Definition m4.h:64
static double FVplus(double ev, double k1, double c13, double c14, double c15, double Ev)
Definition m4.C:49
static double FT(double sn, double ev, double k1, double k2, double c10, double c11, double c12, double Et)
Definition m4.C:92
double c19
Definition m4.h:97
double mu
Definition m4.h:98
double c3
Definition m4.h:94
double c6
Definition m4.h:95
double c15
Definition m4.h:96
double c7
Definition m4.h:95
double c16
Definition m4.h:97
double c12
Definition m4.h:96
double k2
Definition m4.h:98
double c5
Definition m4.h:94
static double FVminus(double ev, double k1, double k3, double k4, double E)
Definition m4.C:56
double talpha
Definition m4.h:100
double c1
Definition m4.h:94
double k1
Definition m4.h:98
double c13
Definition m4.h:96
static double FDplus(double ed, double k1, double c5, double c6, double c7, double c20, double E)
Definition m4.C:74
double c20
Definition m4.h:97
double k3
Definition m4.h:98
double c11
Definition m4.h:96
double c10
Definition m4.h:95
double EV
Definition m4.h:99
double k4
Definition m4.h:98
double c9
Definition m4.h:95
double ED
Definition m4.h:99
static double FDminus(double ed, double k1, double c7, double c8, double c9, double E)
Definition m4.C:64
static double FN(double en, double sv, double k1, double c1, double c2, double c3, double c4, double E, double Ev)
Definition m4.C:84
double c14
Definition m4.h:96
double c2
Definition m4.h:94
double ET
Definition m4.h:99
double c17
Definition m4.h:97
double c18
Definition m4.h:97
double c8
Definition m4.h:95
double c4
Definition m4.h:94
virtual MaterialStatus * giveStatus(GaussPoint *gp) const
Definition material.C:206
double E
Young's modulus.
double nu
Poisson's ratio.
StructuralMaterialStatus(GaussPoint *g)
Constructor. Creates new StructuralMaterialStatus with IntegrationPoint g.
#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_M4Material_k4
Definition m4.h:50
#define _IFT_M4Material_c3
Definition m4.h:44
#define _IFT_M4Material_c4
Definition m4.h:45
#define _IFT_M4Material_k1
Definition m4.h:47
#define _IFT_M4Material_c20
Definition m4.h:46
#define _IFT_M4Material_talpha
Definition m4.h:51
#define _IFT_M4Material_k2
Definition m4.h:48
#define _IFT_M4Material_k3
Definition m4.h:49
long ContextMode
Definition contextmode.h:43
FloatArrayF< N > min(const FloatArrayF< N > &a, const FloatArrayF< N > &b)
double macbra(double x)
Returns the positive part of given float.
Definition mathfem.h:128
FloatArrayF< N > max(const FloatArrayF< N > &a, const FloatArrayF< N > &b)
Defines the stress or strain state in a micro plane.

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