OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
trabbone3d.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 "trabbone3d.h"
36 #include "gausspoint.h"
37 #include "floatmatrix.h"
38 #include "floatarray.h"
39 #include "mathfem.h"
40 #include "internalstatetype.h"
41 #include "contextioerr.h"
42 #include "intarray.h"
43 #include "datastream.h"
44 #include "classfactory.h"
45 
46 
47 namespace oofem {
48 REGISTER_Material(TrabBone3D);
49 
51 { }
52 
53 
54 void TrabBone3D :: computePlasStrainEnerDensity(GaussPoint *gp, const FloatArray &totalStrain, const FloatArray &totalStress)
55 {
56  TrabBone3DStatus *status = static_cast< TrabBone3DStatus * >( this->giveStatus(gp) );
57 
58  double tsed, tempPSED, tempTSED, tempESED;
59  FloatArray oldTotalDef, tempPlasDef, oldStress;
60 
61  oldTotalDef = status->giveStrainVector();
62 
63  tsed = status->giveTSED();
64  tempPlasDef = status->giveTempPlasDef();
65  oldStress = status->giveTempStressVector();
66 
67  FloatArray elStrain, deltaStrain, tmpStress;
68 
69  elStrain.beDifferenceOf(totalStrain, tempPlasDef);
70  deltaStrain.beDifferenceOf(totalStrain, oldTotalDef);
71 
72  tmpStress = totalStress;
73  tmpStress.add(oldStress);
74 
75  tempESED = 0.5 * elStrain.dotProduct(totalStress);
76  tempTSED = tsed + 0.5 * deltaStrain.dotProduct(tmpStress);
77  tempPSED = tempTSED - tempESED;
78 
79  status->setTempTSED(tempTSED);
80  status->setTempPSED(tempPSED);
81 }
82 
83 
84 void
86  MatResponseMode mode, GaussPoint *gp,
87  TimeStep *tStep)
88 {
89  double tempDam, beta, tempKappa, kappa;
90  FloatArray tempEffectiveStress, tempTensor2, prodTensor, plasFlowDirec;
91  FloatMatrix elasticity, compliance, SSaTensor, secondTerm, thirdTerm, tangentMatrix;
92  TrabBone3DStatus *status = static_cast< TrabBone3DStatus * >( this->giveStatus(gp) );
93 
94  if ( mode == ElasticStiffness ) {
95  this->constructAnisoComplTensor(compliance);
96  elasticity.beInverseOf(compliance);
97  answer = elasticity;
98  } else if ( mode == SecantStiffness ) {
99  if ( printflag ) {
100  printf("secant\n");
101  }
102 
103  this->constructAnisoStiffnessTensor(elasticity);
104 
105  this->constructAnisoComplTensor(compliance);
106  elasticity.beInverseOf(compliance);
107 
108  tempDam = status->giveTempDam();
109  answer = elasticity;
110  answer.times(1.0 - tempDam);
111  } else if ( mode == TangentStiffness ) {
112  kappa = status->giveKappa();
113  tempKappa = status->giveTempKappa();
114  tempDam = status->giveTempDam();
115  if ( tempKappa > kappa ) {
116  // plastic loading
117  // Imports
118  tempEffectiveStress = status->giveTempEffectiveStress();
119  plasFlowDirec = status->givePlasFlowDirec();
120  SSaTensor = status->giveSSaTensor();
121  beta = status->giveBeta();
122  // Construction of the dyadic product tensor
123  prodTensor.beTProductOf(SSaTensor, plasFlowDirec);
124  // Construction of the tangent stiffness third term
125  thirdTerm.beDyadicProductOf(tempEffectiveStress, prodTensor);
126  thirdTerm.times( -expDam * critDam * exp(-expDam * tempKappa) );
127  thirdTerm.times(1. / beta);
128  // Construction of the tangent stiffness second term
129  tempTensor2.beProductOf(SSaTensor, plasFlowDirec);
130  secondTerm.beDyadicProductOf(tempTensor2, prodTensor);
131  secondTerm.times(-( 1.0 - tempDam ) / beta);
132  // Construction of the tangent stiffness
133  tangentMatrix = SSaTensor;
134  tangentMatrix.times(1.0 - tempDam);
135  tangentMatrix.add(secondTerm);
136  tangentMatrix.add(thirdTerm);
137  answer = tangentMatrix;
138  } else {
139  // elastic behavior with damage
140  // Construction of the secant stiffness
141  this->constructAnisoComplTensor(compliance);
142  elasticity.beInverseOf(compliance);
143  answer = elasticity;
144  answer.times(1.0 - tempDam);
145  }
146 
147  double g = status->giveDensG();
148  if ( g <= 0. ) {
149  double factor = gammaL0 * pow(rho, rL) + gammaP0 *pow(rho, rP) * ( tDens - 1 ) * pow(g, tDens - 2);
150  // printf("densification");
151  tangentMatrix.resize(6, 6);
152  tangentMatrix.zero();
153  tangentMatrix.at(1, 1) = tangentMatrix.at(1, 2) = tangentMatrix.at(1, 3) = 1;
154  tangentMatrix.at(2, 1) = tangentMatrix.at(2, 2) = tangentMatrix.at(2, 3) = 1;
155  tangentMatrix.at(3, 1) = tangentMatrix.at(3, 2) = tangentMatrix.at(3, 3) = 1;
156  tangentMatrix.times(factor);
157  answer.add(tangentMatrix);
158  }
159  }
160 
161  status->setSmtrx(answer);
162 }
163 
164 
165 double
167 {
168  return ( 1. + plasHardFactor * ( 1.0 - exp(-kappa * expPlasHard) ) );
169 }
170 
171 double
173 {
174  return ( plasHardFactor * expPlasHard * exp(-kappa * expPlasHard) );
175 }
176 
177 
178 double
179 TrabBone3D :: evaluateCurrentViscousStress(const double deltaKappa, TimeStep *tStep)
180 {
181  double deltaT = tStep->giveTimeIncrement();
182  double answer;
183  if ( deltaT == 0 ) {
184  answer = 0;
185  } else {
186  answer = -viscosity * deltaKappa / deltaT;
187  }
188 
189  return answer;
190 }
191 
192 double
194 {
195  double deltaT = tStep->giveTimeIncrement();
196  double answer = -viscosity / deltaT;
197 
198  return answer;
199 }
200 
201 
202 void
204 {
205  bool convergence;
206  double tempKappa;
207  FloatArray tempPlasDef, tempEffectiveStress, trialEffectiveStress;
208  FloatMatrix elasticity, compliance;
209 
210  TrabBone3DStatus *status = static_cast< TrabBone3DStatus * >( this->giveStatus(gp) );
211 
212  // elastic compliance
213  this->constructAnisoComplTensor(compliance);
214  // elastic stiffness
215  elasticity.beInverseOf(compliance);
216 
217  // this->constructAnisoStiffnessTensor(elasticity);
218  // initialize the plastic strain and cumulative plastic strain
219  // by values after the previous step
220  tempPlasDef = status->givePlasDef();
221  tempKappa = status->giveKappa();
222  // evaluate the trial stress
223  trialEffectiveStress.beProductOf(elasticity, totalStrain - tempPlasDef);
224  tempEffectiveStress = trialEffectiveStress;
225  // apply the iterative procedure that solves the system of nonlinear equations
226  // consisting of the yield condition and discretized flow rule
227  // and evaluates:
228  // tempKappa ... cumulative plastic strain at the end of the substep
229  // tempEffectiveStress ... effective stress at the end of the substep
230  // tempPlasDef ... plastic strain at the end of the substep
231  convergence = projectOnYieldSurface(tempKappa, tempEffectiveStress, tempPlasDef, trialEffectiveStress, elasticity, compliance, status, tStep, gp, 0);
232  if ( convergence ) {
233  status->setTempPlasDef(tempPlasDef);
234  status->setTempKappa(tempKappa);
235  status->setTempEffectiveStress(tempEffectiveStress);
236  } else {
237  //printf("LineSearch \n");
238  tempEffectiveStress = trialEffectiveStress;
239  tempKappa = status->giveKappa();
240  tempPlasDef = status->givePlasDef();
241  convergence = projectOnYieldSurface(tempKappa, tempEffectiveStress, tempPlasDef, trialEffectiveStress, elasticity, compliance, status, tStep, gp, 1);
242  if ( !convergence ) {
243  OOFEM_ERROR("No convergence of the stress return algorithm in TrabBone3D :: performPlasticityReturn\n");
244  }
245 
246  status->setTempPlasDef(tempPlasDef);
247  status->setTempKappa(tempKappa);
248  status->setTempEffectiveStress(tempEffectiveStress);
249  }
250 }
251 
252 
253 bool
254 TrabBone3D :: projectOnYieldSurface(double &tempKappa, FloatArray &tempEffectiveStress, FloatArray &tempPlasDef, const FloatArray &trialEffectiveStress, const FloatMatrix &elasticity, const FloatMatrix &compliance, TrabBone3DStatus *status, TimeStep *tStep, GaussPoint *gp, int lineSearchFlag)
255 {
256  bool convergence;
257  int flagLoop;
258  double deltaKappa, incKappa, beta, tempScalar, norm, FS, SFS;
259  double plasCriterion, plasModulus, viscoModulus, toSolveScalar, errorF, errorR;
260  FloatArray incTempEffectiveStress, errLoop;
261  FloatArray toSolveTensor, plasFlowDirec, tempTensor2, tensorFF_S, F;
262  FloatMatrix fabric, SSaTensor, tempTensor4, normAdjust, derivPlasFlowDirec;
263 
264  this->constructAnisoFabricTensor(fabric);
265  this->constructAnisoFtensor(F);
266 
267  tempTensor2.beProductOf(fabric, trialEffectiveStress);
268  FS = F.dotProduct(trialEffectiveStress);
269  SFS = sqrt( trialEffectiveStress.dotProduct(tempTensor2) );
270  plasCriterion = SFS + FS - this->evaluateCurrentYieldStress(tempKappa);
271 
272  if ( plasCriterion < rel_yield_tol ) {
273  // trial stress in elastic domain
274  convergence = true;
275  } else {
276  // return to the yield surface needed
277  // Initial valuesr
278  toSolveTensor.resize(6);
279  toSolveTensor.zero();
280  toSolveScalar = plasCriterion;
281  errorF = plasCriterion;
282  errorR = 0;
283  SSaTensor = elasticity;
284  this->constructPlasFlowDirec(plasFlowDirec, norm, fabric, F, tempEffectiveStress);
285  tensorFF_S.beProductOf(fabric, tempEffectiveStress);
286  deltaKappa = 0.;
287  /***********************************************************************************************/
288  double radialReturnFlag = lineSearchFlag;
289  if ( radialReturnFlag == 2 ) {
290  //printf("Radial return");
291  double denom, dSYdA, dAlfa;
292  double k = tempKappa;
293  double f = plasCriterion;
294  double alfa = 1;
295  FloatArray helpArray, stress;
296  stress.resize(6);
297  stress.zero();
298  double SFSr = sqrt( trialEffectiveStress.dotProduct(tempTensor2) );
299  double FSr = F.dotProduct(trialEffectiveStress);
300  tempTensor2.beProductOf(compliance, trialEffectiveStress);
301  this->constructNormAdjustTensor(normAdjust);
302  helpArray.beProductOf(normAdjust, tempTensor2);
303  norm = sqrt( tempTensor2.dotProduct(helpArray) );
304  while ( fabs(f) > 1.e-12 ) {
305  dSYdA = norm * this->evaluateCurrentPlasticModulus(k);
306  dSYdA *= -norm;
307  denom = SFSr + FSr - dSYdA;
308  dAlfa = -f / denom;
309  alfa += dAlfa;
310  stress = trialEffectiveStress;
311  stress.times(alfa);
312  k = k + ( 1 - alfa ) * norm;
313  f = evaluatePlasCriterion(fabric, F, stress, k, ( 1 - alfa ) * norm, tStep);
314  }
315 
316  tempEffectiveStress = stress;
317  deltaKappa = k;
318  toSolveScalar = 0;
319  this->constructPlasFlowDirec(plasFlowDirec, norm, fabric, F, tempEffectiveStress);
320 
321 
322  if ( tempEffectiveStress.giveSize() != trialEffectiveStress.giveSize() ) {
323  printf( "tempS %d \n", tempEffectiveStress.giveSize() );
324  printf( "trial S %d \n", trialEffectiveStress.giveSize() );
325  }
326 
327  tempTensor2.beProductOf( compliance, ( tempEffectiveStress - trialEffectiveStress ) );
328  toSolveTensor = tempTensor2 + deltaKappa * plasFlowDirec;
329  // Construction of the derivative of the plastic flow
330  this->constructDerivativeOfPlasFlowDirec(derivPlasFlowDirec, fabric, F, tempEffectiveStress);
331  // Construction of the gradient Nabla_S of R and SSa tensor
332  tempTensor4 = derivPlasFlowDirec;
333  tempTensor4.times(deltaKappa);
334  tempTensor4.add(compliance);
335  SSaTensor.beInverseOf(tempTensor4);
336  }
337 
338  /***********************************************************************************************/
339  // iteration loop - solution of a set of nonlinear equations
340  flagLoop = 1;
341  do {
342  plasModulus = evaluateCurrentPlasticModulus(tempKappa + deltaKappa);
343  viscoModulus = evaluateCurrentViscousModulus(deltaKappa, tStep);
344  //*************************************
345  //Evaluation of the Recursive Equations
346  //*************************************
347  tempTensor2.beProductOf(SSaTensor, plasFlowDirec);
348  beta = plasFlowDirec.dotProduct(tempTensor2);
349  beta += ( plasModulus - viscoModulus ) / norm; //+ viscoModulus;
350  // Construction of the equation of Delta Kappa
351  tempTensor2.beProductOf(SSaTensor, toSolveTensor);
352  tempScalar = plasFlowDirec.dotProduct(tempTensor2);
353  incKappa = ( toSolveScalar / norm - tempScalar ) / beta;
354  tempTensor2 = plasFlowDirec;
355  tempTensor2.times(incKappa);
356  tempTensor2 += toSolveTensor;
357  incTempEffectiveStress.beProductOf(SSaTensor, tempTensor2);
358 
359  if ( lineSearchFlag == 1 ) {
360  max_num_iter = 4000;
361  double eta = 0.1;
362  beta = 25.e-4;
363  int jMax = 10;
364  double alfa = 1;
365  double M = ( errorR * errorR + errorF * errorF ) / 2;
366  double dM = -2 * M;
367  double newDeltaKappa;
368  FloatArray tempStress;
369  for ( int j = 0; ; ++j ) {
370  tempStress = incTempEffectiveStress;
371  tempStress.times(-alfa);
372  tempStress.add(tempEffectiveStress);
373  newDeltaKappa = deltaKappa + alfa * incKappa;
374  //*************************************
375  // Evaluation of the f and R
376  //*************************************
377  // Construction of the derivative of the plastic flow
378  this->constructDerivativeOfPlasFlowDirec(derivPlasFlowDirec, fabric, F, tempStress);
379  // Construction of the gradient Nabla_S of R and SSa tensor
380  tempTensor4 = derivPlasFlowDirec;
381  tempTensor4.times(newDeltaKappa);
382  tempTensor4.add(compliance);
383  SSaTensor.beInverseOf(tempTensor4);
384  // Evaluation of R
385  this->constructPlasFlowDirec(plasFlowDirec, norm, fabric, F, tempStress);
386  tempTensor2.beProductOf( compliance, ( tempStress - trialEffectiveStress ) );
387  toSolveTensor = tempTensor2 + newDeltaKappa * plasFlowDirec;
388  // Evaluation of f
389  tempTensor2.beProductOf(fabric, tempStress);
390  SFS = sqrt( tempStress.dotProduct(tempTensor2) );
391  toSolveScalar = evaluatePlasCriterion(fabric, F, tempStress, tempKappa + newDeltaKappa, newDeltaKappa, tStep);
392  //*************************************
393  // Evaluation of the error
394  //*************************************
395  errLoop = toSolveTensor;
396  errorR = sqrt( errLoop.dotProduct(errLoop) );
397  errorF = fabs(toSolveScalar);
398  double newM = ( errorR * errorR + errorF * errorF ) / 2;
399  //check Goldstein's condition
400  //if(newM < M || j == jMax)
401  if ( newM < ( 1 - 2 * beta * alfa ) * M || j == jMax ) {
402  deltaKappa = newDeltaKappa;
403  tempEffectiveStress = tempStress;
404  break;
405  }
406 
407  double alfa1 = eta * alfa;
408  double alfa2 = -alfa * alfa * dM / 2 / ( newM - M - alfa * dM );
409  alfa = alfa1;
410  if ( alfa1 < alfa2 ) {
411  alfa = alfa2;
412  }
413  }
414  } else {
416  deltaKappa += incKappa;
417  tempEffectiveStress -= incTempEffectiveStress;
418  //*************************************
419  // Evaluation of the f and R
420  //*************************************
421  // Construction of the derivative of the plastic flow
422  this->constructDerivativeOfPlasFlowDirec(derivPlasFlowDirec, fabric, F, tempEffectiveStress);
423  // Construction of the gradient Nabla_S of R and SSa tensor
424  tempTensor4 = derivPlasFlowDirec;
425  tempTensor4.times(deltaKappa);
426  tempTensor4.add(compliance);
427  SSaTensor.beInverseOf(tempTensor4);
428  // Evaluation of R
429  this->constructPlasFlowDirec(plasFlowDirec, norm, fabric, F, tempEffectiveStress);
430  tempTensor2.beProductOf( compliance, ( tempEffectiveStress - trialEffectiveStress ) );
431  toSolveTensor = tempTensor2 + deltaKappa * plasFlowDirec;
432  // Evaluation of f
433  tempTensor2.beProductOf(fabric, tempEffectiveStress);
434  SFS = sqrt( tempEffectiveStress.dotProduct(tempTensor2) );
435  toSolveScalar = evaluatePlasCriterion(fabric, F, tempEffectiveStress, tempKappa + deltaKappa, deltaKappa, tStep);
436  //*************************************
437  // Evaluation of the error
438  //*************************************
439  errLoop = toSolveTensor;
440  errorR = sqrt( errLoop.dotProduct(errLoop) );
441  errorF = fabs(toSolveScalar);
442  }
443 
444  if ( printflag ) {
445  printf(" %d %g %g %g %g\n", flagLoop, tempEffectiveStress.at(1), tempEffectiveStress.at(3), incKappa, deltaKappa);
446  }
447 
448  flagLoop++;
449  convergence = ( fabs(errorF) < rel_yield_tol && errorR < strain_tol );
450  } while ( flagLoop <= max_num_iter && !convergence );
451 
452  if ( convergence ) {
453  plasModulus = evaluateCurrentPlasticModulus(tempKappa + deltaKappa);
454  viscoModulus = evaluateCurrentViscousModulus(deltaKappa, tStep);
455  tempTensor2.beProductOf(SSaTensor, plasFlowDirec);
456  beta = plasFlowDirec.dotProduct(tempTensor2);
457  beta += ( plasModulus - viscoModulus ) / norm;
458  tempPlasDef += deltaKappa * plasFlowDirec;
459  tempKappa += deltaKappa;
460  status->setBeta(beta);
461  status->setPlasFlowDirec(plasFlowDirec);
462  status->setSSaTensor(SSaTensor);
463  }
464  }
465 
466  return convergence;
467 }
468 
469 void
471 {
472  double SFS;
473  FloatArray FFS, tempTensor2;
474  FloatMatrix normAdjust;
476  FFS.beProductOf(fabric, S);
477  // FS = F.dotProduct(S);
478  SFS = sqrt( S.dotProduct(FFS) );
479  // scaling matrix
480  this->constructNormAdjustTensor(normAdjust);
481  //direction of Np
482  answer = F;
483  answer.add(1. / SFS, FFS);
484  tempTensor2.beProductOf(normAdjust, answer);
485  //norm Np
486  norm = sqrt( answer.dotProduct(tempTensor2) );
487  //plastic flow
488  answer.times(1.0 / norm);
490 }
491 void
493 {
494  double SFS, norm, SGS, h;
495  FloatArray FFS, FFSF, tempTensor2, tempTensor21, dNorm;
496  FloatMatrix normAdjust, tempTensor4, dNp, FSFS;
498  FFS.beProductOf(fabric, S);
499  SFS = sqrt( S.dotProduct(FFS) );
500 
501  SGS = pow(SFS, -3.);
502  FloatArray gradientOfG, gradientOfH;
503  FloatMatrix secondGradientOfG, helpMatrix;
504  gradientOfG.zero();
505  gradientOfG.add(FFS);
506  gradientOfG.times(1. / SFS);
507  gradientOfG.add(F);
508 
509  helpMatrix.zero();
510  helpMatrix.add(fabric);
511  helpMatrix.times(1. / SFS);
512  secondGradientOfG.beDyadicProductOf(FFS, FFS);
513  secondGradientOfG.times(-1. * SGS);
514  secondGradientOfG.add(helpMatrix);
515 
516  h = gradientOfG.dotProduct(gradientOfG);
517  h = sqrt(h);
518 
519 
520  gradientOfH.beTProductOf(secondGradientOfG, gradientOfG);
521  gradientOfH.times(1. / h);
522 
523  secondGradientOfG.times(h);
524  FloatMatrix test;
525  test.beDyadicProductOf(gradientOfG, gradientOfH);
526  test.times(-1);
527  test.add(secondGradientOfG);
528  test.times(1. / h / h);
530  FFS.beProductOf(fabric, S);
531  SFS = sqrt( S.dotProduct(FFS) );
532  // scaling matrix
533  this->constructNormAdjustTensor(normAdjust);
534  //norm
535  tempTensor2 = FFS;
536  tempTensor2.times(1. / SFS);
537  tempTensor2.add(F);
538  tempTensor21.beProductOf(normAdjust, tempTensor2);
539  //norm Np
540  norm = sqrt( tempTensor2.dotProduct(tempTensor21) );
542  FSFS.beDyadicProductOf(FFS, FFS);
543  dNp.zero();
544  dNp.add(FSFS);
545  dNp.times(-1. / SFS / SFS);
546  dNp.add(fabric);
547  dNp.times(1. / SFS / norm);
549  FFSF.zero();
550  FFSF.add(FFS);
551  FFSF.times(1. / SFS);
552  FFSF.add(F);
554  tempTensor4.zero();
555  tempTensor4.add(FSFS);
556  tempTensor4.times(-1. / SFS / SFS);
557  tempTensor4.add(fabric);
558  tempTensor4.times(1. / SFS / norm);
559  tempTensor2.beProductOf(normAdjust, FFSF);
560  dNorm.beProductOf(tempTensor4, tempTensor2);
562  tempTensor4.beDyadicProductOf(FFSF, dNorm);
563  tempTensor4.times(-1. / norm / norm);
565  answer.zero();
566  answer.add(dNp);
567  answer.add(tempTensor4);
568 }
569 
570 double
571 TrabBone3D :: evaluatePlasCriterion(FloatMatrix &fabric, FloatArray &F, FloatArray &stress, double kappa, double deltaKappa, TimeStep *tStep)
572 {
573  FloatArray FFS;
574  double FS, SFS;
575  FFS.beProductOf(fabric, stress);
576  FS = F.dotProduct(stress);
577  SFS = sqrt( stress.dotProduct(FFS) );
578  return SFS + FS - evaluateCurrentYieldStress(kappa) + this->evaluateCurrentViscousStress(deltaKappa, tStep);
579 }
580 
581 double
583 {
584  double tempDam;
585  if ( tempKappa > 0. ) {
586  tempDam = critDam * ( 1.0 - exp(-expDam * tempKappa) );
587  } else {
588  tempDam = 0.0;
589  }
590 
591  return tempDam;
592 }
593 
594 
595 double
597 {
598  double damagePrime;
599  damagePrime = critDam * expDam * exp(-expDam * tempKappa);
600  return damagePrime;
601 }
602 //
603 // END: FUNCTION FOR DAMAGE PARAMETER
605 
606 
608 // BEGIN: FUNCTION FOR DAMAGE EVALUATION
609 //
610 
611 double
613 {
614  double tempKappa;
615 
616  computeCumPlastStrain(tempKappa, gp, tStep);
617 
618  double tempDam = computeDamageParam(tempKappa);
619  if ( tempDam < 0 ) {
620  OOFEM_ERROR("negative damage");
621  }
622 
623  return tempDam;
624 }
625 
626 
627 void TrabBone3D :: computeCumPlastStrain(double &tempKappa, GaussPoint *gp, TimeStep *tStep)
628 {
629  TrabBone3DStatus *status = static_cast< TrabBone3DStatus * >( this->giveStatus(gp) );
630  tempKappa = status->giveTempKappa();
631 }
632 
633 
634 
636 {
637  TrabBone3DStatus *status = static_cast< TrabBone3DStatus * >( this->giveStatus(gp) );
638  answer.resize(6);
639  answer.zero();
640  double traceLnU = ( totalStrain.at(1) + totalStrain.at(2) + totalStrain.at(3) );
641  double g = traceLnU - densCrit;
642  status->setDensG(g);
643  if ( g <= 0 ) {
644  answer.at(1) = answer.at(2) = answer.at(3) = 1;
645  double factor = gammaL0 * pow(rho, rL) * g + gammaP0 *pow(rho, rP) * pow(g, tDens - 1);
646  answer.times(factor);
647  }
648 }
649 
650 
651 void
653  const FloatArray &totalStrain, TimeStep *tStep)
654 {
655  double tempDam;
656  FloatArray effStress, densStress;
657  TrabBone3DStatus *status = static_cast< TrabBone3DStatus * >( this->giveStatus(gp) );
658 
659  this->initTempStatus(gp);
660  // compute effective stress using the plasticity model
661  performPlasticityReturn(gp, totalStrain, tStep);
662  effStress = status->giveTempEffectiveStress();
663 
664  // evaluate damage variable
665  tempDam = computeDamage(gp, tStep);
666 
667  // transform effective stress into nominal stress
668  answer = ( 1 - tempDam ) * effStress;
669 
670  computePlasStrainEnerDensity(gp, totalStrain, answer);
671 
672  // add densification stress, if the densificator is activated
673  if ( densCrit != 0 ) {
674  computeDensificationStress(densStress, gp, totalStrain, tStep);
675  answer.add(densStress);
676  }
677 
678  // store final damage, strain and stress in status
679  status->setTempDam(tempDam);
680  status->letTempStrainVectorBe(totalStrain);
681  status->letTempStressVectorBe(answer);
682 }
683 
684 
685 void
687 {
688  FloatMatrix D(6, 6);
689  FloatMatrix DT(6, 6);
690  FloatMatrix T;
691 
693 
694  double m3 = 3. - m1 - m2;
695  double eps0k = eps0 * pow(rho, expk);
696  double mu0k = mu0 * pow(rho, expk);
697  double m1l = pow(m1, expl);
698  double m2l = pow(m2, expl);
699  double m3l = pow(m3, expl);
700 
701  answer.resize(6, 6);
702 
703  D.at(1, 1) = 1 / ( eps0k * m1l * m1l );
704  D.at(2, 2) = 1 / ( eps0k * m2l * m2l );
705  D.at(3, 3) = 1 / ( eps0k * m3l * m3l );
706  D.at(1, 2) = -nu0 / ( eps0k * m1l * m2l );
707  D.at(2, 1) = D.at(1, 2);
708  D.at(1, 3) = -nu0 / ( eps0k * m1l * m3l );
709  D.at(3, 1) = D.at(1, 3);
710  D.at(2, 3) = -nu0 / ( eps0k * m2l * m3l );
711  D.at(3, 2) = D.at(2, 3);
712  D.at(4, 4) = 1 / ( mu0k * m2l * m3l );
713  D.at(5, 5) = 1 / ( mu0k * m3l * m1l );
714  D.at(6, 6) = 1 / ( mu0k * m1l * m2l );
715 
716  FloatMatrix stiffness, t;
718  stiffness.beInverseOf(D);
719  FloatMatrix ST, TST;
720  ST.beProductOf(stiffness, t);
721  TST.beTProductOf(t, ST);
722 
723  DT.beProductOf(D, T);
724  answer.beTProductOf(T, DT);
725 }
726 
727 
728 void
730 {
731  double m3 = 3. - m1 - m2;
732  double eps0k = eps0 * pow(rho, expk);
733  double mu0k = mu0 * pow(rho, expk);
734  double m1l = pow(m1, expl);
735  double m2l = pow(m2, expl);
736  double m3l = pow(m3, expl);
737 
738 
739  double eksi, n13, n23, n12, n31, n32, n21;
740 
741  double E1 = eps0k * m1l * m1l;
742  double E2 = eps0k * m2l * m2l;
743  double E3 = eps0k * m3l * m3l;
744 
745  double G23 = mu0k * m2l * m3l;
746  double G13 = mu0k * m1l * m3l;
747  double G12 = mu0k * m1l * m2l;
748 
749  n23 = nu0 * m2l / m3l;
750  n12 = nu0 * m1l / m2l;
751  n31 = nu0 * m3l / m1l;
752  n32 = nu0 * m3l / m2l;
753  n21 = nu0 * m2l / m1l;
754  n13 = nu0 * m1l / m3l;
755 
756  eksi = 1. - ( n12 * n21 + n23 * n32 + n31 * n13 ) - ( n12 * n23 * n31 + n21 * n32 * n13 );
757 
758  //constitutiveMatrix = new FloatMatrix(6,6) ;
759  FloatMatrix D(6, 6);
760  D.zero();
761  // switched letters from original oofem -> now produces same material stiffness matrix as Abaqus method
762  D.at(1, 1) = E1 * ( 1. - n23 * n32 ) / eksi;
763  D.at(1, 2) = E2 * ( n12 + n13 * n32 ) / eksi;
764  D.at(1, 3) = E3 * ( n13 + n23 * n12 ) / eksi;
765  D.at(2, 2) = E2 * ( 1. - n13 * n31 ) / eksi;
766  D.at(2, 3) = E3 * ( n23 + n21 * n13 ) / eksi;
767  D.at(3, 3) = E3 * ( 1. - n21 * n12 ) / eksi;
768 
769  // define the lower triangle
770  for ( int i = 1; i < 4; i++ ) {
771  for ( int j = 1; j < i; j++ ) {
772  D.at(i, j) = D.at(j, i);
773  }
774  }
775 
776  D.at(4, 4) = G23;
777  D.at(5, 5) = G13;
778  D.at(6, 6) = G12;
779 
780  FloatMatrix t;
782  FloatMatrix DT;
783  DT.beProductOf(D, t);
784  answer.beTProductOf(t, DT);
785 }
786 
787 
788 
789 void
791 {
792  FloatMatrix T;
793  double S0 = ( sig0Pos + sig0Neg ) / ( 2. * sig0Pos * sig0Neg );
794  double rhoP = pow(rho, 2. * expp);
795  double m3 = 3. - m1 - m2;
796  double m1q = pow(m1, 2. * expq);
797  double m2q = pow(m2, 2. * expq);
798  double m3q = pow(m3, 2. * expq);
799 
800 
802 
803  FloatMatrix F(6, 6);
804  FloatMatrix FT;
805 
806  F.at(1, 1) = S0 * S0 / ( rhoP * m1q * m1q );
807  F.at(2, 2) = S0 * S0 / ( rhoP * m2q * m2q );
808  F.at(3, 3) = S0 * S0 / ( rhoP * m3q * m3q );
809  F.at(1, 2) = -chi0 * S0 * S0 / ( rhoP * m1q * m2q );
810  F.at(2, 1) = F.at(1, 2);
811  F.at(1, 3) = -chi0 * S0 * S0 / ( rhoP * m1q * m3q );
812  F.at(3, 1) = F.at(1, 3);
813  F.at(2, 3) = -chi0 * S0 * S0 / ( rhoP * m2q * m3q );
814  F.at(3, 2) = F.at(2, 3);
815  F.at(4, 4) = 1. / ( tau0 * tau0 * rhoP * m2q * m3q );
816  F.at(5, 5) = 1. / ( tau0 * tau0 * rhoP * m1q * m3q );
817  F.at(6, 6) = 1. / ( tau0 * tau0 * rhoP * m1q * m2q );
818 
819 
820  FT.beProductOf(F, T);
821  answer.beTProductOf(T, FT);
822 }
823 
824 
825 void
827 {
828  FloatMatrix T;
829 
830  double rhoP = pow(rho, expp);
831  double m3 = 3. - m1 - m2;
832  double m1q = pow(m1, 2. * expq);
833  double m2q = pow(m2, 2. * expq);
834  double m3q = pow(m3, 2. * expq);
835 
836 
838  FloatArray F(6);
839  F.zero();
840 
841  F.at(1) = -( sig0Pos - sig0Neg ) / ( 2. * sig0Pos * sig0Neg * rhoP * m1q );
842  F.at(2) = -( sig0Pos - sig0Neg ) / ( 2. * sig0Pos * sig0Neg * rhoP * m2q );
843  F.at(3) = -( sig0Pos - sig0Neg ) / ( 2. * sig0Pos * sig0Neg * rhoP * m3q );
844 
845  answer.beTProductOf(T, F);
846 }
847 
848 
849 void
851 {
852  answer.resize(6, 6);
853 
854  answer.at(1, 1) = x1 * x1;
855  answer.at(1, 2) = x2 * x2;
856  answer.at(1, 3) = x3 * x3;
857  answer.at(1, 4) = x2 * x3;
858  answer.at(1, 5) = x1 * x3;
859  answer.at(1, 6) = x1 * x2;
860  //second row of pull back transformation matrix
861  answer.at(2, 1) = y1 * y1;
862  answer.at(2, 2) = y2 * y2;
863  answer.at(2, 3) = y3 * y3;
864  answer.at(2, 4) = y2 * y3;
865  answer.at(2, 5) = y1 * y3;
866  answer.at(2, 6) = y1 * y2;
867  //third row of pull back transformation matrix
868  answer.at(3, 1) = z1 * z1;
869  answer.at(3, 2) = z2 * z2;
870  answer.at(3, 3) = z3 * z3;
871  answer.at(3, 4) = z2 * z3;
872  answer.at(3, 5) = z1 * z3;
873  answer.at(3, 6) = z1 * z2;
874  //fourth row of pull back transformation matrix
875  answer.at(4, 1) = 2. * y1 * z1;
876  answer.at(4, 2) = 2. * y2 * z2;
877  answer.at(4, 3) = 2. * y3 * z3;
878  answer.at(4, 4) = ( y2 * z3 + y3 * z2 );
879  answer.at(4, 5) = ( y1 * z3 + y3 * z1 );
880  answer.at(4, 6) = ( y1 * z2 + y2 * z1 );
881  //fifth row of pull back transformation matrix
882  answer.at(5, 1) = 2. * x1 * z1;
883  answer.at(5, 2) = 2. * x2 * z2;
884  answer.at(5, 3) = 2. * x3 * z3;
885  answer.at(5, 4) = ( x2 * z3 + x3 * z2 );
886  answer.at(5, 5) = ( x1 * z3 + x3 * z1 );
887  answer.at(5, 6) = ( x1 * z2 + x2 * z1 );
888  //sixth row of pull back transformation matrix
889  answer.at(6, 1) = 2. * x1 * y1;
890  answer.at(6, 2) = 2. * x2 * y2;
891  answer.at(6, 3) = 2. * x3 * y3;
892  answer.at(6, 4) = ( x2 * y3 + x3 * y2 );
893  answer.at(6, 5) = ( x1 * y3 + x3 * y1 );
894  answer.at(6, 6) = ( x1 * y2 + x2 * y1 );
895 }
896 
897 
898 void
900 {
901  answer.resize(6, 6);
902  answer.zero();
903 
904  for ( int i = 1; i <= 3; i++ ) {
905  answer.at(i, i) = 1.;
906  }
907 
908  for ( int i = 4; i <= 6; i++ ) {
909  answer.at(i, i) = 0.5;
910  }
911 }
912 
913 
914 
915 void
917 {
918  answer.resize(6, 6);
919 
920  answer.at(1, 1) = x1 * x1;
921  answer.at(1, 2) = x2 * x2;
922  answer.at(1, 3) = x3 * x3;
923  answer.at(1, 4) = 2 * x2 * x3; //2
924  answer.at(1, 5) = 2 * x1 * x3; //2
925  answer.at(1, 6) = 2 * x1 * x2; //2
926  //second row of pull back transformation matrix
927  answer.at(2, 1) = y1 * y1;
928  answer.at(2, 2) = y2 * y2;
929  answer.at(2, 3) = y3 * y3;
930  answer.at(2, 4) = 2 * y2 * y3; //2
931  answer.at(2, 5) = 2 * y1 * y3; //2
932  answer.at(2, 6) = 2 * y1 * y2; //2
933  //third row of pull back transformation matrix
934  answer.at(3, 1) = z1 * z1;
935  answer.at(3, 2) = z2 * z2;
936  answer.at(3, 3) = z3 * z3;
937  answer.at(3, 4) = 2 * z2 * z3; //2
938  answer.at(3, 5) = 2 * z1 * z3; //2
939  answer.at(3, 6) = 2 * z1 * z2; //2
940  //fourth row of pull back transformation matrix
941  answer.at(4, 1) = y1 * z1;
942  answer.at(4, 2) = y2 * z2;
943  answer.at(4, 3) = y3 * z3;
944  answer.at(4, 4) = ( y2 * z3 + y3 * z2 );
945  answer.at(4, 5) = ( y1 * z3 + y3 * z1 );
946  answer.at(4, 6) = ( y1 * z2 + y2 * z1 );
947  //fifth row of pull back transformation matrix
948  answer.at(5, 1) = x1 * z1;
949  answer.at(5, 2) = x2 * z2;
950  answer.at(5, 3) = x3 * z3;
951  answer.at(5, 4) = ( x2 * z3 + x3 * z2 );
952  answer.at(5, 5) = ( x1 * z3 + x3 * z1 );
953  answer.at(5, 6) = ( x1 * z2 + x2 * z1 );
954  //sixth row of pull back transformation matrix
955  answer.at(6, 1) = x1 * y1;
956  answer.at(6, 2) = x2 * y2;
957  answer.at(6, 3) = x3 * y3;
958  answer.at(6, 4) = ( x2 * y3 + x3 * y2 );
959  answer.at(6, 5) = ( x1 * y3 + x3 * y1 );
960  answer.at(6, 6) = ( x1 * y2 + x2 * y1 );
961 }
962 
965 {
966  IRResultType result; // Required by IR_GIVE_FIELD macro
967 
968  // Mandatory parameters
974 
975 
979 
984 
985 
986 
989 
990 
991 
994 
997 
998  // evaluation of dependent parameter
999  chi0Neg = ( sig0Neg * sig0Neg ) / ( sig0Pos * sig0Pos ) * ( chi0Pos + 1 ) - 1;
1000  chi0 = chi0Pos;
1001 
1002 
1003 
1004 
1005 
1006  //local coordinate system
1007  //x'
1008  x1 = 1;
1009  x2 = 0;
1010  x3 = 0;
1011  //y'
1012  y1 = 0;
1013  y2 = 1;
1014  y3 = 0;
1015 
1016 
1017 
1018 
1023 
1027 
1028  double normX = sqrt(x1 * x1 + x2 * x2 + x3 * x3);
1029  x1 = x1 / normX;
1030  x2 = x2 / normX;
1031  x3 = x3 / normX;
1032 
1033  //y'
1034  double normY = sqrt(y1 * y1 + y2 * y2 + y3 * y3);
1035  y1 = y1 / normY;
1036  y2 = y2 / normY;
1037  y3 = y3 / normY;
1038  //z'
1039  z1 = x2 * y3 - x3 * y2;
1040  z2 = x3 * y1 - x1 * y3;
1041  z3 = x1 * y2 - x2 * y1;
1042  //viscosity parameter
1043  viscosity = 0.0;
1045 
1046  // optional control parameters for printing and convergence
1047  printflag = 0;
1049  max_num_iter = 100;
1051  rel_yield_tol = 1.e-9;
1053  strain_tol = 1.e-9;
1055 
1056 
1058 }
1059 
1060 
1061 
1062 int
1064 {
1065  TrabBone3DStatus *status = static_cast< TrabBone3DStatus * >( this->giveStatus(gp) );
1066  if ( type == IST_DamageScalar ) {
1067  answer.resize(1);
1068  answer.at(1) = status->giveTempDam();
1069  return 1;
1070  } else if ( type == IST_PlasticStrainTensor ) {
1071  answer = status->giveTempPlasDef();
1072  return 1;
1073  } else if ( type == IST_MaxEquivalentStrainLevel ) {
1074  answer.resize(1);
1075  answer.at(1) = status->giveTempKappa();
1076  return 1;
1077  } else if ( type == IST_BoneVolumeFraction ) {
1078  answer.resize(1);
1079  answer.at(1) = rho;
1080  return 1;
1081  } else if ( type == IST_PlasStrainEnerDens ) {
1082  answer.resize(1);
1083  answer.at(1) = status->giveTempPSED();
1084  return 1;
1085  } else if ( type == IST_ElasStrainEnerDens ) {
1086  answer.resize(1);
1087  answer.at(1) = status->giveTempTSED() - status->giveTempPSED();
1088  return 1;
1089  } else if ( type == IST_TotalStrainEnerDens ) {
1090  answer.resize(1);
1091  answer.at(1) = status->giveTempTSED();
1092  return 1;
1093  } else {
1094  return StructuralMaterial :: giveIPValue(answer, gp, type, tStep);
1095  }
1096 }
1097 
1098 
1100 {
1101  TrabBone3DStatus *status = static_cast< TrabBone3DStatus * >( this->giveStatus(gp) );
1102 
1103  if ( status->giveTempDam() > 0.0 ) {
1104  return 15.0;
1105  } else {
1106  return 1.0;
1107  }
1108 }
1109 
1110 
1112 {
1113  return 1.0;
1114 }
1115 
1116 
1117 
1119 {
1120  kappa = 0.0;
1121  tempKappa = 0.0;
1122  dam = 0.0;
1123  tempDam = 0.0;
1124  tempPSED = 0.0;
1125  tsed = 0.0;
1126  tempTSED = 0.0;
1127  beta = 0.0;
1129  plasDef.resize(6);
1130  tempPlasDef.resize(6);
1131  plasFlowDirec.resize(6);
1132  smtrx.resize(6, 6);
1133  tangentMatrix.resize(6, 6);
1134  SSaTensor.resize(6, 6);
1135  densG = 1;
1136 }
1137 
1138 
1139 
1141 { }
1142 
1143 
1144 double
1146 {
1147  return kappa;
1148 }
1149 
1150 double
1152 {
1153  return tempKappa;
1154 }
1155 
1156 double
1158 {
1159  return dam;
1160 }
1161 
1162 double
1164 {
1165  return tempDam;
1166 }
1167 
1168 double
1170 {
1171  return tempPSED;
1172 }
1173 
1174 double
1176 {
1177  return tsed;
1178 }
1179 
1180 double
1182 {
1183  return tempTSED;
1184 }
1185 
1186 double
1188 {
1189  return beta;
1190 }
1191 
1192 const FloatArray &
1194 {
1195  return tempEffectiveStress;
1196 }
1197 
1198 const FloatArray &
1200 {
1201  return plasFlowDirec;
1202 }
1203 
1204 const FloatArray &
1206 {
1207  return plasDef;
1208 }
1209 
1210 const FloatArray &
1212 {
1213  return tempPlasDef;
1214 }
1215 
1216 const FloatMatrix &
1218 {
1219  return SSaTensor;
1220 }
1221 
1222 
1223 void
1225 {
1227  fprintf(file, "status { ");
1228  fprintf( file, "plastrains: %f %f %f %f %f %f", this->plasDef.at(1), this->plasDef.at(2), this->plasDef.at(3), this->plasDef.at(4), this->plasDef.at(5), this->plasDef.at(6) );
1229  fprintf(file, " , kappa %f , dam %f , esed %f , psed %f , tsed %f ", this->tempKappa, this->tempDam, this->tempTSED - this->tempPSED, this->tempPSED, this->tempTSED);
1230  fprintf(file, "}\n");
1231 }
1232 
1233 
1234 void
1236 {
1238  densG = 1;
1239  this->tempKappa = this->kappa;
1240  this->tempDam = this->dam;
1241  this->tempTSED = this->tsed;
1242  this->tempPlasDef = this->plasDef;
1243 }
1244 
1245 
1246 void
1248 {
1250  this->kappa = this->tempKappa;
1251  this->dam = this->tempDam;
1252  this->tsed = this->tempTSED;
1253  this->plasDef = this->tempPlasDef;
1254 }
1255 
1256 
1259 {
1260  contextIOResultType iores;
1261 
1262  // save parent class status
1263  if ( ( iores = StructuralMaterialStatus :: saveContext(stream, mode, obj) ) != CIO_OK ) {
1264  THROW_CIOERR(iores);
1265  }
1266 
1267  if ( ( iores = plasDef.storeYourself(stream) ) != CIO_OK ) {
1268  THROW_CIOERR(iores);
1269  }
1270 
1271 
1272  if ( !stream.write(dam) ) {
1274  }
1275 
1276  if ( !stream.write(kappa) ) {
1278  }
1279 
1280  if ( !stream.write(beta) ) {
1282  }
1283 
1284  if ( ( iores = effectiveStress.storeYourself(stream) ) != CIO_OK ) {
1285  THROW_CIOERR(iores);
1286  }
1287 
1288  if ( ( iores = plasFlowDirec.storeYourself(stream) ) != CIO_OK ) {
1289  THROW_CIOERR(iores);
1290  }
1291 
1292  /*
1293  * if ( ( iores = smtrx.storeYourself(stream) ) != CIO_OK ) {
1294  * THROW_CIOERR(iores);
1295  * }
1296  * if ( ( iores = tangentMatrix.storeYourself(stream) ) != CIO_OK ) {
1297  * THROW_CIOERR(iores);
1298  * }
1299  * if ( ( iores = SSaTensor.storeYourself(stream) ) != CIO_OK ) {
1300  * THROW_CIOERR(iores);
1301  * }
1302  *
1303  * if ( ( iores = tempStrain.storeYourself(stream) ) != CIO_OK ) {
1304  * THROW_CIOERR(iores);
1305  * }
1306  */
1307  return CIO_OK;
1308 }
1309 
1310 
1313 {
1314  contextIOResultType iores;
1315 
1316  // read parent class status
1317  if ( ( iores = StructuralMaterialStatus :: restoreContext(stream, mode, obj) ) != CIO_OK ) {
1318  THROW_CIOERR(iores);
1319  }
1320 
1321  // read raw data
1322  if ( ( iores = plasDef.restoreYourself(stream) ) != CIO_OK ) {
1323  THROW_CIOERR(iores);
1324  }
1325 
1326 
1327  if ( !stream.read(dam) ) {
1329  }
1330 
1331  if ( !stream.read(kappa) ) {
1333  }
1334 
1335  if ( !stream.read(beta) ) {
1337  }
1338 
1339 
1340  if ( ( iores = effectiveStress.restoreYourself(stream) ) != CIO_OK ) {
1341  THROW_CIOERR(iores);
1342  }
1343 
1344  if ( ( iores = plasFlowDirec.restoreYourself(stream) ) != CIO_OK ) {
1345  THROW_CIOERR(iores);
1346  }
1347 
1348  /*
1349  * if ( ( iores = smtrx.restoreYourself(stream) ) != CIO_OK ) {
1350  * THROW_CIOERR(iores);
1351  * }
1352  * if ( ( iores = tangentMatrix.restoreYourself(stream) ) != CIO_OK ) {
1353  * THROW_CIOERR(iores);
1354  * }
1355  * if ( ( iores = SSaTensor.restoreYourself(stream) ) != CIO_OK ) {
1356  * THROW_CIOERR(iores);
1357  * }
1358  * if ( ( iores = tempStrain.restoreYourself(stream) ) != CIO_OK ) {
1359  * THROW_CIOERR(iores);
1360  * }
1361  */
1362 
1363 
1364 
1365  return CIO_OK;
1366 }
1367 
1368 
1370 {
1372 }
1373 } //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 letTempStrainVectorBe(const FloatArray &v)
Assigns tempStrainVector to given vector v.
Definition: structuralms.h:137
virtual MaterialStatus * giveStatus(GaussPoint *gp) const
Returns material status of receiver in given integration point.
Definition: material.C:244
void constructDerivativeOfPlasFlowDirec(FloatMatrix &answer, FloatMatrix &fabric, FloatArray &F, FloatArray &S)
Definition: trabbone3d.C:492
void computeDensificationStress(FloatArray &answer, GaussPoint *gp, const FloatArray &totalStrain, TimeStep *tStep)
Definition: trabbone3d.C:635
TrabBone3DStatus(int n, Domain *d, GaussPoint *g)
Definition: trabbone3d.C:1118
#define _IFT_TrabBone3D_tau0
Definition: trabbone3d.h:63
GaussPoint * gp
Associated integration point.
Class and object Domain.
Definition: domain.h:115
double rel_yield_tol
Definition: trabbone3d.h:173
const FloatArray & giveTempEffectiveStress() const
Definition: trabbone3d.C:1193
#define _IFT_TrabBone3D_expDam
Definition: trabbone3d.h:69
void setTempPSED(double pse)
Definition: trabbone3d.h:140
#define _IFT_TrabBone3D_eps0
Definition: trabbone3d.h:49
void performPlasticityReturn(GaussPoint *gp, const FloatArray &totalStrain, TimeStep *tStep)
Definition: trabbone3d.C:203
double evaluateCurrentPlasticModulus(const double kappa)
Definition: trabbone3d.C:172
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
double evaluateCurrentViscousModulus(const double deltaKappa, TimeStep *tStep)
Definition: trabbone3d.C:193
double evaluateCurrentYieldStress(const double kappa)
Definition: trabbone3d.C:166
This class implements a structural material status information.
Definition: structuralms.h:65
#define _IFT_TrabBone3D_y1
Definition: trabbone3d.h:75
#define _IFT_TrabBone3D_sig0Neg
Definition: trabbone3d.h:60
void setTempKappa(double al)
Definition: trabbone3d.h:137
#define _IFT_TrabBone3D_x2
Definition: trabbone3d.h:73
General IO error.
#define S(p)
Definition: mdm.C:481
double computeDamage(GaussPoint *gp, TimeStep *tStep)
Definition: trabbone3d.C:612
void constructAnisoComplTensor(FloatMatrix &answer)
Construct anisotropic compliance tensor.
Definition: trabbone3d.C:686
double evaluateCurrentViscousStress(const double deltaKappa, TimeStep *tStep)
Definition: trabbone3d.C:179
#define _IFT_TrabBone3D_expPlasHard
Definition: trabbone3d.h:67
#define _IFT_TrabBone3D_nu0
Definition: trabbone3d.h:50
virtual void printOutputAt(FILE *file, TimeStep *tStep)
Print receiver&#39;s output to given stream.
Definition: structuralms.C:73
virtual int read(int *data, int count)=0
Reads count integer values into array pointed by data.
MatResponseMode
Describes the character of characteristic material matrix.
#define _IFT_TrabBone3D_expl
Definition: trabbone3d.h:53
#define THROW_CIOERR(e)
Definition: contextioerr.h:61
FloatArray plasFlowDirec
Definition: trabbone3d.h:105
void constructNormAdjustTensor(FloatMatrix &answer)
Construct Tensor to adjust Norm.
Definition: trabbone3d.C:899
void setSSaTensor(FloatMatrix &ssa)
Definition: trabbone3d.h:148
virtual void giveRealStressVector_3d(FloatArray &answer, GaussPoint *, const FloatArray &, TimeStep *)
Default implementation relies on giveRealStressVector for second Piola-Kirchoff stress.
Definition: trabbone3d.C:652
void setBeta(double be)
Definition: trabbone3d.h:142
void setTempTSED(double tse)
Definition: trabbone3d.h:141
void beDifferenceOf(const FloatArray &a, const FloatArray &b)
Sets receiver to be a - b.
Definition: floatarray.C:341
virtual contextIOResultType restoreContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Restores the receiver state previously written in stream.
Definition: trabbone3d.C:1312
double giveTimeIncrement()
Returns solution step associated time increment.
Definition: timestep.h:150
#define _IFT_TrabBone3D_chi0Pos
Definition: trabbone3d.h:61
virtual int write(const int *data, int count)=0
Writes count integer values from array pointed by data.
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
void setSmtrx(FloatMatrix &smt)
Definition: trabbone3d.h:146
void constructPlasFlowDirec(FloatArray &answer, double &norm, FloatMatrix &fabric, FloatArray &F, FloatArray &S)
Definition: trabbone3d.C:470
double dotProduct(const FloatArray &x) const
Computes the dot product (or inner product) of receiver and argument.
Definition: floatarray.C:463
#define _IFT_TrabBone3D_plasHardFactor
Definition: trabbone3d.h:66
#define OOFEM_ERROR(...)
Definition: error.h:61
const FloatArray & giveTempPlasDef() const
Definition: trabbone3d.C:1211
void setPlasFlowDirec(FloatArray &pfd)
Definition: trabbone3d.h:145
#define _IFT_TrabBone3D_strain_tol
Definition: trabbone3d.h:92
double x1
Local coordinate system.
Definition: trabbone3d.h:175
void times(double f)
Multiplies receiver by factor f.
Definition: floatmatrix.C:1594
#define _IFT_TrabBone3D_expk
Definition: trabbone3d.h:52
double computeDamageParam(double kappa)
Definition: trabbone3d.C:582
#define _IFT_TrabBone3D_m2
Definition: trabbone3d.h:56
double plasHardFactor
Definition: trabbone3d.h:171
contextIOResultType restoreYourself(DataStream &stream)
Definition: floatarray.C:895
void beProductOf(const FloatMatrix &aMatrix, const FloatArray &anArray)
Receiver becomes the result of the product of aMatrix and anArray.
Definition: floatarray.C:676
#define _IFT_TrabBone3D_expq
Definition: trabbone3d.h:65
#define _IFT_TrabBone3D_critDam
Definition: trabbone3d.h:70
#define _IFT_TrabBone3D_x1
Definition: trabbone3d.h:72
virtual double predictRelativeComputationalCost(GaussPoint *gp)
Returns the weight representing relative computational cost of receiver The reference material model ...
Definition: trabbone3d.C:1099
virtual contextIOResultType saveContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Stores receiver state to output stream.
Definition: trabbone3d.C:1258
void beTProductOf(const FloatMatrix &aMatrix, const FloatArray &anArray)
Receiver becomes the result of the product of aMatrix^T and anArray.
Definition: floatarray.C:708
double at(int i, int j) const
Coefficient access function.
Definition: floatmatrix.h:176
void computePlasStrainEnerDensity(GaussPoint *gp, const FloatArray &totalStrain, const FloatArray &totalStress)
Definition: trabbone3d.C:54
double computeDamageParamPrime(double kappa)
Definition: trabbone3d.C:596
void constructStiffnessTransformationMatrix(FloatMatrix &answer)
Definition: trabbone3d.C:850
virtual contextIOResultType restoreContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Restores the receiver state previously written in stream.
Definition: structuralms.C:157
bool projectOnYieldSurface(double &tempKappa, FloatArray &tempEffectiveStress, FloatArray &tempPlasDef, const FloatArray &trialEffectiveStress, const FloatMatrix &elasticity, const FloatMatrix &compliance, TrabBone3DStatus *status, TimeStep *tStep, GaussPoint *gp, int lineSearchFlag)
Definition: trabbone3d.C:254
#define _IFT_TrabBone3D_expp
Definition: trabbone3d.h:64
virtual void updateYourself(TimeStep *)
Update equilibrium history variables according to temp-variables.
Definition: trabbone3d.C:1247
void setTempDam(double da)
Definition: trabbone3d.h:139
Abstract base class representing a material status information.
Definition: matstatus.h:84
double gammaL0
Densificator properties.
Definition: trabbone3d.h:177
#define _IFT_TrabBone3D_rho
Definition: trabbone3d.h:57
Class representing vector of real numbers.
Definition: floatarray.h:82
virtual void give3dMaterialStiffnessMatrix(FloatMatrix &answer, MatResponseMode, GaussPoint *gp, TimeStep *tStep)
Computes full 3d material stiffness matrix at given integration point, time, respecting load history ...
Definition: trabbone3d.C:85
virtual int giveIPValue(FloatArray &answer, GaussPoint *gp, InternalStateType type, TimeStep *tStep)
Returns the integration point corresponding value in Reduced form.
Definition: trabbone3d.C:1063
virtual void printOutputAt(FILE *file, TimeStep *tStep)
Print receiver&#39;s output to given stream.
Definition: trabbone3d.C:1224
#define _IFT_TrabBone3D_max_num_iter
Definition: trabbone3d.h:89
virtual void computeCumPlastStrain(double &kappa, GaussPoint *gp, TimeStep *tStep)
Definition: trabbone3d.C:627
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
const FloatArray & givePlasFlowDirec() const
Definition: trabbone3d.C:1199
const FloatArray & givePlasDef() const
Definition: trabbone3d.C:1205
TrabBone3D(int n, Domain *d)
Definition: trabbone3d.C:50
void letTempStressVectorBe(const FloatArray &v)
Assigns tempStressVector to given vector v.
Definition: structuralms.h:135
void setTempPlasDef(FloatArray &epsip)
Definition: trabbone3d.h:144
double norm(const FloatArray &x)
Definition: floatarray.C:985
void resize(int rows, int cols)
Checks size of receiver towards requested bounds.
Definition: floatmatrix.C:1358
const FloatMatrix & giveSSaTensor() const
Definition: trabbone3d.C:1217
void setTempEffectiveStress(FloatArray &sc)
Definition: trabbone3d.h:143
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 zero()
Zeroes all coefficients of receiver.
Definition: floatarray.C:658
void beDyadicProductOf(const FloatArray &vec1, const FloatArray &vec2)
Assigns to the receiver the dyadic product .
Definition: floatmatrix.C:492
void beTProductOf(const FloatMatrix &a, const FloatMatrix &b)
Assigns to the receiver product of .
Definition: floatmatrix.C:367
void times(double s)
Multiplies receiver with scalar.
Definition: floatarray.C:818
FloatMatrix tangentMatrix
Definition: trabbone3d.h:106
long ContextMode
Context mode (mask), defining the type of information written/read to/from context.
Definition: contextmode.h:43
Abstract base class for all "structural" constitutive models.
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
Definition: trabbone3d.C:964
This class implements associated Material Status to TrabBone3D (trabecular bone material).
Definition: trabbone3d.h:101
void zero()
Zeroes all coefficient of receiver.
Definition: floatmatrix.C:1326
void constructAnisoFtensor(FloatArray &answer)
Definition: trabbone3d.C:826
void constructFabricTransformationMatrix(FloatMatrix &answer)
Definition: trabbone3d.C:916
virtual void initTempStatus()
Initializes the temporary internal variables, describing the current state according to previously re...
Definition: structuralms.C:108
virtual MaterialStatus * CreateStatus(GaussPoint *gp) const
Creates new copy of associated status and inserts it into given integration point.
Definition: trabbone3d.C:1369
Domain * giveDomain() const
Definition: femcmpnn.h:100
#define _IFT_TrabBone3D_y3
Definition: trabbone3d.h:77
double densG
Densificator criterion.
Definition: trabbone3d.h:109
#define _IFT_TrabBone3D_printflag
Definition: trabbone3d.h:88
#define _IFT_TrabBone3D_mu0
Definition: trabbone3d.h:51
virtual double predictRelativeRedistributionCost(GaussPoint *gp)
Returns the relative redistribution cost of the receiver.
Definition: trabbone3d.C:1111
void constructAnisoFabricTensor(FloatMatrix &answer)
Construct anisotropic fabric tensor.
Definition: trabbone3d.C:790
#define _IFT_TrabBone3D_rel_yield_tol
Definition: trabbone3d.h:91
REGISTER_Material(DummyMaterial)
#define IR_GIVE_OPTIONAL_FIELD(__ir, __value, __id)
Macro facilitating the use of input record reading methods.
Definition: inputrecord.h:78
void beProductOf(const FloatMatrix &a, const FloatMatrix &b)
Assigns to the receiver product of .
Definition: floatmatrix.C:337
void constructAnisoStiffnessTensor(FloatMatrix &answer)
Construct anisotropic stiffness tensor.
Definition: trabbone3d.C:729
double viscosity
Viscosity parameter.
Definition: trabbone3d.h:179
const FloatArray & giveTempStressVector() const
Returns the const pointer to receiver&#39;s temporary stress vector.
Definition: structuralms.h:117
int giveSize() const
Returns the size of receiver.
Definition: floatarray.h:218
virtual contextIOResultType saveContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Stores receiver state to output stream.
Definition: structuralms.C:133
the oofem namespace is to define a context or scope in which all oofem names are defined.
FloatArray tempEffectiveStress
Definition: trabbone3d.h:105
#define IR_GIVE_FIELD(__ir, __value, __id)
Macro facilitating the use of input record reading methods.
Definition: inputrecord.h:69
virtual void initTempStatus(GaussPoint *gp)
Initializes temporary variables stored in integration point status at the beginning of new time step...
Definition: material.C:267
void beInverseOf(const FloatMatrix &src)
Modifies receiver to become inverse of given parameter.
Definition: floatmatrix.C:835
#define _IFT_TrabBone3D_x3
Definition: trabbone3d.h:74
#define _IFT_TrabBone3D_m1
Definition: trabbone3d.h:55
const FloatArray & giveStrainVector() const
Returns the const pointer to receiver&#39;s strain vector.
Definition: structuralms.h:105
#define _IFT_TrabBone3D_y2
Definition: trabbone3d.h:76
#define _IFT_TrabBone3D_sig0Pos
Definition: trabbone3d.h:59
Class representing integration point in finite element program.
Definition: gausspoint.h:93
Class representing solution step.
Definition: timestep.h:80
void setDensG(double g)
Definition: trabbone3d.h:150
virtual void initTempStatus()
Initializes the temporary internal variables, describing the current state according to previously re...
Definition: trabbone3d.C:1235
void add(const FloatArray &src)
Adds array src to receiver.
Definition: floatarray.C:156
double evaluatePlasCriterion(FloatMatrix &fabric, FloatArray &F, FloatArray &stress, double kappa, double deltaKappa, TimeStep *tStep)
Definition: trabbone3d.C:571
void resize(int s)
Resizes receiver towards requested size.
Definition: floatarray.C:631
#define _IFT_TrabBone3D_viscosity
Definition: trabbone3d.h:79
FloatArray effectiveStress
Definition: trabbone3d.h:105

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