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

This page is part of the OOFEM documentation. Copyright (c) 2011 Borek Patzak
Project e-mail: info@oofem.org
Generated at Tue Jan 2 2018 20:07:29 for OOFEM by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2011