OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
concretedpm.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 "concretedpm.h"
36 #include "floatarray.h"
37 #include "floatmatrix.h"
38 #include "../sm/Materials/structuralms.h"
39 #include "gausspoint.h"
40 #include "intarray.h"
41 #include "mathfem.h"
42 #include "datastream.h"
43 #include "contextioerr.h"
44 #include "../sm/Materials/structuralmaterial.h"
46 #include "classfactory.h"
47 
48 namespace oofem {
49 REGISTER_Material(ConcreteDPM);
51 //static bool __dummy_ConcreteDPM_alt __attribute__((unused)) = GiveClassFactory().registerMaterial("concreteidp", matCreator< ConcreteDPM > );
52 REGISTER_Material_Alt(ConcreteDPM, concreteidp);
53 
55  StructuralMaterialStatus(n, d, gp),
56  plasticStrain(6),
57  tempPlasticStrain(6)
58 {
63 
64  kappaP = tempKappaP = 0.;
65  kappaD = tempKappaD = 0.;
66  damage = tempDamage = 0.;
68  deltaLambda = 0.;
70 #ifdef SOPHISTICATED_SIZEDEPENDENT_ADJUSTMENT
71  epsloc = -1.; // negative value means that it has not been set yet
72  tempEpsloc = -1.0;
73 #endif
74  le = 0.;
75 }
76 
78 { }
79 
80 void
82 {
83  // Call the function of the parent class to initialize the variables defined there.
92 }
93 
94 void
96 {
97 #ifdef SOPHISTICATED_SIZEDEPENDENT_ADJUSTMENT
99 #endif
100  // Call corresponding function of the parent class to update
101  // variables defined there.
103 
104  // update variables defined in ConcreteDPMStatus
106  kappaP = tempKappaP;
107  kappaD = tempKappaD;
108  damage = tempDamage;
111  epsloc = tempEpsloc;
112 }
113 
114 void
116 {
117  // Call corresponding function of the parent class to print
118  // variables defined there.
120 
121  fprintf(file, "\tstatus { ");
122 
123  // print status flag
124  switch ( state_flag ) {
126  fprintf(file, "statusflag 0 (Elastic),");
127  break;
129  fprintf(file, "statusflag 1 (Unloading),");
130  break;
132  fprintf(file, "statusflag 2 (Plastic),");
133  break;
135  fprintf(file, "statusflag 3 (Damage),");
136  break;
138  fprintf(file, "statusflag 4 (PlasticDamage),");
139  break;
141  fprintf(file, "statusflag 5 (VertexCompression),");
142  break;
144  fprintf(file, "statusflag 6 (VertexTension),");
145  break;
147  fprintf(file, "statusflag 7 (VertexCompressionDamage),");
148  break;
150  fprintf(file, "statusflag 8 (VertexTensionDamage),");
151  break;
152  }
153 
154 #if 0
155  // print plastic strain vector
156  FloatArray plasticStrainVector();
157  giveFullPlasticStrainVector(plasticStrainVector);
158  fprintf(file,"plastic strains ");
159  for ( auto &val : plasticStrainVector )
160  fprintf(file," %.4e", val);
161 #endif
162 
163  // print hardening/softening parameters and damage
164 
165  //fprintf (file," kappaP %.4e", kappaP ) ;
166  //fprintf (file,", kappaD %.4e", kappaD ) ;
167  fprintf(file, ", kappa %.4e %.4e", kappaP, kappaD);
168  fprintf(file, ", damage %.4e", damage);
169 
170  // end of record
171  fprintf(file, "}\n");
172 }
173 
176 {
177  contextIOResultType iores;
178 
179  // save parent class status
180  if ( ( iores = StructuralMaterialStatus :: saveContext(stream, mode, obj) ) != CIO_OK ) {
181  THROW_CIOERR(iores);
182  }
183 
184  // write raw data
185 
186  if ( ( iores = plasticStrain.storeYourself(stream) ) != CIO_OK ) {
187  THROW_CIOERR(iores);
188  }
189 
190  if ( !stream.write(kappaP) ) {
192  }
193 
194  if ( !stream.write(kappaD) ) {
196  }
197 
198  if ( !stream.write(equivStrain) ) {
200  }
201 
202  if ( !stream.write(damage) ) {
204  }
205 
206  if ( !stream.write(state_flag) ) {
208  }
209 
210  if ( !stream.write(deltaEquivStrain) ) {
212  }
213 
214  if ( !stream.write(le) ) {
216  }
217 
218  return CIO_OK;
219 }
220 
221 
224 {
225  contextIOResultType iores;
226 
227  // read parent class status
228  if ( ( iores = StructuralMaterialStatus :: restoreContext(stream, mode, obj) ) != CIO_OK ) {
229  THROW_CIOERR(iores);
230  }
231 
232  // read raw data
233  if ( ( iores = plasticStrain.restoreYourself(stream) ) != CIO_OK ) {
234  THROW_CIOERR(iores);
235  }
236 
237  if ( !stream.read(kappaP) ) {
239  }
240 
241  if ( !stream.read(kappaD) ) {
243  }
244 
245  if ( !stream.read(equivStrain) ) {
247  }
248 
249  if ( !stream.read(damage) ) {
251  }
252 
253  if ( !stream.read(state_flag) ) {
255  }
256 
257  if ( !stream.read(deltaEquivStrain) ) {
259  }
260 
261  if ( !stream.read(le) ) {
263  }
264 
265  return CIO_OK;
266 }
267 
268 int
270 {
271  if ( type == IST_DamageScalar ) {
272  damage = value.at(1);
273  return 1;
274  }
275 
276  if ( type == IST_CumPlasticStrain ) {
277  kappaP = value.at(1);
278  return 1;
279  }
280 
281  if ( type == IST_CumPlasticStrain_2 ) {
282  kappaD = value.at(1);
283  return 1;
284  }
285 
286  return 0;
287 }
288 
289 void
291 {
292  ConcreteDPM *mat = static_cast< ConcreteDPM * >( gp->giveElement()->giveMaterial() );
293 
294  // compute kappaD from damage
297 
298  // compute plastic strain
299  // such that the given stress is obtained at zero total strain and given damage
300  if ( damage < 1. ) {
301  FloatMatrix D;
302  FloatArray effectiveStress = stressVector;
303  effectiveStress.times( -1. / ( 1. - damage ) );
304  mat->give3dMaterialStiffnessMatrix(D, ElasticStiffness, gp, NULL);
305  D.solveForRhs(effectiveStress, plasticStrain);
306  }
307 }
308 
309 
310 // ******************************************************
311 // *** CLASS CONCRETE DAMAGE-PLASTIC MATERIAL MODEL ***
312 // ******************************************************
313 
314 //#define DPM_ITERATION_LIMIT 1.e-8
315 
317  StructuralMaterial(n, d),
318  effectiveStress(_Unknown)
319 {
320  tempKappaP = kappaP = 0.;
321  tempKappaD = kappaD = 0.;
322  tempDamage = damage = 0.;
323  yieldTol = 0.;
324  newtonIter = 0;
325  helem = 0.;
327 #ifdef SOPHISTICATED_SIZEDEPENDENT_ADJUSTMENT
328  href = 0.;
329 #endif
330 }
331 
333 {
334  delete linearElasticMaterial;
335 }
336 
339 {
340  // Required by IR_GIVE_FIELD macro
341  IRResultType result;
342 
343  // call the corresponding service for the linear elastic material
345  if ( result != IRRT_OK ) {
346  return result;
347  }
348 
350  if ( result != IRRT_OK ) {
351  return result;
352  }
353 
354  double value;
355  // elastic parameters
358  propertyDictionary.add('E', eM);
359  propertyDictionary.add('n', nu);
360 
362  propertyDictionary.add(tAlpha, value);
363 
364  gM = eM / ( 2. * ( 1. + nu ) );
365  kM = eM / ( 3. * ( 1. - 2. * nu ) );
366 
367  // instanciate the variables of the plasticity model
372 
373  // damage parameters - only exponential softening
374  // [in ef variable the wf (crack opening) is stored]
375  if ( ir->hasField(_IFT_ConcreteDPM_wf) ) {
377  // fracture energy
378  } else {
379  double Gf;
381  ef = Gf / ft; // convert fracture energy to crack opening
382  }
383 
384  // default parameters
385  ecc = 0.525;
387  yieldHardInitial = 0.1;
389  AHard = 8.e-2;
391  BHard = 3.e-3;
393  CHard = 2.;
395  DHard = 1.e-6;
397  ASoft = 15.;
399  helem = 0.;
401 #ifdef SOPHISTICATED_SIZEDEPENDENT_ADJUSTMENT
402  href = 0.;
404 #endif
405 
406  //Compute m
407  m = 3. * ( pow(fc, 2.) - pow(ft, 2.) ) / ( fc * ft ) * ecc / ( ecc + 1. );
408  //Compute default value of dilationConst
409  dilationConst = -0.85;
411 
412  yieldTol = 1.e-10;
414  newtonIter = 100;
416 
417  return IRRT_OK;
418 }
419 
420 void
422  GaussPoint *gp,
423  const FloatArray &strainVector,
424  TimeStep *tStep)
425 {
426  FloatArray strain;
427  ConcreteDPMStatus *status = giveStatus(gp);
428 
429  // Initialize temp variables for this gauss point
430  status->initTempStatus();
431 
432 
433  // subtract stress-independent part of strain
434  // (due to temperature changes, shrinkage, etc.)
435  this->giveStressDependentPartOfStrainVector_3d(strain, gp, strainVector, tStep, VM_Total);
436 
437  // perform plasticity return
438  performPlasticityReturn(gp, strain);
439 
440  // compute damage
441  tempDamage = computeDamage(strain, gp, tStep);
442 
443  // compute elastic strains and effective stress
444  FloatArray elasticStrain = strain;
445  FloatArray tempPlasticStrain = status->giveTempPlasticStrain();
446  elasticStrain.subtract(tempPlasticStrain);
447  applyElasticStiffness(effectiveStress, elasticStrain, eM, nu);
448 
449  // compute the nominal stress
450  answer = effectiveStress;
451 
452  answer.times(1. - tempDamage);
453 
454  status->letTempKappaDBe(tempKappaD);
455  status->letTempDamageBe(tempDamage);
456 
457  status->letTempStrainVectorBe(strainVector);
458  status->letTempStressVectorBe(answer);
459 
460  assignStateFlag(gp);
461 
462 
463 #ifdef SOPHISTICATED_SIZEDEPENDENT_ADJUSTMENT
464  // check whether the second-order work is negative
465  // (must be done !!!before!!! the update of strain and stress)
466  if ( status->giveEpsLoc() < 0. ) {
467  FloatArray strainIncrement, stressIncrement;
468  strainIncrement.beDifferenceOf( strainVector, status->giveStrainVector() );
469  stressIncrement.beDifferenceOf( answer, status->giveStressVector() );
470  int n = strainIncrement.giveSize();
471  double work = strainIncrement.dotProduct(stressIncrement, n);
472  //printf(" work : %g\n", work);
473  if ( work < 0. ) {
474  double E = this->give('E', gp);
475  double ft = this->give(ft_strength, gp);
476  double tmpEpsloc = kappaD + damage * ft / E;
477  status->letTempEpslocBe(tmpEpsloc);
478  }
479  }
480 
481 #endif
482 }
483 
484 
485 double ConcreteDPM :: computeDamage(const FloatArray &strain, GaussPoint *gp, TimeStep *tStep)
486 {
487  ConcreteDPMStatus *status = giveStatus(gp);
488  double equivStrain;
489  computeEquivalentStrain(equivStrain, strain, gp, tStep);
490  double f = equivStrain - status->giveKappaD();
491  if ( f <= 0.0 ) {
492  // damage does not grow
493  tempKappaD = status->giveKappaD();
494  tempDamage = status->giveDamage();
495  } else {
496  // damage grows
497  tempKappaD = equivStrain;
498 #ifdef SOPHISTICATED_SIZEDEPENDENT_ADJUSTMENT
499  if ( ( href <= 0. ) || ( status->giveEpsLoc() >= 0. ) ) {
500  // evaluate and store the effective element size (if not known yet)
501  this->initDamaged(tempKappaD, strain, gp);
502  }
503 
504 #else
505  this->initDamaged(tempKappaD, strain, gp);
506 #endif
508  }
509 
510  return tempDamage;
511 }
512 
513 void
514 ConcreteDPM :: computeEquivalentStrain(double &tempEquivStrain, const FloatArray &strain, GaussPoint *gp, TimeStep *tStep)
515 {
516  //The equivalent strain is based on the volumetric plastic strain
517  ConcreteDPMStatus *status = giveStatus(gp);
518  tempKappaP = status->giveTempKappaP();
519  kappaP = status->giveKappaP();
520  double equivStrain = status->giveEquivStrain();
521  double deltaEquivStrain = 0.;
522  if ( tempKappaP <= 1.0 || tempKappaP == kappaP ) {
523  tempEquivStrain = equivStrain;
524  return;
525  } else if ( tempKappaP > 1.0 && tempKappaP != kappaP ) {
526  FloatArray plasticStrain = status->givePlasticStrain();
527  FloatArray tempPlasticStrain = status->giveTempPlasticStrain();
528 
529  double volumetricPlasticStrain = plasticStrain(0) + plasticStrain(1) + plasticStrain(2);
530  double tempVolumetricPlasticStrain = tempPlasticStrain(0) + tempPlasticStrain(1) + tempPlasticStrain(2);
531  if ( kappaP < 1.0 ) {
532  //compute volumetric plastic strain at peak
533  double peakVolumetricPlasticStrain = ( 1. - kappaP ) / ( tempKappaP - kappaP ) *
534  ( tempVolumetricPlasticStrain - volumetricPlasticStrain ) +
535  volumetricPlasticStrain;
536  if ( peakVolumetricPlasticStrain < 0. ) {
537  peakVolumetricPlasticStrain = 0.;
538  }
539 
540  deltaEquivStrain =
541  tempVolumetricPlasticStrain - peakVolumetricPlasticStrain;
542  tempEquivStrain =
543  deltaEquivStrain / computeDuctilityMeasureDamage(strain, gp);
544  if ( tempEquivStrain < 0. ) {
545  tempEquivStrain = 0.;
546  }
547  } else {
548  deltaEquivStrain = ( tempVolumetricPlasticStrain - volumetricPlasticStrain );
549  if ( deltaEquivStrain < 0. ) {
550  deltaEquivStrain = 0.;
551  }
552 
553  tempEquivStrain = equivStrain +
554  deltaEquivStrain / computeDuctilityMeasureDamage(strain, gp);
555  }
556  }
557 
558  status->letTempEquivStrainBe(tempEquivStrain);
559  status->letDeltaEquivStrainBe(deltaEquivStrain);
560 }
561 
562 double
564 {
565  ConcreteDPMStatus *status = giveStatus(gp);
566  double le = status->giveLe();
567  if ( le == 0. ) {
568  if ( helem > 0. ) {
569  le = helem;
570  } else {
571  le = gp->giveElement()->computeMeanSize();
572  }
573 
574  status->setLe(le);
575  }
576 
577  double answer = -( this->ef / le ) * log(1. - dam) - dam * ft / eM;
578  return answer;
579 }
580 
581 #define DPM_DAMAGE_TOLERANCE 1.e-8
582 
583 double
585 {
586  double omega = 0.;
587  if ( kappa > 0. ) {
588  // iteration to achieve mesh objectivity
589  // this is only valid for tension
590  ConcreteDPMStatus *status = giveStatus(gp);
591  int nite = 0;
592  double R, Lhs, aux, aux1;
593 
594  double h = status->giveLe(); // effective element size
595 
596 #ifdef SOPHISTICATED_SIZEDEPENDENT_ADJUSTMENT
597  // the procedure is different before and after localization
598  double epsloc = status->giveEpsLoc();
599  if ( ( href <= 0. ) || ( epsloc < 0. ) ) { // before localization, the reference element size href is used (but only if it is really specified by the user)
600  if ( href > 0. ) {
601  h = href; // reference element size
602  }
603 
604 #endif
605  // standard damage evaluation procedure
606  aux1 = ( ft / eM ) * h / ef;
607  if ( aux1 > 1 ) {
608  printf("computeDamageParam: ft=%g, E=%g, wf=%g, hmax=E*wf/ft=%g, h=%g\n", ft, eM, ef, eM * ef / ft, h);
609  OOFEM_ERROR("element too large");
610  }
611 
612  do {
613  nite++;
614  aux = exp(-h * ( omega * ft / eM + kappa ) / ef);
615  R = 1. - omega - aux;
616  Lhs = -1. + aux1 * aux;
617  omega -= R / Lhs;
618  if ( nite > 40 ) {
619  OOFEM_ERROR("algorithm not converging");
620  }
621  } while ( fabs(R) >= DPM_DAMAGE_TOLERANCE );
622 
623 #ifdef SOPHISTICATED_SIZEDEPENDENT_ADJUSTMENT
624  } else { // after localization, more complicated formula
625  if ( helem > 0. ) {
626  h = helem; // predefined element size
627  } else {
628  h = status->giveLe(); // effective element size
629  }
630 
631  aux1 = ( ft / eM ) * h / ef;
632  do {
633  nite++;
634  aux = exp(-( ( href - h ) * epsloc + h * ( omega * ft / eM + kappa ) ) / ef);
635  R = 1. - omega - aux;
636  Lhs = -1. + aux1 * aux;
637  omega -= R / Lhs;
638  if ( nite > 40 ) {
639  printf("computeDamageParam: algorithm not converging (part 2)");
640  }
641  } while ( fabs(R) >= DPM_DAMAGE_TOLERANCE );
642  }
643 
644 #endif
645  if ( ( omega > 1.0 ) || ( omega < 0.0 ) ) {
646  OOFEM_ERROR("internal error, omega = %g", omega);
647  }
648  }
649 
650  return omega;
651 }
652 
653 
654 void
656  const FloatArray &strain,
657  GaussPoint *gp)
658 {
659  if ( kappaD <= 0. ) {
660  return;
661  }
662 
663  int indx = 1;
664  FloatArray principalStrains, crackPlaneNormal(3);
665  FloatMatrix principalDir(3, 3);
666  ConcreteDPMStatus *status = giveStatus(gp);
667 
668  if ( helem > 0. ) {
669  status->setLe(helem);
670  } else if ( status->giveDamage() == 0. ) {
671  computePrincipalValDir(principalStrains, principalDir, strain, principal_strain);
672  // find index of max positive principal strain
673  for ( int i = 2; i <= 3; i++ ) {
674  if ( principalStrains.at(i) > principalStrains.at(indx) ) {
675  indx = i;
676  }
677  }
678 
679  for ( int i = 1; i <= 3; i++ ) {
680  crackPlaneNormal.at(i) = principalDir.at(i, indx);
681  }
682 
683  // evaluate the projected element size
684  double le = gp->giveElement()->giveCharacteristicLength(crackPlaneNormal);
685  if ( le == 0. ) {
686  le = gp->giveElement()->computeMeanSize();
687  }
688 
689  // store le in the corresponding status
690  status->setLe(le);
691  } else if ( status->giveLe() == 0. ) {
692  // this happens if the status is initialized from a file
693  // with nonzero damage
694  // le determined as square root of element area or cube root of el. volume
695  status->setLe(gp->giveElement()->computeMeanSize());
696  }
697 }
698 
699 double
701 {
702  ConcreteDPMStatus *status = giveStatus(gp);
703  FloatArray plasticStrain = status->givePlasticStrain();
704  FloatArray tempPlasticStrain = status->giveTempPlasticStrain();
705  tempPlasticStrain.subtract(plasticStrain);
706  FloatArray principalStrain;
707  double ductilityMeasure;
708  double volStrain = tempPlasticStrain(0) + tempPlasticStrain(1) + tempPlasticStrain(2);
709  //compute sum of negative principal strains
710  this->computePrincipalValues(principalStrain, tempPlasticStrain, principal_strain);
711  double negativeVolStrain = 0.;
712  for ( int i = 0; i < principalStrain.giveSize(); i++ ) {
713  if ( principalStrain(i) < 0. ) {
714  negativeVolStrain += principalStrain(i);
715  }
716  }
717 
718  //compute ductility measure
719  double Rs = -negativeVolStrain / volStrain;
720  if ( Rs < 1.0 ) {
721  ductilityMeasure = 1. + ASoft *pow(Rs, 2.);
722  } else {
723  ductilityMeasure = 1. - 3. * ASoft + 4. *ASoft *sqrt(Rs);
724  }
725 
726  return ductilityMeasure;
727 }
728 
729 void
731  FloatArray &strain)
732 {
733  ConcreteDPMStatus *status = static_cast< ConcreteDPMStatus * >( this->giveStatus(gp) );
734 
735  status->initTempStatus();
736 
737  //get temp plastic strain and tempKappa
738  FloatArray tempPlasticStrain = status->giveTempPlasticStrain();
739  tempKappaP = status->giveTempKappaP();
740 
741  // compute elastic strains and trial stress
742  FloatArray elasticStrain = strain;
743  elasticStrain.subtract(tempPlasticStrain);
744  applyElasticStiffness(effectiveStress, elasticStrain, eM, nu);
745 
746  //Compute trial coordinates
748 
749  double yieldValue = computeYieldValue(sig, rho, thetaTrial, tempKappaP);
750  // choose correct stress return and update state flag
751  if ( yieldValue > yieldTol ) {
752  double apexStress = 0.;
753  checkForVertexCase(apexStress, sig, tempKappaP);
754 
755  //Make the appropriate return
757  performVertexReturn(effectiveStress, apexStress, gp);
758  if ( vertexType == VT_Regular ) {
759  //This was no real vertex case
760  //get the original tempKappaP and stress
761  tempKappaP = status->giveTempKappaP();
762  applyElasticStiffness(effectiveStress, elasticStrain, eM, nu);
763  }
764  }
765 
766  if ( vertexType == VT_Regular ) {
768  }
769  }
770 
771  // update temp kappaP
772  status->letTempKappaPBe(tempKappaP);
773  // compute the plastic strains
774  applyElasticCompliance(elasticStrain, effectiveStress, eM, nu);
775  tempPlasticStrain = strain;
776  tempPlasticStrain.subtract(elasticStrain);
777  status->letTempPlasticStrainBe(tempPlasticStrain);
778 }
779 
780 
781 bool
783  const double sig,
784  const double tempKappa)
785 {
786  //Compute sigZero and compare with actual sig
787  int l = 0;
788  double FZero = 1.;
789  double dFZeroDSigZero = 0.;
790  double sigZero;
791  const double yieldHardOne = computeHardeningOne(tempKappa);
792  double apexCompression = 0.;
793 
794  //compressive apex
795  if ( ( tempKappa < 1. ) && ( sig < 0. ) ) {
796  sigZero = -15. * fc;
797  while ( fabs(FZero) > yieldTol && l <= newtonIter ) {
798  l++;
799  FZero = pow( ( 1. - yieldHardOne ), 2. ) * pow( ( sigZero / fc ), 4. ) +
800  pow(yieldHardOne, 2.) * m * ( sigZero / fc ) - pow(yieldHardOne, 2.);
801 
802  dFZeroDSigZero = pow( ( 1. - yieldHardOne ), 2. ) * 4. * pow( ( sigZero / fc ), 3. ) / fc +
803  pow(yieldHardOne, 2.) * m / fc;
804 
805  sigZero = sigZero - FZero / dFZeroDSigZero;
806  }
807 
808  if ( l < 15 && sigZero < 0. ) {
809  apexCompression = sigZero;
810  } else {
811  apexCompression = -15. * fc;
812  }
813  }
814 
815  if ( ( sig > 0. && tempKappa < 1. ) || ( sig > fc / m && tempKappa >= 1. ) ) {
817  answer = 0.;
818  } else if ( sig < apexCompression ) {
820  answer = apexCompression;
821  } else {
823  }
824 
825  return false;
826 }
827 
828 
829 
830 void
832  GaussPoint *gp)
833 {
834  //Define status
835  ConcreteDPMStatus *status = static_cast< ConcreteDPMStatus * >( this->giveStatus(gp) );
836  //Variables
837  deltaLambda = 0.;
838  double deltaLambdaIncrement = 0.;
839  double yieldValue;
840  double residualNorm;
841  double rhoTest = 0.;
842  double deltaLambdaIncrementNew = 0.;
843  double tempKappaPTest = 0.;
844  int iterationCount = 0;
845  int negativeRhoFlag = 0;
846  FloatArray dGDInv(2);
847  FloatArray dFDInv(2);
848  FloatArray residual(3);
849  FloatArray derivativesOfYieldSurface(3);
850  FloatArray flowRules(3);
851  FloatArray answerIncrement(3);
852  // double residual2;
853  double dKappaDDeltaLambda;
854  double dFDKappa = 0.;
855  FloatMatrix aMatrix;
856  FloatArray helpVectorA(3);
857  FloatArray helpVectorB(3);
858  FloatArray deviatoricStress;
859 
860  //compute the principal directions of the stress
861  FloatArray help;
862  FloatMatrix stressPrincipalDir;
863  computePrincipalValDir(help, stressPrincipalDir, effectiveStress, principal_stress);
864 
865  //compute invariants from stress state
866  sig = this->computeDeviatoricVolumetricSplit(deviatoricStress, effectiveStress);
867  rho = computeSecondCoordinate(deviatoricStress);
868 
869  const double volumetricPlasticStrain =
870  3. * status->giveVolumetricPlasticStrain();
871 
872  const double deviatoricPlasticStrainNorm =
874 
875  double tempVolumetricPlasticStrain = volumetricPlasticStrain;
876  double tempDeviatoricPlasticStrainNorm = deviatoricPlasticStrainNorm;
877 
878  const double kappaP = status->giveKappaP();
879  tempKappaP = kappaP;
880 
881  yieldValue = computeYieldValue(sig, rho, thetaTrial, tempKappaP);
882  residualNorm = fabs(yieldValue);
883 
884  while ( residualNorm > yieldTol ) {
885  if ( ++iterationCount == newtonIter ) {
886  OOFEM_ERROR("Closest point projection did not converge.");
887  }
888 
889  //compute the stress, yield value and residuals
890  computeDGDInv(dGDInv, sig, rho, tempKappaP);
891  computeDFDInv(dFDInv, sig, rho, tempKappaP);
892  dFDKappa = computeDFDKappa(sig, rho, tempKappaP);
893  dKappaDDeltaLambda = computeDKappaDDeltaLambda(sig, rho, tempKappaP);
894  yieldValue = computeYieldValue(sig, rho, thetaTrial, tempKappaP);
895  //The residual volumetric plastic strain is defined as eps1+eps2+eps3
896  residual(0) = volumetricPlasticStrain - tempVolumetricPlasticStrain +
897  deltaLambda *dGDInv(0);
898  residual(1) = deviatoricPlasticStrainNorm -
899  tempDeviatoricPlasticStrainNorm + deltaLambda *dGDInv(1);
900  residual(2) = kappaP - tempKappaP + deltaLambda * dKappaDDeltaLambda;
901 
902  // weighted norm
903  residualNorm = pow(residual(0), 2.) + pow(residual(1), 2.) +
904  pow(residual(2), 2.) + pow(yieldValue, 2.);
905  residualNorm = sqrt(residualNorm);
906  // printf("\n residualNorm= %e\n", residualNorm);
907  if ( residualNorm > yieldTol ) {
908  computeAMatrix(aMatrix, sig, rho, tempKappaP);
909 
910  // assemble the derivatives of the yield surface
911  for ( int i = 0; i < 2; i++ ) {
912  derivativesOfYieldSurface(i) = dFDInv(i);
913  }
914 
915  derivativesOfYieldSurface(2) = dFDKappa;
916  //assemble flow rules
917  for ( int i = 0; i < 2; i++ ) {
918  flowRules(i) = dGDInv(i);
919  }
920 
921  flowRules(2) = dKappaDDeltaLambda;
922 
923  //compute the deltaLambdaIncrement
924  deltaLambdaIncrement = yieldValue;
925  helpVectorA.beProductOf(aMatrix, residual);
926  for ( int i = 0; i < 3; i++ ) {
927  deltaLambdaIncrement -= derivativesOfYieldSurface(i) * helpVectorA(i);
928  }
929 
930  helpVectorB.beProductOf(aMatrix, flowRules);
931  double denominator = 0.;
932  for ( int i = 0; i < 3; i++ ) {
933  denominator += derivativesOfYieldSurface(i) * helpVectorB(i);
934  }
935 
936  deltaLambdaIncrement /= denominator;
937 
938  //compute increment of answer
939  FloatArray helpVectorC;
940  helpVectorC = residual;
941  helpVectorC.add(deltaLambdaIncrement, flowRules);
942  answerIncrement.beProductOf(aMatrix, helpVectorC);
943  answerIncrement.negated();
944  rhoTest = rho + answerIncrement(1);
945 
946  //Special case, if rho changes sign
947  if ( rhoTest < 0. && negativeRhoFlag == 0 ) {
948  //Determine deltaLambdaIncrement, so that rho is equal to zero
949  answerIncrement(1) = -rho;
950 
951  deltaLambdaIncrementNew =
952  ( -aMatrix(1, 0) * residual(0) - aMatrix(1, 1) * residual(1) -
953  aMatrix(1, 2) * residual(2) - answerIncrement(1) ) /
954  ( flowRules(0) * aMatrix(1, 0) + flowRules(1) * aMatrix(1, 1) +
955  flowRules(2) * aMatrix(1, 2) );
956 
957  // Special case, if deltaLambdaIncrement is equal to zero.
958  if ( fabs(deltaLambdaIncrementNew) < yieldTol * 1.e3 ) {
959  negativeRhoFlag = 1;
960  deltaLambdaIncrementNew = deltaLambdaIncrement;
961  }
962 
963  helpVectorC = residual;
964  helpVectorC.add(deltaLambdaIncrementNew, flowRules);
965  answerIncrement.beProductOf(aMatrix, helpVectorC);
966  answerIncrement.negated();
967 
968  sig += answerIncrement(0);
969  rho += answerIncrement(1);
970 
971  tempKappaPTest = tempKappaP;
972  tempKappaP += answerIncrement(2);
973  deltaLambda += deltaLambdaIncrementNew;
974  } else {
975  tempKappaPTest = tempKappaP;
976  tempKappaP += answerIncrement(2);
977  sig += answerIncrement(0);
978  rho += answerIncrement(1);
979 
980  deltaLambda += deltaLambdaIncrement;
981  }
982 
983  //Special case, if deltaKappaP is negative
984  if ( ( tempKappaP - status->giveKappaP() ) < 0. ) {
985  tempKappaP = tempKappaPTest;
986  }
987 
988  tempVolumetricPlasticStrain -= answerIncrement(0) / ( kM );
989  tempDeviatoricPlasticStrainNorm -= answerIncrement(1) / ( 2. * gM );
990  }
991 
992  //if (gp->giveElement()->giveNumber() == 1301){
993  // printf("%g %g %g\n",sig,rho,tempKappaP);
994  //}
995  }
996 
997  status->letTempVolumetricPlasticStrainBe(tempVolumetricPlasticStrain / 3.);
998  if ( deltaLambda < 0 ) {
999  printf("deltaLambda = %e\n", deltaLambda);
1000  printf("plastic multiplier less than zero");
1001  }
1002 
1003  // printf("\nnumber of iterations = %i\n", iterationCount);
1004  status->letDeltaLambdaBe(deltaLambda);
1005  FloatArray stressPrincipal;
1006  stressPrincipal.zero();
1007 
1008  stressPrincipal(0) = sig + sqrt(2. / 3.) * rho * cos(thetaTrial);
1009  stressPrincipal(1) = sig + sqrt(2. / 3.) * rho * cos(thetaTrial - 2. * M_PI / 3.);
1010  stressPrincipal(2) = sig + sqrt(2. / 3.) * rho * cos(thetaTrial + 2. * M_PI / 3.);
1011 
1012  transformStressVectorTo(effectiveStress, stressPrincipalDir, stressPrincipal, 1);
1013 }
1014 
1015 void
1017  double apexStress,
1018  GaussPoint *gp)
1019 {
1020  ConcreteDPMStatus *status = static_cast< ConcreteDPMStatus * >( this->giveStatus(gp) );
1021  FloatArray deviatoricStressTrial;
1022  double sigTrial;
1023  double yieldValue;
1024  double yieldValueMid;
1025  double sig2 = 0.;
1026  double dSig;
1027  double sigMid;
1028  double sigAnswer;
1029  double ratioPotential;
1030 
1031  sigTrial = this->computeDeviatoricVolumetricSplit(deviatoricStressTrial, effectiveStress);
1032  const double rhoTrial = computeSecondCoordinate(deviatoricStressTrial);
1033 
1034  tempKappaP = status->giveTempKappaP();
1035  const double kappaInitial = tempKappaP;
1036 
1037  if ( vertexType == VT_Tension ) {
1038  sig2 = -0.1 * ft;
1039  } else if ( vertexType == VT_Compression ) {
1040  sig2 = apexStress;
1041  }
1042 
1043  tempKappaP =
1044  computeTempKappa(kappaInitial, sigTrial, rhoTrial, sigTrial);
1045 
1046  yieldValue =
1047  computeYieldValue(sigTrial, 0., 0., tempKappaP);
1048 
1049  tempKappaP =
1050  computeTempKappa(kappaInitial, sigTrial, rhoTrial, sig2);
1051 
1052  yieldValueMid =
1053  computeYieldValue(sig2, 0., 0., tempKappaP);
1054 
1055  if ( yieldValue * yieldValueMid >= 0. ) {
1057  return;
1058  }
1059 
1060  if ( yieldValue < 0.0 ) {
1061  dSig = sig2 - sigTrial;
1062  sigAnswer = sig2;
1063  } else {
1064  dSig = sigTrial - sig2;
1065  sigAnswer = sig2;
1066  }
1067 
1068  for ( int j = 0; j < 250; j++ ) {
1069  dSig = 0.5 * dSig;
1070 
1071  sigMid = sigAnswer + dSig;
1072 
1073 
1074  tempKappaP =
1075  computeTempKappa(kappaInitial, sigTrial, rhoTrial, sigMid);
1076 
1077  yieldValueMid = computeYieldValue(sigMid, 0., 0., tempKappaP);
1078 
1079  if ( yieldValueMid <= 0. ) {
1080  sigAnswer = sigMid;
1081  }
1082 
1083  if ( fabs(yieldValueMid) < yieldTol && yieldValueMid <= 0. ) {
1084  for ( int i = 0; i < 3; i++ ) {
1085  effectiveStress(i) = sigAnswer;
1086  }
1087 
1088  for ( int i = 3; i < effectiveStress.giveSize(); i++ ) {
1089  effectiveStress(i) = 0.;
1090  }
1091 
1092  ratioPotential =
1093  computeRatioPotential(sigAnswer, tempKappaP);
1094 
1095  double ratioTrial = rhoTrial / ( sigTrial - sigAnswer );
1096 
1097  if ( ( ( ( ratioPotential >= ratioTrial ) && vertexType == VT_Tension ) ) ||
1098  ( ( ratioPotential <= ratioTrial ) && vertexType == VT_Compression ) ) {
1099  return;
1100  } else {
1102  return;
1103  }
1104  }
1105  }
1106 
1108 }
1109 
1110 
1111 double
1112 ConcreteDPM :: computeTempKappa(const double kappaInitial,
1113  const double sigTrial,
1114  const double rhoTrial,
1115  const double sig)
1116 {
1117  //This function is called, if stress state is in vertex case
1118  double equivalentDeltaPlasticStrain;
1119  rho = 0.;
1120  equivalentDeltaPlasticStrain = sqrt( 1. / 9. * pow( ( sigTrial - sig ) / ( kM ), 2. ) +
1121  pow(rhoTrial / ( 2. * gM ), 2.) );
1122 
1123  double thetaVertex = 0.;
1124  double ductilityMeasure = computeDuctilityMeasure(sig, rho, thetaVertex);
1125 
1126  return kappaInitial + equivalentDeltaPlasticStrain / ductilityMeasure;
1127 }
1128 
1129 
1130 double
1132  const double rho,
1133  const double theta,
1134  const double tempKappa) const
1135 {
1136  //compute yieldHard
1137  const double yieldHardOne = computeHardeningOne(tempKappa);
1138  const double yieldHardTwo = computeHardeningOne(tempKappa);
1139 
1140  // compute elliptic function r
1141  const double rFunction = ( 4. * ( 1. - pow(ecc, 2.) ) * pow(cos(theta), 2.) +
1142  pow( ( 2. * ecc - 1. ), 2. ) ) /
1143  ( 2. * ( 1. - pow(ecc, 2.) ) * cos(theta) +
1144  ( 2. * ecc - 1. ) * sqrt(4. * ( 1. - pow(ecc, 2.) ) * pow(cos(theta), 2.)
1145  + 5. * pow(ecc, 2.) - 4. * ecc) );
1146 
1147  //compute help function Al
1148  const double Al = ( 1. - yieldHardOne ) * pow( ( sig / fc + rho / ( sqrt(6.) * fc ) ), 2. ) +
1149  sqrt(3. / 2.) * rho / fc;
1150 
1151  //Compute yield equation
1152  return pow(Al, 2.) +
1153  pow(yieldHardOne, 2.) * m * ( sig / fc + rho * rFunction / ( sqrt(6.) * fc ) ) -
1154  pow(yieldHardTwo, 2.);
1155 }
1156 
1157 
1158 double
1160  const double rho,
1161  const double tempKappa)
1162 {
1163  const double theta = thetaTrial;
1164  //compute yieldHard and yieldSoft
1165  const double yieldHardOne = computeHardeningOne(tempKappa);
1166  const double yieldHardTwo = computeHardeningOne(tempKappa);
1167  // compute the derivative of the hardening and softening laws
1168  const double dYieldHardOneDKappa = computeHardeningOnePrime(tempKappa);
1169  const double dYieldHardTwoDKappa = computeHardeningOnePrime(tempKappa);
1170 
1171  //compute elliptic function r
1172  const double rFunction =
1173  ( 4. * ( 1. - ecc * ecc ) * cos(theta) * cos(theta) + ( 2. * ecc - 1. ) * ( 2. * ecc - 1. ) ) /
1174  ( 2 * ( 1. - ecc * ecc ) * cos(theta) + ( 2. * ecc - 1. ) *
1175  sqrt(4. * ( 1. - ecc * ecc ) * cos(theta) * cos(theta) + 5. * ecc * ecc - 4. * ecc) );
1176 
1177  //compute help functions Al, Bl
1178  const double Al = ( 1. - yieldHardOne ) * pow( ( sig / fc + rho / ( sqrt(6.) * fc ) ), 2. ) + sqrt(3. / 2.) * rho / fc;
1179 
1180  const double Bl = sig / fc + rho / ( fc * sqrt(6.) );
1181 
1182  const double dFDYieldHardOne = -2. *Al *pow(Bl, 2.)
1183  + 2. * yieldHardOne * m * ( sig / fc + rho * rFunction / ( sqrt(6.) * fc ) );
1184 
1185  const double dFDYieldHardTwo = -2. * yieldHardTwo;
1186 
1187  // compute dFDKappa
1188  double dFDKappa = dFDYieldHardOne * dYieldHardOneDKappa +
1189  dFDYieldHardTwo * dYieldHardTwoDKappa;
1190  /*
1191  * set dFDKappa to zero, if it becomes greater than zero.
1192  * dFDKappa can only be negative or zero in the converged state for
1193  * the case of hardenig and perfect plasticity. For trial stresses, however,
1194  * it might be negative, which may lead to convergency problems. Therefore,
1195  * it is set to zero in this cases.
1196  */
1197  if ( dFDKappa > 0. ) {
1198  dFDKappa = 0.;
1199  }
1200 
1201  return dFDKappa;
1202 }
1203 
1204 void
1206  const double sig,
1207  const double rho,
1208  const double tempKappa) const
1209 {
1210  const double theta = thetaTrial;
1211 
1212  //compute yieldHard
1213  const double yieldHardOne = computeHardeningOne(tempKappa);
1214 
1215  //compute elliptic function r
1216  const double rFunction = ( 4. * ( 1. - ecc * ecc ) * cos(theta) * cos(theta) + ( 2. * ecc - 1. ) * ( 2. * ecc - 1. ) ) /
1217  ( 2. * ( 1. - ecc * ecc ) * cos(theta) + ( 2. * ecc - 1. ) * sqrt(4. * ( 1. - ecc * ecc ) * cos(theta) * cos(theta)
1218  + 5. * ecc * ecc - 4. * ecc) );
1219 
1220  //compute help functions AL, BL
1221  const double AL = ( 1. - yieldHardOne ) * pow( ( sig / fc + rho / ( sqrt(6.) * fc ) ), 2. ) + sqrt(3. / 2.) * rho / fc;
1222  const double BL = sig / fc + rho / ( fc * sqrt(6.) );
1223 
1224  //compute dfdsig
1225  const double dfdsig = 4. * ( 1. - yieldHardOne ) / fc * AL * BL + yieldHardOne * yieldHardOne * m / fc;
1226  //compute dfdrho
1227  const double dfdrho = AL / ( sqrt(6.) * fc ) * ( 4. * ( 1. - yieldHardOne ) * BL + 6. ) + rFunction * m * yieldHardOne * yieldHardOne / ( sqrt(6.) * fc );
1228 
1229  answer(0) = dfdsig;
1230  answer(1) = dfdrho;
1231 }
1232 
1233 double
1235  const double rho,
1236  const double tempKappa)
1237 {
1238  //Variables
1239  double equivalentDGDStress;
1240  FloatArray dGDInv(2);
1241  computeDGDInv(dGDInv, sig, rho, tempKappa);
1242 
1243  equivalentDGDStress = sqrt( 1. / 3. * pow(dGDInv(0), 2.) +
1244  pow(dGDInv(1), 2.) );
1245 
1246  double ductilityMeasure = computeDuctilityMeasure(sig, rho, this->thetaTrial);
1247  double dKappaDDeltaLambda = equivalentDGDStress / ductilityMeasure;
1248  return dKappaDDeltaLambda;
1249 }
1250 
1251 
1252 void
1254  const double sig,
1255  const double rho,
1256  const double tempKappa)
1257 {
1258  //Variables
1259  double equivalentDGDStress;
1260  FloatArray dGDInv(2);
1261  FloatMatrix dDGDDInv(2, 2);
1262  FloatArray dEquivalentDGDStressDInv(2);
1263 
1264  //Compute first and second derivative of plastic potential
1265  computeDGDInv(dGDInv, sig, rho, tempKappa);
1266  computeDDGDDInv(dDGDDInv, sig, rho, tempKappa);
1267 
1268  //Compute equivalentDGDStress
1269  equivalentDGDStress = sqrt( 1. / 3. * pow(dGDInv(0), 2.) +
1270  pow(dGDInv(1), 2.) );
1271 
1272  //computeDuctilityMeasure
1273  double ductilityMeasure = computeDuctilityMeasure(sig, rho, this->thetaTrial);
1274 
1275  //Compute dEquivalentDGDStressDInv
1276  dEquivalentDGDStressDInv(0) =
1277  ( 2. / 3. * dGDInv(0) * dDGDDInv(0, 0) + 2. * dGDInv(1) * dDGDDInv(1, 0) ) / ( 2. * equivalentDGDStress );
1278  dEquivalentDGDStressDInv(1) =
1279  ( 2. / 3. * dGDInv(0) * dDGDDInv(0, 1) + 2. * dGDInv(1) * dDGDDInv(1, 1) ) / ( 2. * equivalentDGDStress );
1280 
1281  answer.zero();
1282 
1283  // compute the derivative of
1284  FloatArray dDuctilityMeasureDInv(2);
1285  computeDDuctilityMeasureDInv(dDuctilityMeasureDInv, sig, rho, tempKappa);
1286 
1287  answer(0) = ( dEquivalentDGDStressDInv(0) * ductilityMeasure - equivalentDGDStress * dDuctilityMeasureDInv(0) ) / pow(ductilityMeasure, 2.);
1288 
1289  answer(1) = ( dEquivalentDGDStressDInv(1) * ductilityMeasure - equivalentDGDStress * dDuctilityMeasureDInv(1) ) / pow(ductilityMeasure, 2.);
1290 }
1291 
1292 double
1294  const double rho,
1295  const double tempKappa)
1296 {
1297  //Variables
1298  double equivalentDGDStress;
1299  FloatArray dGDInv(2);
1300  FloatArray dDGDInvDKappa(2);
1301  double dEquivalentDGDStressDKappa;
1302 
1303  //Compute first and second derivative of plastic potential
1304  computeDGDInv(dGDInv, sig, rho, tempKappa);
1305  computeDDGDInvDKappa(dDGDInvDKappa, sig, rho, tempKappa);
1306 
1307  equivalentDGDStress = sqrt( 1. / 3. * pow(dGDInv(0), 2.) +
1308  pow(dGDInv(1), 2.) );
1309 
1310  //computeDuctilityMeasure
1311  double ductilityMeasure = computeDuctilityMeasure(sig, rho, this->thetaTrial);
1312 
1313  //Compute dEquivalentDGDStressDKappa
1314  dEquivalentDGDStressDKappa =
1315  ( 2. / 3. * dGDInv(0) * dDGDInvDKappa(0) + 2. * dGDInv(1) * dDGDInvDKappa(1) ) / ( 2. * equivalentDGDStress );
1316 
1317  // compute the derivative of
1318  double dDuctilityMeasureDKappa = 0.;
1319 
1320  double dDKappaDDeltaLambdaDKappa =
1321  ( dEquivalentDGDStressDKappa * ductilityMeasure -
1322  equivalentDGDStress * dDuctilityMeasureDKappa ) / pow(ductilityMeasure, 2.);
1323 
1324  return dDKappaDDeltaLambdaDKappa;
1325 }
1326 
1327 double
1329  const double rho,
1330  const double theta)
1331 {
1332  double thetaConst = pow(2. * cos(theta), 2.);
1333  double ductilityMeasure;
1334  double x = -( sig + fc / 3 ) / fc;
1335  if ( x < 0. ) {
1336  /*Introduce exponential help function which results in a smooth
1337  * transition. */
1338  double fZero = BHard;
1339  double fPrimeZero = -( BHard - AHard ) / ( CHard );
1340  double CHelp = DHard;
1341  double AHelp = fZero - CHelp;
1342  double BHelp = ( fZero - CHelp ) / fPrimeZero;
1343  ductilityMeasure = ( AHelp * exp(x / BHelp) + CHelp ) / thetaConst;
1344  } else {
1345  ductilityMeasure = ( AHard + ( BHard - AHard ) * exp( -x / ( CHard ) ) ) / thetaConst;
1346  }
1347 
1348  if ( ductilityMeasure <= 0. ) {
1349  printf("ductilityMeasure is zero or negative");
1350  }
1351 
1352  return ductilityMeasure;
1353 }
1354 
1355 void
1357  const double sig,
1358  const double rho,
1359  const double tempKappa)
1360 {
1361  double thetaConst = pow(2. * cos(thetaTrial), 2.);
1362  double x = ( -( sig + fc / 3 ) ) / fc;
1363  if ( x < 0. ) {
1364  double dXDSig = -1. / fc;
1365  /* Introduce exponential help function which results in a
1366  * smooth transition. */
1367  double fZero = BHard;
1368  double fPrimeZero = -( BHard - AHard ) / ( CHard );
1369  double CHelp = DHard;
1370  double AHelp = fZero - CHelp;
1371  double BHelp = ( fZero - CHelp ) / fPrimeZero;
1372  double dDuctilityMeasureDX = AHelp / BHelp *exp(x / BHelp) / thetaConst;
1373  answer(0) = dDuctilityMeasureDX * dXDSig;
1374  answer(1) = 0.;
1375  } else {
1376  double dXDSig = -1. / fc;
1377  double dDuctilityMeasureDX = -( BHard - AHard ) / ( CHard ) / thetaConst *exp( -x / ( CHard ) );
1378  answer(0) = dDuctilityMeasureDX * dXDSig;
1379  answer(1) = 0.;
1380  }
1381 }
1382 
1383 
1384 void
1386  const double sig,
1387  const double rho,
1388  const double tempKappa)
1389 {
1390  //Compute dilation parameter
1391  const double R = ( sig - ft / 3. ) / fc;
1392  const double mQTension = ( 3. * ft / fc + m / 2. );
1393  const double mQCompression =
1394  ( 1. + 2. * dilationConst ) / ( dilationConst - 1. ) * ( 3. + m / 2. );
1395  const double AConst = -( ft + fc ) / ( 3. * fc ) / log(mQCompression / mQTension);
1396  const double mQ = mQTension * exp(R / AConst);
1397 
1398  //compute yieldHard and yieldSoft
1399  const double yieldHardOne = computeHardeningOne(tempKappa);
1400 
1401  const double Bl = sig / fc + rho / ( fc * sqrt(6.) );
1402 
1403  const double Al = ( 1. - yieldHardOne ) * pow(Bl, 2.) + sqrt(3. / 2.) * rho / fc;
1404 
1405  const double dgdsig = 4. * ( 1. - yieldHardOne ) / fc * Al * Bl + yieldHardOne * yieldHardOne * mQ / fc;
1406 
1407  const double dgdrho = Al / ( sqrt(6.) * fc ) * ( 4. * ( 1. - yieldHardOne ) * Bl + 6. ) +
1408  m *pow(yieldHardOne, 2.) / ( sqrt(6.) * fc );
1409 
1410  answer(0) = dgdsig;
1411  answer(1) = dgdrho;
1412 }
1413 
1414 
1415 double
1417  const double tempKappa)
1418 {
1419  //Compute dilation parameter
1420  const double R = ( sig - ft / 3. ) / fc;
1421  const double mQTension = ( 3. * ft / fc + m / 2. );
1422  const double mQCompression =
1423  ( 1. + 2. * dilationConst ) / ( dilationConst - 1. ) * ( 3. + m / 2. );
1424  const double AConst = -( ft + fc ) / ( 3. * fc ) / log(mQCompression / mQTension);
1425  const double mQ = mQTension * exp(R / AConst);
1426 
1427  //compute yieldHard and yieldSoft
1428  const double yieldHardOne = computeHardeningOne(tempKappa);
1429 
1430  const double Bl = sig / fc;
1431 
1432  const double Al = ( 1. - yieldHardOne ) * pow(Bl, 2.);
1433 
1434  const double dgdsig = 4. * ( 1. - yieldHardOne ) / fc * Al * Bl + yieldHardOne * yieldHardOne * mQ / fc;
1435 
1436  const double dgdrho = Al / ( sqrt(6.) * fc ) * ( 4. * ( 1. - yieldHardOne ) * Bl + 6. ) +
1437  m *pow(yieldHardOne, 2.) / ( sqrt(6.) * fc );
1438 
1439  /* Debug: Introduce the factor 2G/K. I am not sure if this is correct.
1440  * There might be too many stress states in the vertex case. */
1441  return dgdrho / dgdsig * 3. * ( 1. - 2. * nu ) / ( 1. + nu );
1442 }
1443 
1444 
1445 void
1447  const double sig,
1448  const double rho,
1449  const double tempKappa)
1450 {
1451  //Compute dilation parameter
1452  const double R = ( sig - ft / 3. ) / fc;
1453  const double mQTension = ( 3. * ft / fc + m / 2. );
1454  const double mQCompression =
1455  ( 1. + 2. * dilationConst ) / ( dilationConst - 1. ) * ( 3. + m / 2. );
1456  const double AConst = -( ft + fc ) / ( 3. * fc ) / log(mQCompression / mQTension);
1457  const double mQ = mQTension * exp(R / AConst);
1458 
1459  //compute yieldHard and yieldSoft
1460  const double yieldHardOne = computeHardeningOne(tempKappa);
1461  const double dYieldHardOneDKappa = computeHardeningOnePrime(tempKappa);
1462 
1463  const double Bl = sig / fc + rho / ( fc * sqrt(6.) );
1464 
1465  const double Al = ( 1. - yieldHardOne ) * pow(Bl, 2.) + sqrt(3. / 2.) * rho / fc;
1466 
1467  const double dAlDYieldHard = -pow(Bl, 2.);
1468 
1469  const double dDGDSigDKappa =
1470  ( -4. * Al * Bl / fc + 4. * ( 1 - yieldHardOne ) / fc * dAlDYieldHard * Bl +
1471  2. * yieldHardOne * mQ / fc ) * dYieldHardOneDKappa;
1472 
1473  const double dDGDRhoDKappa =
1474  ( dAlDYieldHard / ( sqrt(6.) * fc ) * ( 4. * ( 1. - yieldHardOne ) * Bl + 6. ) -
1475  4. * Al / ( sqrt(6.) * fc ) * Bl + 2. * m * yieldHardOne / ( sqrt(6.) * fc ) ) * dYieldHardOneDKappa;
1476 
1477  answer(0) = dDGDSigDKappa;
1478  answer(1) = dDGDRhoDKappa;
1479 }
1480 
1481 void
1483  const double sig,
1484  const double rho,
1485  const double tempKappa)
1486 {
1487  //Compute dilation parameter
1488  const double R = ( sig - ft / 3. ) / fc;
1489  const double mQTension = ( 3. * ft / fc + m / 2. );
1490  const double mQCompression =
1491  ( 1. + 2. * dilationConst ) / ( dilationConst - 1. ) * ( 3. + m / 2. );
1492  const double AConst = -( ft + fc ) / ( 3. * fc ) / log(mQCompression / mQTension);
1493  // const double mQ = mQTension*exp(R/AConst);
1494  const double dMQDSig = mQTension / ( AConst * fc ) * exp(R / AConst);
1495 
1496  //compute yieldHardOne and yieldSoft
1497  const double yieldHardOne = computeHardeningOne(tempKappa);
1498 
1499  //compute help parameter Al and Bl and the corresponding derivatives
1500  const double Bl = sig / fc + rho / ( fc * sqrt(6.) );
1501 
1502  const double Al = ( 1. - yieldHardOne ) * pow(Bl, 2.) +
1503  sqrt(3. / 2.) * rho / fc;
1504 
1505  const double dAlDSig = 2. * ( 1. - yieldHardOne ) * Bl / fc;
1506  const double dBlDSig = 1. / fc;
1507 
1508  const double dAlDRho = 2. * ( 1. - yieldHardOne ) * Bl / ( fc * sqrt(6.) ) + sqrt(3. / 2.) / fc;
1509  const double dBlDRho = 1. / ( fc * sqrt(6.) );
1510 
1511  //compute second derivatives of g
1512  const double ddgddSig = 4. * ( 1. - yieldHardOne ) / fc * ( dAlDSig * Bl + Al * dBlDSig ) +
1513  yieldHardOne * yieldHardOne * dMQDSig / fc;
1514 
1515  const double ddgddRho = dAlDRho / ( sqrt(6.) * fc ) * ( 4. * ( 1. - yieldHardOne ) * Bl + 6. ) +
1516  Al * dBlDRho * 4. * ( 1. - yieldHardOne ) / ( sqrt(6.) * fc );
1517 
1518  const double ddgdSigdRho = 4. * ( 1. - yieldHardOne ) / fc * ( dAlDRho * Bl + Al * dBlDRho );
1519 
1520  const double ddgdRhodSig = dAlDSig / ( sqrt(6.) * fc ) * ( 4. * ( 1. - yieldHardOne ) * Bl + 6. )
1521  + Al / ( sqrt(6.) * fc ) * ( 4. * ( 1. - yieldHardOne ) * dBlDSig );
1522 
1523  answer(0, 0) = ddgddSig;
1524  answer(0, 1) = ddgdSigdRho;
1525  answer(1, 0) = ddgdRhodSig;
1526  answer(1, 1) = ddgddRho;
1527 }
1528 
1529 void
1531  const double sig,
1532  const double rho,
1533  const double tempKappa)
1534 {
1535  FloatMatrix aMatrixInverse(3, 3);
1536  FloatArray dDKappaDDeltaLambdaDInv(2);
1537  FloatMatrix dDGDDInv(2, 2);
1538  FloatArray dDGDInvDKappa(2);
1539  double dDKappaDDeltaLambdaDKappa;
1540  answer.zero();
1541  computeDDGDDInv(dDGDDInv, sig, rho, tempKappa);
1542  computeDDKappaDDeltaLambdaDInv(dDKappaDDeltaLambdaDInv, sig, rho,
1543  tempKappa);
1544  dDKappaDDeltaLambdaDKappa =
1545  computeDDKappaDDeltaLambdaDKappa(sig, rho, tempKappa);
1546  computeDDGDInvDKappa(dDGDInvDKappa, sig, rho, tempKappa);
1547 
1548 
1549  aMatrixInverse(0, 0) = 1. / ( kM ) + deltaLambda *dDGDDInv(0, 0);
1550  aMatrixInverse(0, 1) = deltaLambda * dDGDDInv(0, 1);
1551  aMatrixInverse(0, 2) = deltaLambda * dDGDInvDKappa(0);
1552 
1553  aMatrixInverse(1, 0) = deltaLambda * dDGDDInv(1, 0);
1554  aMatrixInverse(1, 1) = 1. / ( 2. * gM ) + deltaLambda *dDGDDInv(1, 1);
1555  aMatrixInverse(1, 2) = deltaLambda * dDGDInvDKappa(1);
1556 
1557  aMatrixInverse(2, 0) = deltaLambda * dDKappaDDeltaLambdaDInv(0);
1558  aMatrixInverse(2, 1) = deltaLambda * dDKappaDDeltaLambdaDInv(1);
1559  aMatrixInverse(2, 2) = -1. + deltaLambda * dDKappaDDeltaLambdaDKappa;
1560 
1561  answer.beInverseOf(aMatrixInverse);
1562 }
1563 
1564 
1565 
1566 double
1567 ConcreteDPM :: computeHardeningOne(const double kappa) const
1568 {
1569  if ( kappa <= 0. ) {
1570  return yieldHardInitial;
1571  } else if ( kappa > 0. && kappa < 1. ) {
1572  return yieldHardInitial + ( 1. - yieldHardInitial ) *
1573  kappa * ( pow(kappa, 2.) - 3. * kappa + 3. );
1574  } else {
1575  return 1.;
1576  }
1577 }
1578 
1579 
1580 double
1582 {
1583  if ( kappa < 0. ) {
1584  return 3. * ( 1. - yieldHardInitial );
1585  } else if ( kappa >= 0. && kappa < 1. ) {
1586  return ( 1. - yieldHardInitial ) * ( 3. * pow(kappa, 2.) - 6. * kappa + 3. );
1587  } else {
1588  return 0.;
1589  }
1590 }
1591 
1592 void
1594  MatResponseMode mode,
1595  GaussPoint *gp,
1596  TimeStep *tStep)
1597 {
1598  ConcreteDPMStatus *status = giveStatus(gp);
1599  this->giveLinearElasticMaterial()->give3dMaterialStiffnessMatrix(answer, mode, gp, tStep);
1600  if ( mode == SecantStiffness || mode == TangentStiffness ) {
1601  double omega = status->giveTempDamage();
1602  if ( omega > 0.9999 ) {
1603  omega = 0.9999;
1604  }
1605 
1606  answer.times(1. - omega);
1607  }
1608 }
1609 
1610 
1611 void
1613 {
1614  FloatArray deviatoricStress;
1615  this->computeDeviatoricVolumetricSplit(deviatoricStress, effectiveStress);
1616  rho = computeSecondCoordinate(deviatoricStress);
1617  thetaTrial = computeThirdCoordinate(deviatoricStress);
1618 }
1619 
1620 
1621 void
1623 {
1624  ConcreteDPMStatus *status = giveStatus(gp);
1625  //Get kappaD from status to define state later on
1626  damage = status->giveDamage();
1627  tempDamage = status->giveTempDamage();
1628  kappaP = status->giveKappaP();
1629  tempKappaP = status->giveTempKappaP();
1630 
1631  if ( tempKappaP > kappaP ) {
1632  if ( tempDamage > damage ) {
1633  status->
1635  } else {
1637  }
1638  } else {
1639  const int state_flag = status->giveStateFlag();
1640  if ( state_flag == ConcreteDPMStatus :: ConcreteDPM_Elastic ) {
1641  if ( tempDamage > damage ) {
1642  status->
1643  letTempStateFlagBe(ConcreteDPMStatus :: ConcreteDPM_Damage);
1644  } else {
1645  status->
1646  letTempStateFlagBe(ConcreteDPMStatus :: ConcreteDPM_Elastic);
1647  }
1648  } else {
1649  if ( tempDamage > damage ) {
1650  status->
1651  letTempStateFlagBe(ConcreteDPMStatus :: ConcreteDPM_Damage);
1652  } else {
1653  status->
1654  letTempStateFlagBe(ConcreteDPMStatus :: ConcreteDPM_Unloading);
1655  }
1656  }
1657  }
1658 }
1659 
1660 void
1662  const FloatArray &stress) const
1663 {
1664  int size = 6;
1665  //compute volumetric deviatoric split
1666  FloatArray deviatoricStress;
1667  this->computeDeviatoricVolumetricSplit(deviatoricStress, stress);
1668  double rho = computeSecondCoordinate(deviatoricStress);
1669 
1670  //compute the derivative of J2 with respect to the stress
1671  FloatArray dJ2DStress;
1672  dJ2DStress = deviatoricStress;
1673  for ( int i = 3; i < size; i++ ) {
1674  dJ2DStress(i) = deviatoricStress(i) * 2.0;
1675  }
1676 
1677  //compute the derivative of rho with respect to stress
1678  FloatArray dRhoDStress;
1679  dRhoDStress = dJ2DStress;
1680  dRhoDStress.times(1. / rho);
1681 
1682  answer = dRhoDStress;
1683 }
1684 
1685 void
1687 {
1688  int size = 6;
1689  for ( int i = 0; i < 3; i++ ) {
1690  answer(i) = 1. / 3.;
1691  }
1692 
1693  for ( int i = 3; i < size; i++ ) {
1694  answer(i) = 0.;
1695  }
1696 }
1697 
1698 
1699 void
1701  const FloatArray &stress) const
1702 
1703 {
1704  int size = 6;
1705 
1706  //compute volumetric deviatoric split
1707  FloatArray deviatoricStress;
1708  this->computeDeviatoricVolumetricSplit(deviatoricStress, stress);
1709  double rho = computeSecondCoordinate(deviatoricStress);
1710 
1711 
1712  //compute first derivative of J2
1713  FloatArray dJ2dstress;
1714  dJ2dstress = deviatoricStress;
1715  for ( int i = 3; i < deviatoricStress.giveSize(); i++ ) {
1716  dJ2dstress(i) = deviatoricStress(i) * 2.;
1717  }
1718 
1719  //compute second derivative of J2
1720  FloatMatrix ddJ2ddstress(size, size);
1721  ddJ2ddstress.zero();
1722  for ( int i = 0; i < size; i++ ) {
1723  if ( i < 3 ) {
1724  ddJ2ddstress(i, i) = 2. / 3.;
1725  }
1726 
1727  if ( i > 2 ) {
1728  ddJ2ddstress(i, i) = 2.;
1729  }
1730  }
1731 
1732  ddJ2ddstress(0, 1) = -1. / 3.;
1733  ddJ2ddstress(0, 2) = -1. / 3.;
1734  ddJ2ddstress(1, 0) = -1. / 3.;
1735  ddJ2ddstress(1, 2) = -1. / 3.;
1736  ddJ2ddstress(2, 0) = -1. / 3.;
1737  ddJ2ddstress(2, 1) = -1. / 3.;
1738 
1739  //compute square of the first derivative of J2
1740  FloatMatrix dJ2DJ2(size, size);
1741  for ( int v = 0; v < size; v++ ) {
1742  for ( int w = 0; w < size; ++w ) {
1743  dJ2DJ2(v, w) = dJ2dstress(v) * dJ2dstress(w);
1744  }
1745  }
1746 
1747  //compute the second derivative of rho
1748  FloatMatrix ddRhoddStress;
1749  ddRhoddStress = ddJ2ddstress;
1750  ddRhoddStress.times(1. / rho);
1751  FloatMatrix help1;
1752  help1 = dJ2DJ2;
1753  help1.times( -1. / ( rho * rho * rho ) );
1754  ddRhoddStress.add(help1);
1755  answer = ddRhoddStress;
1756 }
1757 
1758 void
1760  const FloatArray &stress) const
1761 {
1762  int size = stress.giveSize();
1763 
1764  //compute volumetric deviatoric split
1765  FloatArray deviatoricStress;
1766  this->computeDeviatoricVolumetricSplit(deviatoricStress, stress);
1767 
1768  //compute the coordinates
1769  double rho = computeSecondCoordinate(deviatoricStress);
1770 
1771  //compute principal stresses and directions
1772  FloatArray principalDeviatoricStress;
1773  FloatMatrix principalDir;
1774  computePrincipalValDir(principalDeviatoricStress, principalDir, deviatoricStress, principal_stress);
1775 
1776  //compute the derivative of s1 with respect to the cartesian stress
1777  FloatArray ds1DStress(size);
1778  ds1DStress(0) = principalDir(0, 0) * principalDir(0, 0) - 1. / 3.;
1779  ds1DStress(1) = principalDir(1, 0) * principalDir(1, 0) - 1. / 3.;
1780  ds1DStress(2) = principalDir(2, 0) * principalDir(2, 0) - 1. / 3.;
1781  ds1DStress(3) = 2. * principalDir(1, 0) * principalDir(2, 0);
1782  ds1DStress(4) = 2. * principalDir(2, 0) * principalDir(0, 0);
1783  ds1DStress(5) = 2. * principalDir(0, 0) * principalDir(1, 0);
1784 
1785  //compute dCosThetaDStress
1786  FloatArray dCosThetaDStress;
1787  dCosThetaDStress = ds1DStress;
1788  dCosThetaDStress.times( sqrt(3. / 2.) * rho / pow(rho, 2.) );
1789  FloatArray help(size);
1790  computeDRhoDStress(help, stress);
1791  help.times( -sqrt(3. / 2.) * principalDeviatoricStress(0) / pow(rho, 2.) );
1792  dCosThetaDStress.add(help);
1793  answer = dCosThetaDStress;
1794 }
1795 
1796 double
1797 ConcreteDPM :: computeDRDCosTheta(const double theta, const double ecc) const
1798 {
1799  double ACostheta = 4. * ( 1. - ecc * ecc ) * cos(theta) * cos(theta) +
1800  ( 2. * ecc - 1. ) * ( 2. * ecc - 1. );
1801  double BCostheta = 2. * ( 1. - ecc * ecc ) * cos(theta) +
1802  ( 2. * ecc - 1. ) * sqrt(4. * ( 1. - ecc * ecc ) * cos(theta) * cos(theta)
1803  + 5. * ecc * ecc - 4. * ecc);
1804  double A1Costheta = 8. * ( 1. - pow(ecc, 2.) ) * cos(theta);
1805  double B1Costheta = 2. * ( 1. - pow(ecc, 2.) ) +
1806  4. * ( 2. * ecc - 1. ) * ( 1. - pow(ecc, 2.) ) * cos(theta) /
1807  sqrt(4. * ( 1. - pow(ecc, 2.) ) * pow(cos(theta), 2.) +
1808  5. * pow(ecc, 2.) - 4. * ecc);
1809  double dRDCostheta = A1Costheta / BCostheta - ACostheta / pow(BCostheta, 2.) * B1Costheta;
1810  return dRDCostheta;
1811 }
1812 
1813 int
1815 {
1816  ConcreteDPMStatus *status = giveStatus(gp);
1817  if ( status->setIPValue(value, type) ) {
1818  return 1;
1819  } else {
1820  return StructuralMaterial :: setIPValue(value, gp, type);
1821  }
1822 }
1823 
1824 int
1826 {
1827  const ConcreteDPMStatus *status = giveStatus(gp);
1828  //int state_flag = status->giveStateFlag();
1829  //double stateFlagValue = 0.;
1830 
1831  if ( type == IST_PlasticStrainTensor ) {
1832  answer = status->givePlasticStrain();
1833  return 1;
1834  } else if ( type == IST_DamageScalar ) {
1835  answer.resize(1);
1836  answer.at(1) = status->giveDamage();
1837  return 1;
1838  } else if ( type == IST_DamageTensor ) {
1839  answer.resize(6);
1840  answer.zero();
1841  answer.at(1) = answer.at(2) = answer.at(3) = status->giveDamage();
1842  return 1;
1843  } else if ( type == IST_PrincipalDamageTensor ) {
1844  answer.resize(3);
1845  answer.zero();
1846  answer.at(1) = answer.at(2) = answer.at(3) = status->giveDamage();
1847  return 1;
1848  } else if ( type == IST_DamageTensorTemp ) {
1849  answer.resize(1);
1850  answer.at(1) = status->giveTempDamage();
1851  return 1;
1852  } else if ( type == IST_CumPlasticStrain ) {
1853  answer.resize(1);
1854  answer.at(1) = status->giveKappaP();
1855  return 1;
1856  } else if ( type == IST_CumPlasticStrain_2 ) {
1857  answer.resize(1);
1858  answer.at(1) = status->giveKappaD();
1859  return 1;
1860  } else if ( type == IST_VolumetricPlasticStrain ) {
1861  answer.resize(1);
1862  answer.at(1) = status->giveVolumetricPlasticStrain();
1863  return 1;
1864  }
1865 
1866  return StructuralMaterial :: giveIPValue(answer, gp, type, tStep);
1867 }
1868 
1871 {
1872  ConcreteDPMStatus *status =
1874  return status;
1875 }
1876 } // end namespace oofem
virtual void updateYourself(TimeStep *tStep)
Update equilibrium history variables according to temp-variables.
Definition: structuralms.C:96
InternalStateType
Type representing the physical meaning of element or constitutive model internal variable.
void computeDDGDInvDKappa(FloatArray &answer, double sig, double rho, double tempKappa)
Here, the mixed derivative of the plastic potential with respect to the invariants and the hardening ...
Definition: concretedpm.C:1446
static void computePrincipalValues(FloatArray &answer, const FloatArray &s, stressStrainPrincMode mode)
Common functions for convenience.
void subtract(const FloatArray &src)
Subtracts array src to receiver.
Definition: floatarray.C:258
void computeDDKappaDDeltaLambdaDInv(FloatArray &answer, double sig, double rho, double tempKappa)
Computes the mixed derivative of the hardening parameter kappa with respect to the plastic multiplier...
Definition: concretedpm.C:1253
double ef
Control parameter for the exponential softening law.
Definition: concretedpm.h:439
void letTempStrainVectorBe(const FloatArray &v)
Assigns tempStrainVector to given vector v.
Definition: structuralms.h:137
void performPlasticityReturn(GaussPoint *gp, FloatArray &strain)
Definition: concretedpm.C:730
LinearElasticMaterial * giveLinearElasticMaterial()
Definition: concretedpm.h:470
#define _IFT_ConcreteDPM_fc
Definition: concretedpm.h:50
GaussPoint * gp
Associated integration point.
Class and object Domain.
Definition: domain.h:115
double computeDuctilityMeasureDamage(const FloatArray &strain, GaussPoint *gp)
Compute the ductility measure for the damage model.
Definition: concretedpm.C:700
For computing principal stresses.
For computing principal strains from engineering strains.
double computeMeanSize()
Computes the size of the element defined as its length.
Definition: element.C:1078
bool solveForRhs(const FloatArray &b, FloatArray &answer, bool transpose=false)
Solves the system of linear equations .
Definition: floatmatrix.C:1112
void letTempKappaPBe(double v)
Assign the temp value of the hardening variable of the plasticity model.
Definition: concretedpm.h:307
#define _IFT_ConcreteDPM_asoft
Definition: concretedpm.h:58
#define tAlpha
Definition: matconst.h:67
static double computeSecondCoordinate(const FloatArray &s)
FloatArray tempStrainVector
Temporary strain vector in reduced form (to find balanced state)
Definition: structuralms.h:75
#define ft_strength
Definition: matconst.h:91
The purpose of DataStream abstract class is to allow to store/restore context to different streams...
Definition: datastream.h:54
contextIOResultType storeYourself(DataStream &stream) const
Definition: floatarray.C:872
virtual int giveIPValue(FloatArray &answer, GaussPoint *gp, InternalStateType type, TimeStep *tStep)
Returns the integration point corresponding value in Reduced form.
double & at(int i)
Coefficient access function.
Definition: floatarray.h:131
#define _IFT_ConcreteDPM_bhard
Definition: concretedpm.h:55
double BHard
Parameter of the ductilityMeasure of the plasticity model.
Definition: concretedpm.h:379
#define _IFT_ConcreteDPM_href
Definition: concretedpm.h:64
This class implements a structural material status information.
Definition: structuralms.h:65
Updated Lagrange.
Definition: fmode.h:45
double href
Material parameter of the size-dependent adjustment (reference element size)
Definition: concretedpm.h:453
#define DPM_DAMAGE_TOLERANCE
Definition: concretedpm.C:581
FloatArray tempPlasticStrain
Definition: concretedpm.h:97
FloatArray stressVector
Equilibrated stress vector in reduced form.
Definition: structuralms.h:71
virtual contextIOResultType saveContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Stores receiver state to output stream.
Definition: concretedpm.C:175
void computeDCosThetaDStress(FloatArray &answer, const FloatArray &stress) const
Computes the derivative of costheta with respect to the stress.
Definition: concretedpm.C:1759
static void applyElasticCompliance(FloatArray &strain, const FloatArray &stress, double EModulus, double nu)
virtual bool hasField(InputFieldType id)=0
Returns true if record contains field identified by idString keyword.
void computeDRhoDStress(FloatArray &answer, const FloatArray &stress) const
Computes the derivative of rho with respect to the stress.
Definition: concretedpm.C:1661
Dictionary propertyDictionary
Property dictionary.
Definition: material.h:105
int giveStateFlag() const
Get the state flag from the material status.
Definition: concretedpm.h:233
Concrete_VertexType vertexType
Definition: concretedpm.h:369
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
virtual void computeEquivalentStrain(double &kappaD, const FloatArray &elasticStrain, GaussPoint *gp, TimeStep *tStep)
Compute equivalent strain value.
Definition: concretedpm.C:514
Element * giveElement()
Returns corresponding element to receiver.
Definition: gausspoint.h:188
General IO error.
double dilationConst
Control parameter for te volumetric plastic flow of the plastic potential.
Definition: concretedpm.h:392
void initDamaged(double kappa, const FloatArray &elasticStrain, GaussPoint *gp)
Initialize the characteristic length, if damage is not yet activated.
Definition: concretedpm.C:655
#define _IFT_ConcreteDPM_dilation
Definition: concretedpm.h:59
ConcreteDPM(int n, Domain *d)
Constructor.
Definition: concretedpm.C:316
virtual void printOutputAt(FILE *file, TimeStep *tStep)
Print receiver&#39;s output to given stream.
Definition: structuralms.C:73
static void computePrincipalValDir(FloatArray &answer, FloatMatrix &dir, const FloatArray &s, stressStrainPrincMode mode)
Computes principal values and directions of stress or strain vector.
MatResponseMode
Describes the character of characteristic material matrix.
virtual int read(int *data, int count)=0
Reads count integer values into array pointed by data.
#define _IFT_ConcreteDPM_gf
Definition: concretedpm.h:63
void letTempPlasticStrainBe(const FloatArray &v)
Assign the temp value of deviatoric plastic strain.
Definition: concretedpm.h:288
void letTempEquivStrainBe(double v)
Assign the temp value of the hardening variable of the damage model.
Definition: concretedpm.h:321
#define THROW_CIOERR(e)
Definition: contextioerr.h:61
const FloatArray & givePlasticStrain() const
Get the plastic strain deviator from the material status.
Definition: concretedpm.h:163
double thetaTrial
The lode angle of the trial stress.
Definition: concretedpm.h:403
#define _IFT_ConcreteDPM_kinit
Definition: concretedpm.h:53
virtual void give3dMaterialStiffnessMatrix(FloatMatrix &answer, MatResponseMode mode, GaussPoint *gp, TimeStep *tStep)
Computes full 3d material stiffness matrix at given integration point, time, respecting load history ...
Definition: concretedpm.C:1593
double eM
Elastic Young&#39;s modulus.
Definition: concretedpm.h:418
double giveEquivStrain() const
Get the equivalent strain from the material status.
Definition: concretedpm.h:203
void beDifferenceOf(const FloatArray &a, const FloatArray &b)
Sets receiver to be a - b.
Definition: floatarray.C:341
double kappaD
Hardening variable of damage model.
Definition: concretedpm.h:431
void computeDDuctilityMeasureDInv(FloatArray &answer, double sig, double rho, double tempKappa)
Computes the first derivative of the ductility measure with respect to the invariants sig and rho bas...
Definition: concretedpm.C:1356
REGISTER_Material_Alt(ConcreteDPM, concreteidp)
double computeInverseDamage(double dam, GaussPoint *gp)
Compute the damage-driving variable from given damage.
Definition: concretedpm.C:563
double giveLe()
Gives the characteristic length.
Definition: concretedpm.h:338
virtual int write(const int *data, int count)=0
Writes count integer values from array pointed by data.
void computeAMatrix(FloatMatrix &answer, double sig, double rho, double tempKappa)
This matrix is the core of the closest point projection and collects the derivative of the flow rule ...
Definition: concretedpm.C:1530
virtual contextIOResultType restoreContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Restores the receiver state previously written in stream.
Definition: concretedpm.C:223
virtual double give(int aProperty, GaussPoint *gp)
Returns the value of material property &#39;aProperty&#39;.
Definition: material.C:52
void computeDGDInv(FloatArray &answer, double sig, double rho, double tempKappa)
Here, the first derivative of the plastic potential with respect to the invariants sig and rho are co...
Definition: concretedpm.C:1385
double giveDeviatoricPlasticStrainNorm()
Get the deviatoric plastic strain norm from the material status.
Definition: concretedpm.h:170
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
#define _IFT_IsotropicLinearElasticMaterial_talpha
ConcreteDPMStatus(int n, Domain *d, GaussPoint *gp)
Constructor.
Definition: concretedpm.C:54
#define _IFT_IsotropicLinearElasticMaterial_n
#define _IFT_ConcreteDPM_wf
Definition: concretedpm.h:62
#define _IFT_ConcreteDPM_chard
Definition: concretedpm.h:56
double DHard
Parameter of the ductilityMeasure of the plasticity model.
Definition: concretedpm.h:383
#define E(p)
Definition: mdm.C:368
virtual ~ConcreteDPMStatus()
Destructor.
Definition: concretedpm.C:77
#define _IFT_ConcreteDPM_yieldtol
Definition: concretedpm.h:60
double computeDDKappaDDeltaLambdaDKappa(double sig, double rho, double tempKappa)
Computes the derivative of the evolution law of the hardening parameter kappa with respect to the har...
Definition: concretedpm.C:1293
LinearElasticMaterial * linearElasticMaterial
Pointer for linear elastic material.
Definition: concretedpm.h:415
#define M_PI
Definition: mathfem.h:52
double dotProduct(const FloatArray &x) const
Computes the dot product (or inner product) of receiver and argument.
Definition: floatarray.C:463
This class implements an isotropic linear elastic material in a finite element problem.
double fc
Parameters of the yield surface of the plasticity model.
Definition: concretedpm.h:374
#define OOFEM_ERROR(...)
Definition: error.h:61
static void applyElasticStiffness(FloatArray &stress, const FloatArray &strain, double EModulus, double nu)
double giveEpsLoc() const
Get the value of omega*ft/E at the expected onset of localization (defined by negative second-order w...
Definition: concretedpm.h:211
double yieldTol
Yield tolerance for the plasticity model.
Definition: concretedpm.h:442
double kappaP
Hardening variable of plasticity model.
Definition: concretedpm.h:427
virtual void give3dMaterialStiffnessMatrix(FloatMatrix &answer, MatResponseMode mode, GaussPoint *gp, TimeStep *tStep)
Computes full 3d material stiffness matrix at given integration point, time, respecting load history ...
double computeHardeningOne(double tempKappa) const
Compute the value of the hardening function based on the hardening variable.
Definition: concretedpm.C:1567
void times(double f)
Multiplies receiver by factor f.
Definition: floatmatrix.C:1594
double giveKappaD() const
Get the hardening variable of the damage model from the material status.
Definition: concretedpm.h:196
virtual int setIPValue(const FloatArray &value, GaussPoint *gp, InternalStateType type)
Sets the value of a certain variable at a given integration point to the given value.
Definition: concretedpm.C:1814
virtual void updateYourself(TimeStep *tStep)
Update equilibrium history variables according to temp-variables.
Definition: concretedpm.C:95
contextIOResultType restoreYourself(DataStream &stream)
Definition: floatarray.C:895
double computeRatioPotential(double sig, double tempKappa)
This function computes the ratio of the volumetric and deviatoric component of the flow direction...
Definition: concretedpm.C:1416
virtual int setIPValue(const FloatArray &value, GaussPoint *gp, InternalStateType type)
Sets the value of a certain variable at a given integration point to the given value.
void giveStressDependentPartOfStrainVector_3d(FloatArray &answer, GaussPoint *gp, const FloatArray &reducedStrainVector, TimeStep *tStep, ValueModeType mode)
#define _IFT_ConcreteDPM_ft
Definition: concretedpm.h:51
void beProductOf(const FloatMatrix &aMatrix, const FloatArray &anArray)
Receiver becomes the result of the product of aMatrix and anArray.
Definition: floatarray.C:676
virtual ConcreteDPMStatus * giveStatus(GaussPoint *gp) const
Returns material status of receiver in given integration point.
Definition: concretedpm.h:467
double m
The friction parameter of the yield surface.
Definition: concretedpm.h:406
#define _IFT_IsotropicLinearElasticMaterial_e
void computeTrialCoordinates(const FloatArray &stress, GaussPoint *gp)
Compute the trial coordinates.
Definition: concretedpm.C:1612
void letTempKappaDBe(double v)
Assign the temp value of the hardening variable of the damage model.
Definition: concretedpm.h:315
void letTempStateFlagBe(int v)
Assign the temp value of the state flag.
Definition: concretedpm.h:351
double at(int i, int j) const
Coefficient access function.
Definition: floatmatrix.h:176
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
Definition: concretedpm.C:338
double giveTempKappaP() const
Get the temp value of the hardening variable of the plasticity model from the material status...
Definition: concretedpm.h:253
double yieldHardInitial
Parameter of the hardening law of the plasticity model.
Definition: concretedpm.h:389
#define _IFT_ConcreteDPM_helem
Definition: concretedpm.h:65
double computeYieldValue(double sig, double rho, double theta, double tempKappa) const
Compute the yield value based on stress and hardening variable.
Definition: concretedpm.C:1131
virtual contextIOResultType restoreContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Restores the receiver state previously written in stream.
Definition: structuralms.C:157
double ASoft
Parameter of the ductilityMeasure of the damage model.
Definition: concretedpm.h:386
#define _IFT_ConcreteDPM_ahard
Definition: concretedpm.h:54
void letDeltaLambdaBe(double v)
Assign the value of deviatoric plastic strain.
Definition: concretedpm.h:294
Abstract base class representing a material status information.
Definition: matstatus.h:84
Pair * add(int aKey, double value)
Adds a new Pair with given keyword and value into receiver.
Definition: dictionary.C:81
virtual void giveRealStressVector_3d(FloatArray &answer, GaussPoint *gp, const FloatArray &reducedStrain, TimeStep *tStep)
Default implementation relies on giveRealStressVector for second Piola-Kirchoff stress.
Definition: concretedpm.C:421
FloatArray effectiveStress
Stress and its deviatoric part.
Definition: concretedpm.h:448
int setIPValue(const FloatArray &value, InternalStateType type)
Definition: concretedpm.C:269
static double computeThirdCoordinate(const FloatArray &s)
double mQ
The dilation parameter of the plastic potential.
Definition: concretedpm.h:409
Class representing vector of real numbers.
Definition: floatarray.h:82
double deltaLambda
Plastic multiplier of the plasticity model.
Definition: concretedpm.h:395
const FloatArray & giveTempPlasticStrain() const
Get the temp value of the full plastic strain vector from the material status.
Definition: concretedpm.h:239
#define fc_strength
Definition: matconst.h:92
FloatArray strainVector
Equilibrated strain vector in reduced form.
Definition: structuralms.h:69
Implementation of matrix containing floating point numbers.
Definition: floatmatrix.h:94
double nu
Elastic Poisson&#39;s ration.
Definition: concretedpm.h:424
IRResultType
Type defining the return values of InputRecord reading operations.
Definition: irresulttype.h:47
double kM
Elastic bulk modulus.
Definition: concretedpm.h:422
void letDeltaEquivStrainBe(double v)
Assign the temp value of the damage variable of the damage model.
Definition: concretedpm.h:333
void letTempStressVectorBe(const FloatArray &v)
Assigns tempStressVector to given vector v.
Definition: structuralms.h:135
#define _IFT_ConcreteDPM_dhard
Definition: concretedpm.h:57
const FloatArray & giveStressVector() const
Returns the const pointer to receiver&#39;s stress vector.
Definition: structuralms.h:107
double computeDFDKappa(double sig, double rho, double tempKappa)
Compute the derivative of the yield surface with respect to the hardening variable based on the stres...
Definition: concretedpm.C:1159
void computeDDGDDInv(FloatMatrix &answer, double sig, double rho, double tempKappa)
Here, the second derivative of the plastic potential with respect to the invariants sig and rho are c...
Definition: concretedpm.C:1482
Class representing the general Input Record.
Definition: inputrecord.h:101
void add(const FloatMatrix &a)
Adds matrix to the receiver.
Definition: floatmatrix.C:1023
void computeDFDInv(FloatArray &answer, double sig, double rho, double tempKappa) const
Computes the derivative of the yield surface with respect to the invariants sig and rho...
Definition: concretedpm.C:1205
double sig
the volumetric stress.
Definition: concretedpm.h:398
virtual double computeDuctilityMeasure(double sig, double rho, double theta)
Compute the ductility measure based on the stress state.
Definition: concretedpm.C:1328
#define _IFT_ConcreteDPM_ecc
Definition: concretedpm.h:52
double computeDKappaDDeltaLambda(double sig, double rho, double tempKappa)
Compute the derivative of kappa with respect of delta lambda based on the stress state and the harden...
Definition: concretedpm.C:1234
double AHard
Parameter of the ductilityMeasure of the plasticity model.
Definition: concretedpm.h:377
void zero()
Zeroes all coefficients of receiver.
Definition: floatarray.C:658
double giveVolumetricPlasticStrain() const
Definition: concretedpm.h:179
void computeDSigDStress(FloatArray &answer) const
Computes the derivative of sig with respect to the stress.
Definition: concretedpm.C:1686
virtual double giveCharacteristicLength(const FloatArray &normalToCrackPlane)
Returns the size of element in the given direction, in some cases adjusted (e.g.
Definition: element.h:874
double computeDRDCosTheta(double theta, double ecc) const
Compute the derivative of R with respect to costheta.
Definition: concretedpm.C:1797
double rho
The length of the deviatoric stress.
Definition: concretedpm.h:400
virtual void restoreConsistency()
Restores consistency of the status, i.e., computes or corrects the values of certain status variables...
Definition: concretedpm.C:290
void times(double s)
Multiplies receiver with scalar.
Definition: floatarray.C:818
static double computeDeviatoricVolumetricSplit(FloatArray &dev, const FloatArray &s)
Computes split of receiver into deviatoric and volumetric part.
long ContextMode
Context mode (mask), defining the type of information written/read to/from context.
Definition: contextmode.h:43
double gM
Elastic shear modulus.
Definition: concretedpm.h:420
Abstract base class for all "structural" constitutive models.
void letTempEpslocBe(double v)
History variable of the modified size-dependent adjustment Assign the temp value of the damage variab...
Definition: concretedpm.h:218
void zero()
Zeroes all coefficient of receiver.
Definition: floatmatrix.C:1326
virtual void initTempStatus()
Initializes the temporary internal variables, describing the current state according to previously re...
Definition: structuralms.C:108
Domain * giveDomain() const
Definition: femcmpnn.h:100
virtual ~ConcreteDPM()
Destructor.
Definition: concretedpm.C:332
double helem
Element size (to be used in fracture energy approach (crack band).
Definition: concretedpm.h:412
REGISTER_Material(DummyMaterial)
void letTempVolumetricPlasticStrainBe(double v)
Assign the temp value of the volumetric plastic strain in plane stress.
Definition: concretedpm.h:300
void performRegularReturn(FloatArray &stress, GaussPoint *gp)
Perform regular stress return for the plasticity model, i.e.
Definition: concretedpm.C:831
#define IR_GIVE_OPTIONAL_FIELD(__ir, __value, __id)
Macro facilitating the use of input record reading methods.
Definition: inputrecord.h:78
double CHard
Parameter of the ductilityMeasure of the plasticity model.
Definition: concretedpm.h:381
virtual void initTempStatus()
Initializes the temporary internal variables, describing the current state according to previously re...
Definition: concretedpm.C:81
int newtonIter
Maximum number of iterations for stress return.
Definition: concretedpm.h:445
int giveSize() const
Returns the size of receiver.
Definition: floatarray.h:218
void assignStateFlag(GaussPoint *gp)
Assign state flag.
Definition: concretedpm.C:1622
virtual contextIOResultType saveContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Stores receiver state to output stream.
Definition: structuralms.C:133
double giveTempDamage() const
Get the temp value of the hardening variable of the damage model from the material status...
Definition: concretedpm.h:267
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 damage
Damage variable of damage model.
Definition: concretedpm.h:435
virtual MaterialStatus * CreateStatus(GaussPoint *gp) const
Creates new copy of associated status and inserts it into given integration point.
Definition: concretedpm.C:1870
double computeDamage(const FloatArray &strain, GaussPoint *gp, TimeStep *tStep)
Perform stress return for the damage model, i.e.
Definition: concretedpm.C:485
void beInverseOf(const FloatMatrix &src)
Modifies receiver to become inverse of given parameter.
Definition: floatmatrix.C:835
void negated()
Switches the sign of every coefficient of receiver.
Definition: floatarray.C:739
double giveKappaP() const
Get the hardening variable of the plasticity model.
Definition: concretedpm.h:189
const FloatArray & giveStrainVector() const
Returns the const pointer to receiver&#39;s strain vector.
Definition: structuralms.h:105
FloatArray tempStressVector
Temporary stress vector in reduced form (increments are used mainly in nonlinear analysis) ...
Definition: structuralms.h:73
void computeDDRhoDDStress(FloatMatrix &answer, const FloatArray &stress) const
Computes the second derivative of rho with the respect to the stress.
Definition: concretedpm.C:1700
static void transformStressVectorTo(FloatArray &answer, const FloatMatrix &base, const FloatArray &stressVector, bool transpose=false)
Transforms 3d stress vector into another coordinate system.
double computeHardeningOnePrime(double tempKappa) const
Compute the derivative of the hardening function based on the hardening parameter.
Definition: concretedpm.C:1581
virtual int giveIPValue(FloatArray &answer, GaussPoint *gp, InternalStateType type, TimeStep *tStep)
Returns the integration point corresponding value in Reduced form.
Definition: concretedpm.C:1825
double giveDamage() const
Get the damage variable of the damage model from the material status.
Definition: concretedpm.h:227
Class representing integration point in finite element program.
Definition: gausspoint.h:93
This class contains the combination of a local plasticity model for concrete with a local isotropic d...
Definition: concretedpm.h:365
#define _IFT_ConcreteDPM_newtoniter
Definition: concretedpm.h:61
Class representing solution step.
Definition: timestep.h:80
virtual void printOutputAt(FILE *file, TimeStep *tStep)
Print receiver&#39;s output to given stream.
Definition: concretedpm.C:115
void performVertexReturn(FloatArray &stress, double apexStress, GaussPoint *gp)
Perform stress return for vertex case of the plasticity model, i.e.
Definition: concretedpm.C:1016
double computeTempKappa(double kappaInitial, double sigTrial, double rhoTrial, double sig)
Compute temporary kappa.
Definition: concretedpm.C:1112
void letTempDamageBe(double v)
Assign the temp value of the damage variable of the damage model.
Definition: concretedpm.h:327
void add(const FloatArray &src)
Adds array src to receiver.
Definition: floatarray.C:156
void setLe(double ls)
Sets the characteristic length.
Definition: concretedpm.h:344
virtual Material * giveMaterial()
Definition: element.C:484
bool checkForVertexCase(double &answer, double sig, double tempKappa)
Check if the trial stress state falls within the vertex region of the plasticity model at the apex of...
Definition: concretedpm.C:782
void resize(int s)
Resizes receiver towards requested size.
Definition: floatarray.C:631
virtual double computeDamageParam(double kappa, GaussPoint *gp)
Compute damage parameter.
Definition: concretedpm.C:584

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:28 for OOFEM by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2011