OOFEM 3.0
Loading...
Searching...
No Matches
latticebondplasticity.C
Go to the documentation of this file.
1/*
2 *
3 * ##### ##### ###### ###### ### ###
4 * ## ## ## ## ## ## ## ### ##
5 * ## ## ## ## #### #### ## # ##
6 * ## ## ## ## ## ## ## ##
7 * ## ## ## ## ## ## ## ##
8 * ##### ##### ## ###### ## ##
9 *
10 *
11 * OOFEM : Object Oriented Finite Element Code
12 *
13 * Copyright (C) 1993 - 2025 Borek Patzak
14 *
15 *
16 *
17 * Czech Technical University, Faculty of Civil Engineering,
18 * Department of Structural Mechanics, 166 29 Prague, Czech Republic
19 *
20 * This program is free software; you can redistribute it and/or modify
21 * it under the terms of the GNU General Public License as published by
22 * the Free Software Foundation; either version 2 of the License, or
23 * (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
28 * GNU General Public License for more details.
29 *
30 * You should have received a copy of the GNU General Public License
31 * along with this program; if not, write to the Free Software
32 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
33 */
34
36#include "gausspoint.h"
37#include "floatmatrix.h"
38#include "floatarray.h"
39#include "engngm.h"
40#include "mathfem.h"
41#include <math.h>
42#include "latticematstatus.h"
43#include "intarray.h"
45#include "datastream.h"
46#include "contextioerr.h"
47#include "classfactory.h"
48
49namespace oofem {
51
52
55
56
57bool
59{
60 return mode == _3dLattice;
61}
62
63double
65{
66 return exp( pow(kappa / this->ef, 2.) );
67}
68
69double
71{
72 return 2. * kappa / ( pow(this->ef, 2.) ) * exp( pow(kappa / this->ef, 2.) );
73}
74
75
76void
102
103std::unique_ptr<MaterialStatus>
105{
106 return std::make_unique<LatticeBondPlasticityStatus>(1, LatticeBondPlasticity::domain, gp);
107}
108
109double
110LatticeBondPlasticity::computeShift(const double kappa) const
111{
112 double hardening = computeHardening(kappa);
113
114 double paramA = computeParamA(kappa);
115
116 double shift = this->fc * hardening - paramA;
117
118 return shift;
119}
120
121
122double
124{
125 double hardening = computeHardening(kappa);
126
127 double paramA = this->frictionAngleTwo * this->frictionAngleOne * this->fc * hardening /
128 ( this->frictionAngleTwo * this->frictionAngleOne +
129 sqrt( 1. + pow(this->frictionAngleTwo, 2.) * pow(this->frictionAngleOne, 2.) ) );
130
131 return paramA;
132}
133
134
135double
137{
138 double dHardeningDKappa = computeDHardeningDKappa(kappa);
139
140 double dParamADKappa = computeDParamADKappa(kappa);
141
142 double dShiftDKappa = this->fc * dHardeningDKappa - dParamADKappa;
143
144 return dShiftDKappa;
145}
146
147
148double
150{
151 double dHardeningDKappa = computeDHardeningDKappa(kappa);
152
153 double A2 = this->frictionAngleTwo * this->frictionAngleOne + sqrt( 1. + pow(this->frictionAngleTwo, 2.) * pow(this->frictionAngleOne, 2.) );
154
155 double dA1DKappa = this->frictionAngleTwo * this->frictionAngleOne * this->fc * dHardeningDKappa;
156
157 double dParamADKappa = dA1DKappa / A2;
158
159 return dParamADKappa;
160}
161
162
165{
166 auto status = static_cast< LatticeBondPlasticityStatus * >( this->giveStatus(gp) );
167 return status->giveReducedLatticeStrain();
168}
169
170
173 const FloatArrayF< 3 > &strain,
174 TimeStep *tStep) const
175{
176 auto status = static_cast< LatticeBondPlasticityStatus * >( this->giveStatus(gp) );
177
179
180 //Get tempKappa from the status
181 double tempKappa = status->giveTempKappaP();
182
183 /* Get plastic strain vector from status*/
184 auto tempPlasticStrain = status->giveTempPlasticLatticeStrain() [ { 0, 1, 2 } ];
185
186 FloatArrayF< 3 >tangent = { this->eNormalMean, this->alphaOne * this->eNormalMean, this->alphaOne * this->eNormalMean };
187
188 /* Compute trial stress*/
189 auto stress = mult(tangent, strain - tempPlasticStrain);
190
191 //Introduce variables for subincrementation
192 auto oldStrain = this->giveReducedStrain(gp, tStep) [ { 0, 1, 2 } ];
193
194 /* Compute yield value*/
195 int transitionFlag = 0;
196 double yieldValue = computeYieldValue(stress, tempKappa, transitionFlag, gp);
197
198 double transition = computeTransition(tempKappa, gp);
199
200 //If shear surface is violated then return to this surface.
201 //No need to check situation with ellipse
202 //If only ellipse is violated then try this.
203 if ( yieldValue < this->yieldTol && stress.at(1) < transition - this->yieldTol ) {
204 transitionFlag = 1;
205 yieldValue = computeYieldValue(stress, tempKappa, 1, gp);
206 }
207
208 /* Compute yield value*/
209 double error = 0.;
210 if ( transitionFlag == 0 ) {
211 error = yieldValue / fc;
212 } else {
213 error = yieldValue / pow(fc, 2.);
214 }
215
216 if ( error > this->yieldTol ) {
217 if ( checkForVertexCase(stress, gp) ) {
218 performVertexReturn(stress, gp);
219 surfaceType = ST_Vertex;
220 } else {
221 int subIncrementFlag = 0;
222 double subIncrementCounter = 1;
223 auto convergedStrain = oldStrain;
224 auto tempStrain = strain;
225 auto deltaStrain = strain - oldStrain;
226 //To get into the loop
228 while ( returnResult == RR_NotConverged || subIncrementFlag == 1 ) {
229 stress = mult(tangent, tempStrain - tempPlasticStrain);
230 tempKappa = performRegularReturn(stress, returnResult, surfaceType, yieldValue, transitionFlag, gp);
231
232 if ( returnResult == RR_NotConverged ) {
233 subIncrementFlag = 1;
234
235
236 subIncrementCounter *= 2;
237 if ( subIncrementCounter >= numberOfSubIncrements ) {
238 OOFEM_ERROR("Subincrementation = %e did not help. Stop here with numberOfSubIncrements = %d.\n", subIncrementCounter, numberOfSubIncrements);
239 }
240
241 deltaStrain *= 0.5;
242 tempStrain = convergedStrain + deltaStrain;
243 } else if ( returnResult == RR_Converged && subIncrementFlag == 1 ) {
244 tempPlasticStrain.at(1) = tempStrain.at(1) - stress.at(1) / eNormalMean;
245 tempPlasticStrain.at(2) = tempStrain.at(2) - stress.at(2) / ( this->alphaOne * eNormalMean );
246 tempPlasticStrain.at(3) = tempStrain.at(3) - stress.at(3) / ( this->alphaOne * eNormalMean );
247
248 status->letTempPlasticLatticeStrainBe( assemble< 6 >(tempPlasticStrain, { 0, 1, 2 }) );
249
250 status->setTempKappaP(tempKappa);
251
252 subIncrementCounter -= 1;
253
254 convergedStrain = tempStrain;
255 deltaStrain = strain - convergedStrain;
256 auto deltaStrainIncrement = deltaStrain * ( 1. / subIncrementCounter );
257 tempStrain = convergedStrain + deltaStrainIncrement;
258 if ( subIncrementCounter > 1 ) {
259 subIncrementFlag = 1;
260 } else {
261 subIncrementFlag = 0;
262 }
263 returnResult = RR_NotConverged;
264 } else if ( returnResult == RR_Elastic && subIncrementFlag == 1 ) {
265 convergedStrain = tempStrain;
266 deltaStrain = strain - convergedStrain;
267 auto deltaStrainIncrement = deltaStrain * ( 1. / subIncrementCounter );
268 tempStrain = convergedStrain + deltaStrainIncrement;
269 if ( subIncrementCounter > 1 ) {
270 subIncrementFlag = 1;
271 } else {
272 subIncrementFlag = 0;
273 }
274 returnResult = RR_NotConverged;
275 } else if ( returnResult == RR_Converged && subIncrementFlag == 0 ) {
276 status->setTempKappaP(tempKappa);
277 }
278 }
279 }
280 }
281
282 tempPlasticStrain.at(1) = strain.at(1) - stress.at(1) / eNormalMean;
283 tempPlasticStrain.at(2) = strain.at(2) - stress.at(2) / ( this->alphaOne * eNormalMean );
284 tempPlasticStrain.at(3) = strain.at(3) - stress.at(3) / ( this->alphaOne * eNormalMean );
285
286 status->letTempPlasticLatticeStrainBe( assemble< 6 >(tempPlasticStrain, { 0, 1, 2 }) );
287 status->letTempLatticeStressBe( assemble< 6 >(stress, { 0, 1, 2 }) );
288 status->setSurfaceValue(surfaceType);
289
290 return stress;
291}
292
293int
295 GaussPoint *gp,
297 TimeStep *atTime)
298{
299 auto status = static_cast< LatticeBondPlasticityStatus * >( this->giveStatus(gp) );
300
301 if ( type == IST_PlasticLatticeStrain ) {
302 answer = status->givePlasticLatticeStrain();
303 return 1;
304 } else {
305 return LatticeLinearElastic::giveIPValue(answer, gp, type, atTime);
306 }
307}
308
309double
313 double yieldValue,
314 int transitionFlag,
315 GaussPoint *gp) const
316{
317 auto status = static_cast< LatticeBondPlasticityStatus * >( this->giveStatus(gp) );
318
319 double deltaLambda = 0.;
320
321 auto trialStress = stress;
322 auto tempStress = trialStress;
323
324 double trialShearStressNorm = norm(trialStress [ { 1, 2 } ]);
325 double tempShearStressNorm = trialShearStressNorm;
326
327 auto plasticStrain = status->givePlasticLatticeStrain() [ { 0, 1, 2 } ];
328 auto tempPlasticStrain = plasticStrain;
329
330 double thetaTrial = atan2( stress.at(3), stress.at(2) );
331
332 // Do the same for kappa
333 double kappa = status->giveTempKappaP();
334 double tempKappa = kappa;
335
336
337 //initialise unknowns
338 FloatArrayF< 4 >unknowns;
339 unknowns.at(1) = trialStress.at(1);
340 unknowns.at(2) = trialShearStressNorm;
341 unknowns.at(3) = tempKappa;
342 unknowns.at(4) = 0.;
343
344 yieldValue = computeYieldValue(tempStress, tempKappa, transitionFlag, gp);
345
346 //initiate residuals
347 FloatArrayF< 4 >residuals;
348 residuals.at(4) = yieldValue;
349
350 double normOfResiduals = this->yieldTol * 2 + 1.; //just to get into the loop
351
352 int iterationCount = 0;
353 while ( normOfResiduals > this->yieldTol ) {
354 iterationCount++;
355 if ( iterationCount == newtonIter ) {
356 returnResult = RR_NotConverged;
357 return kappa;
358 }
359
360 FloatArrayF< 4 >residualsNorm;
361 residualsNorm.at(1) = residuals.at(1) / this->fc;
362 residualsNorm.at(2) = residuals.at(2) / this->fc;
363 residualsNorm.at(3) = residuals.at(3);
364 if ( transitionFlag == 0 ) {
365 residualsNorm.at(4) = residuals.at(4) / this->fc;
366 } else {
367 residualsNorm.at(4) = residuals.at(4) / pow(this->fc, 2.);
368 }
369
370 normOfResiduals = norm(residualsNorm);
371
372 if ( std::isnan(normOfResiduals) ) {
373 returnResult = RR_NotConverged;
374 return kappa;
375 }
376
377 if ( normOfResiduals > this->yieldTol ) {
378 auto jacobian = computeJacobian(tempStress, tempKappa, deltaLambda, transitionFlag, gp);
379
380 auto solution = solve_check(jacobian, residuals);
381 if ( solution.first ) {
382 unknowns -= solution.second;
383 } else {
384 returnResult = RR_NotConverged;
385 return kappa;
386 }
387
388 unknowns.at(2) = max(unknowns.at(2), 0.); //Keep rho greater than zero!
389 unknowns.at(3) = max(unknowns.at(3), kappa); //Keep deltaKappa greater than zero!
390 unknowns.at(4) = max(unknowns.at(4), 0.); //Keep deltaLambda greater than zero!
391
392 /* Update increments final values and DeltaLambda*/
393 tempStress.at(1) = unknowns.at(1);
394 tempShearStressNorm = unknowns.at(2);
395 tempStress.at(2) = tempShearStressNorm * cos(thetaTrial);
396 tempStress.at(3) = tempShearStressNorm * sin(thetaTrial);
397 tempKappa = unknowns.at(3);
398 deltaLambda = unknowns.at(4);
399
400 /* Compute the mVector holding the derivatives of the g function and the hardening function*/
401 auto mVector = computeMVector(tempStress, tempKappa, transitionFlag, gp);
402
403 residuals.at(1) = tempStress.at(1) - trialStress.at(1) + this->eNormalMean * deltaLambda * mVector.at(1);
404 residuals.at(2) = tempShearStressNorm - trialShearStressNorm + this->alphaOne * this->eNormalMean * deltaLambda * mVector.at(2);
405 residuals.at(3) = -tempKappa + kappa + deltaLambda * mVector.at(3);
406 residuals.at(4) = computeYieldValue(tempStress, tempKappa, transitionFlag, gp);
407 } else {
408 //Check transition
409 double transition = computeTransition(tempKappa, gp);
410 if ( transitionFlag == 0 ) {
411 //Check if the stress is on the correct side
412 if ( tempStress.at(1) < transition - this->yieldTol ) {
413 transitionFlag = 1;
414 tempKappa = kappa;
415 deltaLambda = 0.;
416 tempStress = trialStress;
417 tempShearStressNorm = norm(trialStress [ { 1, 2 } ]);
418
419 unknowns.at(1) = trialStress.at(1);
420 unknowns.at(2) = trialShearStressNorm;
421 unknowns.at(3) = tempKappa;
422 unknowns.at(4) = 0.;
423
424 residuals = zeros< 4 >();
425 residuals.at(4) = computeYieldValue(tempStress, tempKappa, transitionFlag, gp);
426 normOfResiduals = 1;
427
428 tempPlasticStrain = plasticStrain;
429 iterationCount = 0;
430 } else { //Accept the stress return
431 surfaceType = ST_Shear;
432 returnResult = RR_Converged;
433 }
434 } else if ( transitionFlag == 1 ) {
435 if ( tempStress.at(1) > transition + this->yieldTol ) {
436 returnResult = RR_NotConverged;
437 return kappa;
438 } else { //accept stress return
439 surfaceType = ST_Compression;
440 returnResult = RR_Converged;
441 }
442 }
443 }
444 }
445
446 stress = tempStress;
447
448 return tempKappa;
449}
450
451
454 const double kappa,
455 const double deltaLambda,
456 int transitionFlag,
457 GaussPoint *gp) const
458{
459 auto dMMatrix = computeDMMatrix(stress, kappa, transitionFlag, gp);
460 auto mVector = computeMVector(stress, kappa, transitionFlag, gp);
461 auto fVector = computeFVector(stress, kappa, transitionFlag, gp);
462
463 /* Compute matrix*/
464 FloatMatrixF< 4, 4 >jacobian;
465 jacobian.at(1, 1) = 1. + this->eNormalMean * deltaLambda * dMMatrix.at(1, 1);
466 jacobian.at(1, 2) = this->eNormalMean * deltaLambda * dMMatrix.at(1, 2);
467 jacobian.at(1, 3) = this->eNormalMean * deltaLambda * dMMatrix.at(1, 3);
468 jacobian.at(1, 4) = this->eNormalMean * mVector.at(1);
469 /**/
470 jacobian.at(2, 1) = this->alphaOne * this->eNormalMean * deltaLambda * dMMatrix.at(2, 1);
471 jacobian.at(2, 2) = 1. + this->alphaOne * this->eNormalMean * deltaLambda * dMMatrix.at(2, 2);
472 jacobian.at(2, 3) = this->alphaOne * this->eNormalMean * deltaLambda * dMMatrix.at(2, 3);
473 jacobian.at(2, 4) = this->alphaOne * this->eNormalMean * mVector.at(2);
474 /**/
475 jacobian.at(3, 1) = deltaLambda * dMMatrix.at(3, 1);
476 jacobian.at(3, 2) = deltaLambda * dMMatrix.at(3, 2);
477 jacobian.at(3, 3) = deltaLambda * dMMatrix.at(3, 3) - 1.;
478 jacobian.at(3, 4) = mVector.at(3);
479 /**/
480 jacobian.at(4, 1) = fVector.at(1);
481 jacobian.at(4, 2) = fVector.at(2);
482 jacobian.at(4, 3) = fVector.at(3);
483 jacobian.at(4, 4) = 0.;
484
485 return jacobian;
486}
487
488
489double
491 const double kappa,
492 const int transitionFlag,
493 GaussPoint *gp) const
494{
495 double shift = computeShift(kappa);
496 double paramA = computeParamA(kappa);
497
498 double shearNorm = norm(stress [ { 1, 2 } ]);
499
500 if ( transitionFlag == 0 ) { //friction
501 return shearNorm + this->frictionAngleOne * stress.at(1);
502 } else {
503 return pow(shearNorm, 2.) + pow(stress.at(1) + shift, 2.) / pow(this->frictionAngleTwo, 2.) - pow(paramA, 2.) / pow(this->frictionAngleTwo, 2.);
504 }
505}
506
507
508double
510 GaussPoint *gp) const
511{
512 double paramA = computeParamA(kappa);
513
514 double transition = -paramA / ( this->frictionAngleTwo * this->frictionAngleOne *
515 sqrt( 1. + pow(this->frictionAngleTwo, 2.) *
516 pow(this->frictionAngleOne, 2.) ) );
517 return transition;
518}
519
520
523 const double kappa,
524 const int transitionFlag,
525 GaussPoint *gp) const
526{
527 double shearNorm = norm(stress [ { 1, 2 } ]);
528
529 double paramA = computeParamA(kappa);
530 double shift = computeShift(kappa);
531
532 double dParamADKappa = computeDParamADKappa(kappa);
533 double dShiftDKappa = computeDShiftDKappa(kappa);
534
536 if ( transitionFlag == 0 ) {//line
537 f.at(1) = this->frictionAngleOne;
538 f.at(2) = 1.;
539 f.at(3) = 0.;
540 } else { //cap ellipse
541 f.at(1) = 2. * ( stress.at(1) + shift ) / pow(this->frictionAngleTwo, 2.);
542 f.at(2) = 2. * shearNorm;
543 f.at(3) = 2. * ( stress.at(1) + shift ) / pow(this->frictionAngleTwo, 2.) * dShiftDKappa -
544 2. * paramA / pow(this->frictionAngleTwo, 2.) * dParamADKappa;
545 }
546
547 return f;
548}
549
550
553 const double kappa,
554 const int transitionFlag,
555 GaussPoint *gp) const
556{
557 double shearNorm = norm(stress [ { 1, 2 } ]);
558
559 double shift = computeShift(kappa);
560
562 if ( transitionFlag == 0 ) {
563 m.at(1) = this->flowAngle;
564 m.at(2) = 1.;
565 //No hardening for the Mohr-Coulomb
566 m.at(3) = 0.;
567 } else {
568 m.at(1) = 2. * ( stress.at(1) + shift ) / pow(this->frictionAngleTwo, 2.);
569 m.at(2) = 2. * shearNorm;
570 if ( stress.at(1) < -shift - this->yieldTol ) {
571 m.at(3) = fabs( m.at(1) );
572 } else {
573 m.at(3) = 0;
574 }
575 }
576
577 return m;
578}
579
580
583 const double kappa,
584 const int transitionFlag,
585 GaussPoint *gp) const
586{
587 auto mVector = computeMVector(stress, kappa, transitionFlag, gp);
588 double dShiftDKappa = computeDShiftDKappa(kappa);
589 double shift = computeShift(kappa);
590
591 if ( transitionFlag == 0 ) {
592 return FloatMatrixF< 3, 3 >();
593 } else { //cap ellipse
595 //Derivatives of dGDSig
596 dm.at(1, 1) = 2. / pow(this->frictionAngleTwo, 2.);
597 dm.at(1, 2) = 0.;
598 dm.at(1, 3) = 2. * dShiftDKappa / pow(this->frictionAngleTwo, 2.);
599
600 //Derivatives of dGDTau
601 dm.at(2, 1) = 0.;
602 dm.at(2, 2) = 2.;
603 dm.at(2, 3) = 0;
604
605 //Derivates of evolution law
606 if ( stress.at(1) < -shift - this->yieldTol ) {
607 dm.at(3, 1) = 1. / mVector.at(3) * mVector.at(1) * dm.at(1, 1);
608 dm.at(3, 2) = 0.;
609 dm.at(3, 3) = 1. / mVector.at(3) * ( mVector.at(1) * dm.at(1, 3) );
610 } else {
611 dm.at(3, 1) = dm.at(3, 2) = dm.at(3, 3) = 0.;
612 }
613 return dm;
614 }
615}
616
617
620 const double kappa,
621 const double deltaLambda,
622 const int transitionFlag,
623 GaussPoint *gp) const
624{
625 auto dMMatrix = computeDMMatrix(stress, kappa, transitionFlag, gp);
626 /* Compute matrix*/
628 a.at(1, 1) = 1 / this->eNormalMean + deltaLambda * dMMatrix.at(1, 1);
629 a.at(1, 2) = deltaLambda * dMMatrix.at(1, 2);
630 a.at(1, 3) = deltaLambda * dMMatrix.at(1, 3);
631 /**/
632 a.at(2, 1) = deltaLambda * dMMatrix.at(2, 1);
633 a.at(2, 2) = 1 / ( this->alphaOne * this->eNormalMean ) + deltaLambda * dMMatrix.at(2, 2);
634 a.at(2, 3) = deltaLambda * dMMatrix.at(2, 3);
635 /**/
636 a.at(3, 1) = deltaLambda * dMMatrix.at(3, 1);
637 a.at(3, 2) = deltaLambda * dMMatrix.at(3, 2);
638 a.at(3, 3) = deltaLambda * dMMatrix.at(3, 3) - 1.;
639 return a;
640}
641
642
643bool
645{
646 double shearNorm = norm(stress [ { 1, 2 } ]);
647
648 double ratio = 0.;
649
650 if ( shearNorm / this->eNormalMean > 1.e-30 ) {
651 ratio = this->alphaOne * stress.at(1) / shearNorm;
652 } else {
653 ratio = 5. * this->flowAngle;//set to arbitrary value which is greater than flowAngle
654 }
655 if ( stress.at(1) > 0 && this->flowAngle < ratio ) {
656 return true;
657 } else {
658 return false;
659 }
660}
661
662
663void
665{
666 auto status = static_cast< LatticeBondPlasticityStatus * >( giveStatus(gp) );
667
668 double shearStressNorm = norm(stress [ { 1, 2 } ]);
669 //Update kappa
670 double kappa = status->giveKappaP();
671 double deltaKappa = pow(stress.at(1) / this->eNormalMean, 2.) + pow(shearStressNorm / ( this->alphaOne * this->eNormalMean ), 2.);
672
673 double tempKappa = kappa + deltaKappa;
674
675 stress = zeros< 3 >();
676
677 status->setTempKappaP(tempKappa);
678}
679
680
683{
684 auto status = static_cast< LatticeBondPlasticityStatus * >( this->giveStatus(gp) );
685 status->initTempStatus();
686
687 auto reducedStrain = originalStrain;
688 auto thermalStrain = this->computeStressIndependentStrainVector(gp, tStep, VM_Total);
689 if ( thermalStrain.giveSize() ) {
690 reducedStrain -= FloatArrayF< 6 >(thermalStrain);
691 }
692
693 auto stress3 = this->performPlasticityReturn(gp, reducedStrain [ { 0, 1, 2 } ], tStep);
694
695 auto stress = assemble< 6 >(stress3, { 0, 1, 2 });
696 stress.at(4) = reducedStrain.at(4) * this->alphaTwo * this->eNormalMean;
697 stress.at(5) = reducedStrain.at(5) * this->alphaTwo * this->eNormalMean;
698 stress.at(6) = reducedStrain.at(6) * this->alphaTwo * this->eNormalMean;
699
700 status->letTempLatticeStrainBe(originalStrain);
701 status->letTempReducedLatticeStrainBe(reducedStrain);
702 status->letTempLatticeStressBe(stress);
703
704 return stress;
705}
706
707
711
712
713void
719
720void
722{
724 fprintf(file, "status { ");
725 fprintf(file, "plasticStrains ");
726 for ( double s : this->plasticLatticeStrain ) {
727 fprintf(file, "% .8e ", s);
728 }
729
730 fprintf(file, "\n \t");
731 fprintf(file, " kappaP %.8e, surfaceType %d\n", this->kappaP, this->surfaceValue);
732 fprintf(file, "}\n");
733}
734
735
736void
742
743
744void
746{
748
749 if ( !stream.write(& kappaP, 1) ) {
751 }
752}
753
754
755void
757{
759
760 if ( !stream.read(& kappaP, 1) ) {
762 }
763}
764} // end namespace oofem
#define REGISTER_Material(class)
virtual int read(int *data, std::size_t count)=0
Reads count integer values into array pointed by data.
virtual int write(const int *data, std::size_t count)=0
Writes count integer values from array pointed by data.
Domain * domain
Link to domain object, useful for communicating with other FEM components.
Definition femcmpnn.h:79
double & at(std::size_t i)
double at(std::size_t i, std::size_t j) const
GaussPoint * gp
Associated integration point.
void printOutputAt(FILE *file, TimeStep *tStep) const override
Print receiver's output to given stream.
void saveContext(DataStream &stream, ContextMode mode) override
void restoreContext(DataStream &stream, ContextMode mode) override
double giveKappaP() const
Returns the last equilibrated scalar measure of the largest strain level.
LatticeBondPlasticityStatus(int n, Domain *d, GaussPoint *g)
Constructor.
bool hasMaterialModeCapability(MaterialMode mode) const override
double performRegularReturn(FloatArrayF< 3 > &stress, LatticeBondPlasticity_ReturnResult &returnResult, LatticeBondPlasticity_SurfaceType &surfaceType, double yieldValue, int transitionFlag, GaussPoint *gp) const
std::unique_ptr< MaterialStatus > CreateStatus(GaussPoint *gp) const override
FloatArrayF< 6 > giveLatticeStress3d(const FloatArrayF< 6 > &jump, GaussPoint *gp, TimeStep *tStep) override
double computeDHardeningDKappa(double kappa) const
FloatMatrixF< 3, 3 > computeAMatrix(const FloatArrayF< 3 > &sigma, const double tempKappa, const double deltaLambda, int transitionFlag, GaussPoint *gp) const
LatticeBondPlasticity(int n, Domain *d)
Constructor.
bool checkForVertexCase(FloatArrayF< 3 > &stress, GaussPoint *gp) const
FloatArrayF< 3 > computeMVector(const FloatArrayF< 3 > &sigma, const double kappa, int transitionFlag, GaussPoint *gp) const
int giveIPValue(FloatArray &answer, GaussPoint *gp, InternalStateType type, TimeStep *atTime) override
FloatMatrixF< 3, 3 > computeDMMatrix(const FloatArrayF< 3 > &sigma, const double deltaLambda, int transitionFlag, GaussPoint *gp) const
virtual FloatArrayF< 6 > giveReducedStrain(GaussPoint *gp, TimeStep *tStep) const
void initializeFrom(InputRecord &ir) override
double computeDParamADKappa(const double kappa) const
FloatMatrixF< 4, 4 > computeJacobian(const FloatArrayF< 3 > &sigma, const double tempKappa, const double deltaLambda, int transitionFlag, GaussPoint *gp) const
double computeYieldValue(const FloatArrayF< 3 > &sigma, const double tempKappa, int transitionFlag, GaussPoint *gp) const
FloatArrayF< 3 > performPlasticityReturn(GaussPoint *gp, const FloatArrayF< 3 > &totalStrain, TimeStep *) const
double frictionAngleOne
frictional angle of the yield surface
double fc
compressive strength
FloatArrayF< 3 > computeFVector(const FloatArrayF< 3 > &sigma, const double kappa, int transitionFlag, GaussPoint *gp) const
double computeShift(const double kappa) const
double computeTransition(const double kappa, GaussPoint *gp) const
double computeParamA(const double kappa) const
int numberOfSubIncrements
maximum number of subincrements
int newtonIter
maximum number of iterations for stress return
double computeHardening(double kappa) const
double computeDShiftDKappa(const double kappa) const
void performVertexReturn(FloatArrayF< 3 > &stress, GaussPoint *gp) const
double alphaOne
Ratio of shear and normal modulus.
double alphaTwo
Ratio of torsion and normal modulus.
void initializeFrom(InputRecord &ir) override
double eNormalMean
Normal modulus.
MaterialStatus * giveStatus(GaussPoint *gp) const override
void saveContext(DataStream &stream, ContextMode mode) override
FloatArrayF< 6 > plasticLatticeStrain
Equilibriated plastic lattice strain.
const FloatArrayF< 6 > & giveReducedLatticeStrain() const
Returns reduced lattice strain.
void updateYourself(TimeStep *) override
void restoreContext(DataStream &stream, ContextMode mode) override
void printOutputAt(FILE *file, TimeStep *tStep) const override
Print receiver's output to given stream.
virtual int giveIPValue(FloatArray &answer, GaussPoint *gp, InternalStateType type, TimeStep *tStep)
Definition material.C:138
virtual FloatArray computeStressIndependentStrainVector(GaussPoint *gp, TimeStep *tStep, ValueModeType mode) const
#define THROW_CIOERR(e)
#define OOFEM_ERROR(...)
Definition error.h:79
#define IR_GIVE_OPTIONAL_FIELD(__ir, __value, __id)
Definition inputrecord.h:75
#define IR_GIVE_FIELD(__ir, __value, __id)
Definition inputrecord.h:67
#define _IFT_LatticeBondPlasticity_fc
#define _IFT_LatticeBondPlasticity_ef
#define _IFT_LatticeBondPlasticity_sub
#define _IFT_LatticeBondPlasticity_iter
#define _IFT_LatticeBondPlasticity_angle1
#define _IFT_LatticeBondPlasticity_tol
long ContextMode
Definition contextmode.h:43
double norm(const FloatArray &x)
std::pair< bool, FloatArrayF< N > > solve_check(FloatMatrixF< N, N > mtrx, const FloatArrayF< N > &b, double zeropiv=1e-20)
FloatArrayF< N > assemble(const FloatArrayF< M > &x, int const (&c)[M])
Assemble components into zero matrix.
FloatArrayF< N > max(const FloatArrayF< N > &a, const FloatArrayF< N > &b)
FloatArrayF< N > mult(const FloatArrayF< N > &x, const FloatArrayF< N > &y)
Element-wise multiplication.
FloatArrayF< N > zeros()
For more readable code.
@ CIO_IOERR
General IO error.

This page is part of the OOFEM-3.0 documentation. Copyright Copyright (C) 1994-2025 Borek Patzak Bořek Patzák
Project e-mail: oofem@fsv.cvut.cz
Generated at for OOFEM by doxygen 1.15.0 written by Dimitri van Heesch, © 1997-2011