OOFEM 3.0
Loading...
Searching...
No Matches
masonry02.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 "masonry02.h"
37#include "gausspoint.h"
38#include "floatmatrix.h"
39#include "floatarray.h"
40#include "intarray.h"
41#include "mathfem.h"
42#include "classfactory.h"
43
44namespace oofem {
46
47Masonry02 :: Masonry02(int n, Domain *d) : MPlasticMaterial2(n, d)
48{
50 this->nsurf = 3;
51 //this->rmType = mpm_CuttingPlane;
53 this->plType = nonassociatedPT;
54}
55
56
57bool
58Masonry02 :: hasMaterialModeCapability(MaterialMode mode) const
59//
60// returns whether receiver supports given mode
61//
62{
63 return mode == _2dInterface;
64}
65
66void
100
101
102double
103Masonry02 :: computeYieldValueAt(GaussPoint *gp, int isurf, const FloatArray &stressVector,
104 const FloatArray &strainSpaceHardeningVariables) const
105{
106 if ( isurf == 1 ) {
107 // tension mode
108 // double help = this->gfI*this->c0/(this->gfII*this->ft0);
109 double k1 = strainSpaceHardeningVariables.at(1);
110 //double ft = min( this->ft0*exp((-1.0)*this->ft0*k1/this->gfI), this->ft0);
111 double ft = this->ft0 * exp( ( -1.0 ) * this->ft0 * k1 / this->gfI );
112 return stressVector.at(1) - ft;
113 } else if ( isurf == 2 ) {
114 // double help = this->gfI*this->c0/(this->gfII*this->ft0);
115 double k2 = strainSpaceHardeningVariables.at(2);
116 //double c= min (this->c0*exp((-1.0)*this->c0*k2/this->gfII), this->c0);
117
118 double c = this->c0 * exp( ( -1.0 ) * this->c0 * k2 / this->gfII );
119 double tanfi = tanfi0 + ( tanfir - tanfi0 ) * ( c0 - c ) / c0;
120 //double nx = tanfi; double ny=sgn (stressVector.at(2));
121
122 return fabs( stressVector.at(2) ) + stressVector.at(1) * tanfi - c;
123
124 /*
125 * // test fan region
126 * if (((nx*(stressVector.at(1)-c) + ny*stressVector.at(2)) > 0.0) &&
127 * ((nx*(stressVector.at(1)-c) - ny*stressVector.at(2)) > 0.0)) {
128 * // fan region active
129 * return (stressVector.at(1)-c)*(stressVector.at(1)-c)+stressVector.at(2)*stressVector.at(2);
130 * } else {
131 * // shear mode
132 * double tanfi=tanfi0+(tanfir-tanfi0)*(c0-c)/c0;
133 * return fabs(stressVector.at(2))+stressVector.at(1)*tanfi-c;
134 * }
135 */
136 } else if ( isurf == 3 ) {
137 double s1 = stressVector.at(1);
138 double s2 = stressVector.at(2);
139 double st = this->computeF3HardeningLaw( strainSpaceHardeningVariables.at(3) );
140 return this->Cnn * s1 * s1 + this->Css * s2 * s2 + this->Cn * s1 - st * st;
141 } else {
142 return 0.0;
143 }
144}
145
146void
147Masonry02 :: computeStressGradientVector(FloatArray &answer, functType ftype, int isurf, GaussPoint *gp, const FloatArray &stressVector,
148 const FloatArray &strainSpaceHardeningVariables) const
149{
150 answer.resize(2);
151 answer.zero();
152
153 if ( isurf == 1 ) {
154 answer.at(1) = 1.0;
155 } else if ( isurf == 2 ) {
156 if ( ftype == yieldFunction ) {
157 // double help = this->gfI*this->c0/(this->gfII*this->ft0);
158 double k2 = strainSpaceHardeningVariables.at(2);
159 double c = this->c0 * exp( ( -1.0 ) * this->c0 * k2 / this->gfII );
160
161 double tanfi = tanfi0 + ( tanfir - tanfi0 ) * ( c0 - c ) / c0;
162 double nx = tanfi;
163 double ny = sgn( stressVector.at(2) );
164
165 answer.at(1) = nx;
166 answer.at(2) = ny;
167 } else {
168 //double k2 = strainSpaceHardeningVariables.at(2);
169 //double c= this->c0*exp((-1.0)*this->c0*k2/this->gfII);
170
171 answer.at(1) = tanpsi;
172 answer.at(2) = sgn( stressVector.at(2) );
173 }
174
175 /*
176 * // test fan region
177 * if (((nx*(stressVector.at(1)-c) + ny*stressVector.at(2)) > 0.0) &&
178 * ((nx*(stressVector.at(1)-c) - ny*stressVector.at(2)) > 0.0)) {
179 * // fan region active
180 * answer.at(1) = 2.0*(stressVector.at(1)-c);
181 * answer.at(2) = 2.0*stressVector.at(2);
182 * if (fabs(answer.at(2))<1.e-8) answer.at(2) = (answer.at(1))*1.e-6;
183 * } else {
184 * answer.at(1) = nx;
185 * answer.at(2) = ny;
186 * }
187 */
188 } else if ( isurf == 3 ) {
189 answer.at(1) = 2.0 *this->Cnn *stressVector.at(1) + this->Cn;
190 answer.at(2) = 2.0 *this->Css *stressVector.at(2);
191 }
192}
193
194
196// up to here done
198
199void
200Masonry02 :: computeStrainHardeningVarsIncrement(FloatArray &answer, GaussPoint *gp,
201 const FloatArray &stress, const FloatArray &dlambda,
202 const FloatArray &dplasticStrain, const IntArray &activeConditionMap) const
203{
204 double help = this->gfI * this->c0 / ( this->gfII * this->ft0 );
205
206 answer.resize(3);
207 answer.zero();
208
209 if ( activeConditionMap.at(1) && activeConditionMap.at(2) ) {
210 if ( ( dlambda.at(1) > 0. ) && ( dlambda.at(2) > 0. ) ) {
211 answer.at(1) = sqrt( dlambda.at(1) * dlambda.at(1) + ( help * dlambda.at(2) ) * ( help * dlambda.at(2) ) );
212 answer.at(2) = sqrt( ( dlambda.at(1) / help ) * ( dlambda.at(1) / help ) + dlambda.at(2) * dlambda.at(2) );
213 } else if ( dlambda.at(1) > 0. ) {
214 answer.at(1) = dlambda.at(1);
215 answer.at(2) = dlambda.at(1) / help;
216 } else if ( dlambda.at(2) > 0. ) {
217 answer.at(1) = help * dlambda.at(2);
218 answer.at(2) = dlambda.at(2);
219 }
220 } else if ( activeConditionMap.at(1) ) {
221 if ( dlambda.at(1) > 0. ) {
222 answer.at(1) = dlambda.at(1);
223 answer.at(2) = dlambda.at(1) / help;
224 }
225 } else {
226 if ( dlambda.at(2) > 0. ) {
227 answer.at(1) = help * dlambda.at(2);
228 answer.at(2) = dlambda.at(2);
229 }
230 }
231
232 double p1 = 2.0 *this->Cnn *stress.at(1) + this->Cn;
233 double p2 = 2.0 *this->Css *stress.at(2);
234
235 if ( dlambda.at(3) > 0. ) {
236 answer.at(3) = dlambda.at(3) * sqrt(p1 * p1 + p2 * p2);
237 }
238
239 /*
240 * double l1,l2;
241 * l1 = max (dlambda.at(1), 0.);
242 * l2 = max (dlambda.at(2), 0.);
243 *
244 * answer.at(1) =sqrt(l1*l1+(help*l2)*(help*l2));
245 * answer.at(2) =sqrt((l1/help)*(l1/help)+l2*l2);
246 *
247 *
248 * double p1 = 2.0*this->Cnn*stress.at(1)+this->Cn;
249 * double p2 = 2.0*this->Css*stress.at(2);
250 * if (dlambda.at(3) <=0.) answer.at(3) = 0.;
251 * else answer.at(3) = dlambda.at(3)*sqrt(p1*p1+p2*p2);
252 */
253}
254
255void
256Masonry02 :: computeReducedHardeningVarsLamGradient(FloatMatrix &answer, GaussPoint *gp, int actSurf,
257 const IntArray &activeConditionMap,
258 const FloatArray &fullStressVector,
259 const FloatArray &strainSpaceHardeningVars,
260 const FloatArray &dlambda) const
261{
262 // computes dk(i)/dLambda(j)
263 int indx;
264 answer.resize(3, actSurf);
265 answer.zero();
266
267 double help = this->gfI * this->c0 / ( this->gfII * this->ft0 );
268 double k1 = sqrt( dlambda.at(1) * dlambda.at(1) +
269 ( help * dlambda.at(2) ) * ( help * dlambda.at(2) ) );
270 double k2 = sqrt( ( dlambda.at(1) / help ) * ( dlambda.at(1) / help ) +
271 dlambda.at(2) * dlambda.at(2) );
272
273 double p1 = 2.0 *this->Cnn *fullStressVector.at(1) + this->Cn;
274 double p2 = 2.0 *this->Css *fullStressVector.at(2);
275
276 if ( ( indx = activeConditionMap.at(1) ) ) {
277 if ( dlambda.at(1) > 0. ) {
278 if ( activeConditionMap.at(2) ) {
279 if ( k1 > 0.0 ) {
280 double dl1 = dlambda.at(1);
281 answer.at(1, indx) = dl1 / k1; //dk1/dl1
282 answer.at(2, indx) = dl1 / k2 / help / help; //dk2/dl1
283 } else {
284 // derivative with respect to l1 when l1=l2=0.0 and both functions active
285 answer.at(1, indx) = 0.;
286 answer.at(2, indx) = 0.;
287 }
288 } else {
289 // derivative with respect to l1 when only function 1 active (l2 always 0)
290 answer.at(1, indx) = 1.;
291 answer.at(2, indx) = 0.0;
292 //answer.at(2,indx)=1./help;
293 /*
294 * answer.at(1,indx)= 1.0; // added 1.e4
295 * answer.at(2,indx)= 1.0/help;
296 */
297 }
298 }
299 }
300
301 if ( ( indx = activeConditionMap.at(2) ) ) {
302 if ( dlambda.at(2) > 0. ) {
303 if ( activeConditionMap.at(1) ) {
304 if ( k1 > 0.0 ) {
305 double dl2 = dlambda.at(2);
306 answer.at(1, indx) = help * help * dl2 / k1;
307 answer.at(2, indx) = dl2 / k2;
308 } else {
309 // derivative with respect to l2 when l1=l2=0.0 and both functions active
310 answer.at(1, indx) = 0.;
311 answer.at(2, indx) = 0.;
312 }
313 } else {
314 // derivative with respect to l2 when and only function 2 active (l1 always 0)
315 answer.at(1, indx) = 0.0;
316 //answer.at(1,indx)= 1.*help;
317 answer.at(2, indx) = 1.0;
318 }
319 }
320 }
321
322 if ( ( indx = activeConditionMap.at(3) ) ) {
323 if ( dlambda.at(3) < 0. ) {
324 answer.at(3, indx) = 0.0;
325 } else {
326 answer.at(3, indx) = sqrt(p1 * p1 + p2 * p2);
327 }
328 }
329}
330
331
332
333
334void
335Masonry02 :: computeKGradientVector(FloatArray &answer, functType ftype, int isurf, GaussPoint *gp, FloatArray &stressVector,
336 const FloatArray &strainSpaceHardeningVariables) const
337{
338 answer.resize(3);
339
340 if ( isurf == 1 ) {
341 answer.at(1) = ( -1.0 ) * this->ft0 * exp( ( -1.0 ) * this->ft0 * strainSpaceHardeningVariables.at(1) / this->gfI ) * ( -1.0 ) * this->ft0 / this->gfI;
342 answer.at(2) = 0.0;
343 answer.at(3) = 0.0;
344 } else if ( isurf == 2 ) {
345 if ( ftype == yieldFunction ) {
346 //double help = this->gfI*this->c0/(this->gfII*this->ft0);
347 double k2 = strainSpaceHardeningVariables.at(2);
348 double c = this->c0 * exp( ( -1.0 ) * this->c0 * k2 / this->gfII );
349
350
351 //double tanfi=tanfi0+(tanfir-tanfi0)*(c0-c)/c0;
352 //double nx = tanfi; double ny=sgn (stressVector.at(2));
353
354 answer.at(1) = 0.0;
355 answer.at(2) = ( -1.0 ) * ( stressVector.at(1) * ( tanfir - tanfi0 ) / c0 + 1.0 ) * c * ( -1.0 ) * this->c0 / this->gfII;
356 answer.at(3) = 0.0;
357 } else {
358 double k2 = strainSpaceHardeningVariables.at(2);
359 double c = this->c0 * exp( ( -1.0 ) * this->c0 * k2 / this->gfII );
360
361 answer.at(1) = 0.0;
362 answer.at(2) = ( -1.0 ) * c * ( -1.0 ) * this->c0 / this->gfII;
363 answer.at(3) = 0.0;
364 }
365
366 /*
367 * // test fan region
368 * if (((nx*(stressVector.at(1)-c) + ny*stressVector.at(2)) > 0.0) &&
369 * ((nx*(stressVector.at(1)-c) - ny*stressVector.at(2)) > 0.0)) {
370 * // fan region active
371 * answer.at(1) = 2.0*stressVector.at(2);
372 * answer.at(2) = 2.0*(stressVector.at(1)-c);
373 * } else {
374 * answer.at(1) = 0.0;
375 * answer.at(2) = (-1.0)*(stressVector.at(1)*(tanfir-tanfi0)/c0+1.0)*c*(-1.0)*this->c0/this->gfII;
376 * }
377 */
378 } else if ( isurf == 3 ) {
379 double st, gt;
380 st = this->computeF3HardeningLaw( strainSpaceHardeningVariables.at(3) );
381 gt = this->computeF3HardeningGradient( strainSpaceHardeningVariables.at(3) );
382 answer.at(1) = 0.0;
383 answer.at(2) = 0.0;
384 answer.at(3) = -2.0 * st * gt;
385 }
386}
387
388void
389Masonry02 :: computeReducedHardeningVarsSigmaGradient(FloatMatrix &answer, GaussPoint *gp, const IntArray &activeConditionMap,
390 const FloatArray &fullStressVector,
391 const FloatArray &strainSpaceHardeningVars,
392 const FloatArray &dlambda) const
393{
394 // computes dk(i)/dsig(j) gradient matrix
395 answer.resize(3, 2);
396 answer.zero();
397
398 double p1 = 2.0 *this->Cnn *fullStressVector.at(1) + this->Cn;
399 double p2 = 2.0 *this->Css *fullStressVector.at(2);
400
401 if ( activeConditionMap.at(3) ) {
402 if ( dlambda.at(3) >= 0. ) {
403 double c = 0.5 * dlambda.at(3) / sqrt(p1 * p1 + p2 * p2);
404 answer.at(3, 1) = 4.0 * c * this->Cnn * p1;
405 answer.at(3, 2) = 4.0 * c * this->Css * p2;
406 }
407 }
408}
409
410
411
412void
413Masonry02 :: computeReducedSSGradientMatrix(FloatMatrix &gradientMatrix, int i, GaussPoint *gp, const FloatArray &fullStressVector,
414 const FloatArray &strainSpaceHardeningVariables) const
415{
416 // computes second derivatives of load fuction with respect to stresses
417 gradientMatrix.resize(2, 2);
418 gradientMatrix.zero();
419
420 if ( i == 3 ) {
421 gradientMatrix.at(1, 1) = 2.0 * this->Cnn;
422 gradientMatrix.at(2, 2) = 2.0 * this->Css;
423 }
424}
425
426void
427Masonry02 :: computeReducedSKGradientMatrix(FloatMatrix &gradientMatrix, int i, GaussPoint *gp, const FloatArray &stressVector,
428 const FloatArray &strainSpaceHardeningVariables) const
429{
430 // computes mixed derivative of load function with respect to stress and hardening variables
431 gradientMatrix.resize(2, 3);
432 gradientMatrix.zero();
433
434 if ( i == 2 ) {
435#if 0
436 if ( 0 ) {
437 // double help = this->gfI*this->c0/(this->gfII*this->ft0);
438 double k2 = strainSpaceHardeningVariables.at(2);
439 double c = this->c0 * exp( ( -1.0 ) * this->c0 * k2 / this->gfII );
440
441
442 //double tanfi=tanfi0+(tanfir-tanfi0)*(c0-c)/c0;
443 //double nx = tanfi; double ny=sgn (stressVector.at(2));
444
445 gradientMatrix.at(1, 2) = ( -1.0 ) * ( tanfir - tanfi0 ) * c * ( -1.0 ) / this->gfII;
446 }
447#endif
448 /*
449 * // test fan region
450 * if (((nx*(stressVector.at(1)-c) + ny*stressVector.at(2)) > 0.0) &&
451 * ((nx*(stressVector.at(1)-c) - ny*stressVector.at(2)) > 0.0)) {
452 * // fan region active
453 * gradientMatrix.at(1,2) = (-2.0)*c*(-1.0)*this->c0/this->gfII;
454 * } else {
455 * gradientMatrix.at(1,2) = (-1.0)*(tanfir-tanfi0)*c*(-1.0)/this->gfII;
456 * }
457 */
458 }
459}
460
461
462std::unique_ptr<MaterialStatus>
463Masonry02 :: CreateStatus(GaussPoint *gp) const
464{
465 return std::make_unique<MPlasticMaterial2Status>(gp, this->giveSizeOfReducedHardeningVarsVector(gp));
466 /*
467 * // introduce initial pre-softening (using strainSpaceHardeningVarsVector) to
468 * // avoid problems with undefined hardening moduli.
469 * double factor;
470 * factor = log(0.99);
471 * FloatArray strainSpaceHardeningVarsVector(2);
472 * strainSpaceHardeningVarsVector.at(1) = gfI*factor/ft0;
473 * factor = log(0.95);
474 * strainSpaceHardeningVarsVector.at(2) = gfII*factor/c0;
475 * status->letTempStrainSpaceHardeningVarsVectorBe(strainSpaceHardeningVarsVector);
476 * status->letStrainSpaceHardeningVarsVectorBe(strainSpaceHardeningVarsVector);
477 */
478}
479
480void
481Masonry02 :: giveStiffnessMatrix(FloatMatrix &answer,
482 MatResponseMode rMode,
483 GaussPoint *gp, TimeStep *tStep) const
484//
485// Returns characteristic material stiffness matrix of the receiver
486//
487{
488 MaterialMode mMode = gp->giveMaterialMode();
489 switch ( mMode ) {
490 case _2dInterface:
491 give2dInterfaceMaterialStiffnessMatrix(answer, rMode, gp, tStep);
492 break;
493 default:
494 MPlasticMaterial2 :: giveStiffnessMatrix(answer, rMode, gp, tStep);
495 }
496}
497
498
499void
500Masonry02 :: give2dInterfaceMaterialStiffnessMatrix(FloatMatrix &answer, MatResponseMode mode,
501 GaussPoint *gp, TimeStep *tStep) const
502{
503 if ( mode == TangentStiffness ) {
504 if ( rmType == mpm_ClosestPoint ) {
505 answer = this->giveConsistentStiffnessMatrix(mode, gp, tStep);
506 } else {
507 answer = this->giveElastoPlasticStiffnessMatrix(mode, gp, tStep);
508 }
509 } else {
510 this->computeReducedElasticModuli(answer, gp, tStep);
511 }
512}
513
514
515void
516Masonry02 :: computeReducedElasticModuli(FloatMatrix &answer,
517 GaussPoint *gp,
518 TimeStep *tStep) const
519{ /* Returns elastic moduli in reduced stress-strain space*/
520 MaterialMode mode = gp->giveMaterialMode();
521 if ( mode == _2dInterface ) {
522 answer.resize(2, 2);
523 answer.at(1, 1) = kn;
524 answer.at(2, 2) = ks;
525 answer.at(1, 2) = answer.at(2, 1) = 0.0;
526 } else {
527 this->linearElasticMaterial->giveStiffnessMatrix(answer, ElasticStiffness, gp, tStep);
528 }
529}
530
531/*
532 * #define sic 1./3.
533 * #define spc 1.0
534 * #define smc 0.5
535 * #define src 1./7.
536 *
537 **#define kp 0.09
538 **#define km 0.49
539 **#define kr 1.e6
540 */
541
542double
543Masonry02 :: computeF3HardeningLaw(double k) const
544{
545 // ideal case
546
547 if ( ( k > 0. ) && ( k < kp ) ) {
548 return ( sic - spc ) * k * k / kp / kp - 2. * ( sic - spc ) * kp * k / kp / kp + sic;
549 //return sic+(spc-sic)*sqrt(2.*k/kp-k*k/kp/kp);
550 } else if ( ( k >= kp ) && ( k < km ) ) {
551 double h = ( k - kp ) / ( km - kp );
552 return spc + ( smc - spc ) * h * h;
553 } else if ( k >= km ) {
554 double m = 2.0 * ( smc - spc ) / ( km - kp );
555 return src + ( smc - src ) * exp( m * ( k - km ) / ( ( smc - src ) ) );
556 } else if ( k <= 0. ) {
557 return sic;
558 }
559
560
561 if ( ( k >= 0. ) && ( k < kp ) ) {
562 return ( sic - spc ) * k * k / kp / kp - 2. * ( sic - spc ) * kp * k / kp / kp + sic;
563 //return sic+(spc-sic)*sqrt(2.*k/kp-k*k/kp/kp);
564 } else if ( ( k >= kp ) && ( k < km ) ) {
565 double h = ( k - kp ) / ( km - kp );
566 return spc + ( smc - spc ) * h * h;
567 } else if ( k >= km ) {
568 double m = 2.0 * ( smc - spc ) / ( km - kp );
569 return src + ( smc - src ) * exp( m * ( k - km ) / ( ( smc - src ) ) );
570 } else if ( k < 0. ) {
571 double grad = -2.0 * ( ( sic - spc ) / kp / kp ) * kp;
572 return max(sic + grad * k, 0.);
573 } else if ( ( k < 0. ) && ( k > -kp ) ) {
574 // artificial prolongation to negative values
575 return ( sic - spc ) * k * k / kp / kp - 2. * ( sic - spc ) * kp * k / kp / kp + sic;
576 //return sic-(spc-sic)*sqrt(-2.*k/kp-k*k/kp/kp);
577 } else if ( k <= -kp ) {
578 // artificial prolongation to negative values
579 return sic - ( spc - sic );
580 }
581
582 return 0.0;
583}
584
585double
586Masonry02 :: computeF3HardeningGradient(double k) const
587{
588 // use secant stiffness
589 if ( k < 0. ) {
590 return 0.;
591 } else if ( k == 0. ) {
592 return 2. * k * ( sic - spc ) / kp / kp - 2.0 * ( ( sic - spc ) / kp / kp ) * kp;
593 } else if ( k < km ) {
594 double st = ( computeF3HardeningLaw(k) - sic );
595 return st / k;
596 } else {
597 double st = ( computeF3HardeningLaw(k) - src );
598 return st / k;
599 }
600 // Unreachable code - commeted out
601#if 0
602 /*
603 * if (k==0.) {
604 * //return 1.e20;
605 * }
606 */
607
608 // ideal case
609 if ( k <= 0. ) {
610 return 0.0;
611 } else if ( ( k >= 0. ) && ( k < kp ) ) {
612 return 2. * k * ( sic - spc ) / kp / kp - 2.0 * ( ( sic - spc ) / kp / kp ) * kp;
613 //return (spc-sic)*2.0*(1./kp-k/kp/kp)/(2.0*sqrt(2.*k/kp-k*k/kp/kp));
614 } else if ( ( k >= kp ) && ( k < km ) ) {
615 double h = ( k - kp ) / ( km - kp );
616 return ( smc - spc ) * 2.0 * h / ( km - kp );
617 } else if ( k >= km ) {
618 double m = 2.0 * ( smc - spc ) / ( km - kp );
619 double result = ( smc - src ) * exp( m * ( k - km ) / ( ( smc - src ) ) ) * m / ( ( smc - src ) );
620 return result;
621 //if (res > 1.e-5) return 1.e-5;
622 //else return res;
623 }
624
625
626
627#endif
628
629#if 0
630
631 if ( k < 0. ) {
632 double grad = -2.0 * ( ( sic - spc ) / kp / kp ) * kp;
633 if ( ( sic + grad * k ) <= 0. ) {
634 return 0.;
635 } else {
636 return grad;
637 }
638 } else if ( ( k >= 0. ) && ( k < kp ) ) {
639 return 2. * k * ( sic - spc ) / kp / kp - 2.0 * ( ( sic - spc ) / kp / kp ) * kp;
640 //return (spc-sic)*2.0*(1./kp-k/kp/kp)/(2.0*sqrt(2.*k/kp-k*k/kp/kp));
641 } else if ( ( k >= kp ) && ( k < km ) ) {
642 double h = ( k - kp ) / ( km - kp );
643 return ( smc - spc ) * 2.0 * h / ( km - kp );
644 } else if ( k >= km ) {
645 double m = 2.0 * ( smc - spc ) / ( km - kp );
646 return ( smc - src ) * exp( m * ( k - km ) / ( ( smc - src ) ) ) * m / ( ( smc - src ) );
647 } else if ( ( k < 0. ) && ( k > -kp ) ) {
648 // artificial prolongation to negative values
649 return 2. * k * ( sic - spc ) / kp / kp - 2.0 * ( ( sic - spc ) / kp / kp ) * kp;
650 //return (-1.0)*(spc-sic)*(-2.0)*(1./kp+k/kp/kp)/(2.0*sqrt(-2.*k/kp-k*k/kp/kp));
651 } else if ( k <= -kp ) {
652 // artificial prolongation to negative values
653 return 0.0;
654 }
655
656 return 0.0;
657
658#endif
659}
660} // end namespace oofem
#define REGISTER_Material(class)
void resize(Index s)
Definition floatarray.C:94
double & at(Index i)
Definition floatarray.h:202
void zero()
Zeroes all coefficients of receiver.
Definition floatarray.C:683
void resize(Index rows, Index cols)
Definition floatmatrix.C:79
void zero()
Zeroes all coefficient of receiver.
double at(std::size_t i, std::size_t j) const
MaterialMode giveMaterialMode()
Returns corresponding material mode of receiver.
Definition gausspoint.h:190
virtual bool hasField(InputFieldType id)=0
Returns true if record contains field identified by idString keyword.
int & at(std::size_t i)
Definition intarray.h:104
enum oofem::MPlasticMaterial2::ReturnMappingAlgoType rmType
LinearElasticMaterial * linearElasticMaterial
Reference to bulk (undamaged) material.
functType
Type that allows to distinguish between yield function and loading function.
MPlasticMaterial2(int n, Domain *d)
enum oofem::MPlasticMaterial2::plastType plType
int nsurf
Number of yield surfaces.
virtual FloatMatrix giveElastoPlasticStiffnessMatrix(MatResponseMode mode, GaussPoint *gp, TimeStep *tStep) const
virtual FloatMatrix giveConsistentStiffnessMatrix(MatResponseMode, GaussPoint *gp, TimeStep *tStep) const
double computeF3HardeningLaw(double k) const
Cap mode related functions.
Definition masonry02.C:543
double kn
Elastic properties.
Definition masonry02.h:95
double computeF3HardeningGradient(double k) const
Definition masonry02.C:586
double Cnn
Cap mode parameters.
Definition masonry02.h:91
double gfII
Mode II GF.
Definition masonry02.h:83
double tanfi0
Initial friction angle.
Definition masonry02.h:87
double tanpsi
Dilatancy angle.
Definition masonry02.h:98
int giveSizeOfReducedHardeningVarsVector(GaussPoint *) const override
Definition masonry02.h:119
void computeReducedElasticModuli(FloatMatrix &answer, GaussPoint *gp, TimeStep *tStep) const override
Definition masonry02.C:516
double tanfir
Residual friction angle.
Definition masonry02.h:85
double gfI
Mode I GF.
Definition masonry02.h:81
double ft0
Tensile strength.
Definition masonry02.h:79
double c0
Initial cohesion of joint.
Definition masonry02.h:89
double sic
Cap mode parameters.
Definition masonry02.h:101
void give2dInterfaceMaterialStiffnessMatrix(FloatMatrix &answer, MatResponseMode rMode, GaussPoint *gp, TimeStep *tStep) const
Definition masonry02.C:500
#define IR_GIVE_FIELD(__ir, __value, __id)
Definition inputrecord.h:67
#define _IFT_Masonry02_sm
Definition masonry02.h:57
#define _IFT_Masonry02_ft0
Definition masonry02.h:43
#define _IFT_Masonry02_kp
Definition masonry02.h:59
#define _IFT_Masonry02_cnn
Definition masonry02.h:52
#define _IFT_Masonry02_tanfi0
Definition masonry02.h:49
#define _IFT_Masonry02_gfi
Definition masonry02.h:44
#define _IFT_Masonry02_tanfir
Definition masonry02.h:50
#define _IFT_Masonry02_kn
Definition masonry02.h:46
#define _IFT_Masonry02_cplane
Definition masonry02.h:62
#define _IFT_Masonry02_si
Definition masonry02.h:55
#define _IFT_Masonry02_cn
Definition masonry02.h:54
#define _IFT_Masonry02_ks
Definition masonry02.h:47
#define _IFT_Masonry02_sr
Definition masonry02.h:58
#define _IFT_Masonry02_css
Definition masonry02.h:53
#define _IFT_Masonry02_sp
Definition masonry02.h:56
#define _IFT_Masonry02_c0
Definition masonry02.h:48
#define _IFT_Masonry02_gfii
Definition masonry02.h:45
#define _IFT_Masonry02_tanpsi
Definition masonry02.h:51
#define _IFT_Masonry02_kr
Definition masonry02.h:61
#define _IFT_Masonry02_km
Definition masonry02.h:60
FloatArrayF< N > max(const FloatArrayF< N > &a, const FloatArrayF< N > &b)
double sgn(double i)
Returns the signum of given value (if value is < 0 returns -1, otherwise returns 1).
Definition mathfem.h:104

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