OOFEM 3.0
Loading...
Searching...
No Matches
rankinematgrad.C
Go to the documentation of this file.
1/*
2 *
3 * ##### ##### ###### ###### ### ###
4 * ## ## ## ## ## ## ## ### ##
5 * ## ## ## ## #### #### ## # ##
6 * ## ## ## ## ## ## ## ##
7 * ## ## ## ## ## ## ## ##
8 * ##### ##### ## ###### ## ##
9 *
10 *
11 * OOFEM : Object Oriented Finite Element Code
12 *
13 * Copyright (C) 1993 - 2025 Borek Patzak
14 *
15 *
16 *
17 * Czech Technical University, Faculty of Civil Engineering,
18 * Department of Structural Mechanics, 166 29 Prague, Czech Republic
19 *
20 * This library is free software; you can redistribute it and/or
21 * modify it under the terms of the GNU Lesser General Public
22 * License as published by the Free Software Foundation; either
23 * version 2.1 of the License, or (at your option) any later version.
24 *
25 * This program is distributed in the hope that it will be useful,
26 * but WITHOUT ANY WARRANTY; without even the implied warranty of
27 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
28 * Lesser General Public License for more details.
29 *
30 * You should have received a copy of the GNU Lesser General Public
31 * License along with this library; if not, write to the Free Software
32 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
33 */
34
35#include "rankinematgrad.h"
36#include "stressvector.h"
37#include "gausspoint.h"
38#include "floatmatrix.h"
39#include "floatarray.h"
40#include "error.h"
41#include "classfactory.h"
42
43namespace oofem {
45// gradient regularization of Rankine plasticity
46// coupled with isotropic damage
48
50
51RankineMatGrad :: RankineMatGrad(int n, Domain *d) : RankineMat(n, d), GradientDamageMaterialExtensionInterface(d)
52{}
53
55void
56RankineMatGrad :: initializeFrom(InputRecord &ir)
57{
58 RankineMat :: initializeFrom(ir);
59
61 if ( L < 0.0 ) {
62 L = 0.0;
63 }
64
65 mParam = 2.;
67
70
71
72 int formulationType = 0;
74 if ( formulationType == 0 ) {
76 } else if ( formulationType == 2 ) {
78 } else {
79 throw ValueInputException(ir, _IFT_RankineMatGrad_formulationType, "Unknown gradient damage formulation");
80 }
81}
82
83
84bool
85RankineMatGrad :: hasMaterialModeCapability(MaterialMode mode) const
86{
87 return mode == _PlaneStress;
88}
89
90void
91RankineMatGrad :: giveStiffnessMatrix(FloatMatrix &answer, MatResponseMode rMode, GaussPoint *gp, TimeStep *tStep) const
92//
93// Returns characteristic material matrix of the receiver
94//
95{
96 OOFEM_ERROR("Shouldn't be called.");
97}
98
99void
100RankineMatGrad :: giveGradientDamageStiffnessMatrix_uu(FloatMatrix &answer, MatResponseMode mode, GaussPoint *gp, TimeStep *tStep)
101{
102 MaterialMode mMode = gp->giveMaterialMode();
103 switch ( mMode ) {
104 case _PlaneStress:
105 if ( mode == ElasticStiffness ) {
106 this->giveLinearElasticMaterial()->giveStiffnessMatrix(answer, mode, gp, tStep);
107 } else {
108 RankineMatGradStatus *status = static_cast< RankineMatGradStatus * >( this->giveStatus(gp) );
109 double tempDamage = status->giveTempDamage();
110 double damage = status->giveDamage();
111 double gprime;
112 // Note:
113 // The approximate solution of Helmholtz equation can lead
114 // to very small but nonzero nonlocal kappa at some points that
115 // are actually elastic. If such small values are positive,
116 // they lead to a very small but nonzero damage. If this is
117 // interpreted as "loading", the tangent terms are activated,
118 // but damage will not actually grow at such points and the
119 // convergence rate is slowed down. It is better to consider
120 // such points as elastic.
121 if ( tempDamage - damage <= negligible_damage ) {
122 gprime = 0.;
123 } else {
124 double nonlocalCumulatedStrain = status->giveNonlocalCumulatedStrain();
125 double tempLocalCumulatedStrain = status->giveTempCumulativePlasticStrain();
126 double overNonlocalCumulatedStrain = mParam * nonlocalCumulatedStrain + ( 1. - mParam ) * tempLocalCumulatedStrain;
127 gprime = computeDamageParamPrime(overNonlocalCumulatedStrain);
128 gprime *= ( 1. - mParam );
129 }
130
131 answer = evaluatePlaneStressStiffMtrx(mode, gp, tStep, gprime);
132 }
133 break;
134 default:
135 OOFEM_ERROR("mMode = %d not supported\n", mMode);
136 }
137}
138
139void
140RankineMatGrad :: giveGradientDamageStiffnessMatrix_ud(FloatMatrix &answer, MatResponseMode mode, GaussPoint *gp, TimeStep *tStep)
141{
142 MaterialMode mMode = gp->giveMaterialMode();
143 switch ( mMode ) {
144 case _PlaneStress:
145 {
146 answer.resize(3, 1);
147 answer.zero();
148 if ( mode != TangentStiffness ) {
149 return;
150 }
151
152 RankineMatGradStatus *status = static_cast< RankineMatGradStatus * >( this->giveStatus(gp) );
153 double damage = status->giveDamage();
154 double tempDamage = status->giveTempDamage();
155 if ( tempDamage - damage <= negligible_damage ) {
156 return;
157 }
158
159 double nonlocalCumulatedStrain = status->giveNonlocalCumulatedStrain();
160 double tempCumulatedStrain = status->giveTempCumulativePlasticStrain();
161 double overNonlocalCumulatedStrain = mParam * nonlocalCumulatedStrain + ( 1. - mParam ) * tempCumulatedStrain;
162 const FloatArray &tempEffStress = status->giveTempEffectiveStress();
163 answer.at(1, 1) = tempEffStress.at(1);
164 answer.at(2, 1) = tempEffStress.at(2);
165 answer.at(3, 1) = tempEffStress.at(3);
166 double gPrime = computeDamageParamPrime(overNonlocalCumulatedStrain);
167 answer.times(-1. * gPrime * mParam);
168 }
169 break;
170 default:
171 OOFEM_ERROR("mMode = %d not supported\n", mMode);
172 }
173}
174
175void
176RankineMatGrad :: giveGradientDamageStiffnessMatrix_du(FloatMatrix &answer, MatResponseMode mode, GaussPoint *gp, TimeStep *tStep)
177{
178 MaterialMode mMode = gp->giveMaterialMode();
179 switch ( mMode ) {
180 case _PlaneStress:
181 {
182 RankineMatGradStatus *status = static_cast< RankineMatGradStatus * >( this->giveStatus(gp) );
183 answer.resize(1, 3);
184 answer.zero();
185 if ( mode != TangentStiffness ) {
186 return;
187 }
188
189 double tempKappa = status->giveTempCumulativePlasticStrain();
190 double dKappa = tempKappa - status->giveCumulativePlasticStrain();
191 if ( dKappa <= 0. ) {
192 return;
193 }
194
195 FloatArray eta(3);
196 double dkap1 = status->giveDKappa(1);
197 double H = evalPlasticModulus(tempKappa);
198
199 // evaluate in principal coordinates
200
201 if ( dkap1 == 0. ) {
202 // regular case
203 double Estar = E / ( 1. - nu * nu );
204 double aux = Estar / ( H + Estar );
205 eta.at(1) = aux;
206 eta.at(2) = nu * aux;
207 eta.at(3) = 0.;
208 } else {
209 // vertex case
210 double dkap2 = status->giveDKappa(2);
211 double denom = E * dkap1 + H * ( 1. - nu ) * ( dkap1 + dkap2 );
212 eta.at(1) = E * dkap1 / denom;
213 eta.at(2) = E * dkap2 / denom;
214 eta.at(3) = 0.;
215 }
216
217 // transform to global coordinates
218
219 FloatArray sigPrinc(2);
220 FloatMatrix nPrinc(2, 2);
221 StressVector effStress(status->giveTempEffectiveStress(), _PlaneStress);
222 effStress.computePrincipalValDir(sigPrinc, nPrinc);
223
225 FloatArray etaglob(3);
226 etaglob.beProductOf(T, eta);
227
228 answer.at(1, 1) = etaglob.at(1);
229 answer.at(1, 2) = etaglob.at(2);
230 answer.at(1, 3) = etaglob.at(3);
231
233 answer.times(1.);
235 double iA = this->computeEikonalInternalLength_a(gp);
236 if ( iA != 0 ) {
237 answer.times(1. / iA);
238 }
239 } else {
240 OOFEM_WARNING("Unknown internalLengthDependenceType");
241 }
242 }
243 break;
244 default:
245 OOFEM_ERROR("mMode = %d not supported\n", mMode);
246 }
247}
248
249void
250RankineMatGrad :: giveGradientDamageStiffnessMatrix_du_NB(FloatMatrix &answer, MatResponseMode mode, GaussPoint *gp, TimeStep *tStep)
251{
253 answer.clear();
255 MaterialMode mMode = gp->giveMaterialMode();
256 switch ( mMode ) {
257 case _PlaneStress:
258 {
259 RankineMatGradStatus *status = static_cast< RankineMatGradStatus * >( this->giveStatus(gp) );
260 answer.resize(1, 3);
261 answer.zero();
262 if ( mode != TangentStiffness ) {
263 return;
264 }
265
266 double tempKappa = status->giveTempCumulativePlasticStrain();
267 double dKappa = tempKappa - status->giveCumulativePlasticStrain();
268 if ( dKappa <= 0. ) {
269 return;
270 }
271
272 FloatArray eta(3);
273 double dkap1 = status->giveDKappa(1);
274 double H = evalPlasticModulus(tempKappa);
275
276 // evaluate in principal coordinates
277
278 if ( dkap1 == 0. ) {
279 // regular case
280 double Estar = E / ( 1. - nu * nu );
281 double aux = Estar / ( H + Estar );
282 eta.at(1) = aux;
283 eta.at(2) = nu * aux;
284 eta.at(3) = 0.;
285 } else {
286 // vertex case
287 double dkap2 = status->giveDKappa(2);
288 double denom = E * dkap1 + H * ( 1. - nu ) * ( dkap1 + dkap2 );
289 eta.at(1) = E * dkap1 / denom;
290 eta.at(2) = E * dkap2 / denom;
291 eta.at(3) = 0.;
292 }
293
294 // transform to global coordinates
295
296 FloatArray sigPrinc(2);
297 FloatMatrix nPrinc(2, 2);
298 StressVector effStress(status->giveTempEffectiveStress(), _PlaneStress);
299 effStress.computePrincipalValDir(sigPrinc, nPrinc);
300
302 FloatArray etaglob(3);
303 etaglob.beProductOf(T, eta);
304
305 answer.at(1, 1) = etaglob.at(1);
306 answer.at(1, 2) = etaglob.at(2);
307 answer.at(1, 3) = etaglob.at(3);
308
309 double LocalCumulatedStrain = status->giveTempLocalDamageDrivingVariable();
310 double NonLocalCumulatedStrain = status->giveTempNonlocalDamageDrivingVariable();
311 answer.times(LocalCumulatedStrain - NonLocalCumulatedStrain);
312 double iA = this->computeEikonalInternalLength_a(gp);
313 if ( iA != 0 ) {
314 answer.times( 1. / ( iA * iA ) );
315 }
316 double iAPrime = this->computeEikonalInternalLength_aPrime(gp);
317 double gPrime = this->computeDamageParamPrime(tempKappa);
318 answer.times(iAPrime * gPrime);
319 answer.times(1. - mParam);
320 }
321 break;
322 default:
323 OOFEM_ERROR("mMode = %d not supported\n", mMode);
324 }
325 } else {
326 OOFEM_WARNING("Unknown internalLengthDependenceType");
327 }
328}
329
330void
331RankineMatGrad :: giveGradientDamageStiffnessMatrix_du_BB(FloatMatrix &answer, MatResponseMode mode, GaussPoint *gp, TimeStep *tStep)
332{
334 answer.clear();
336 MaterialMode mMode = gp->giveMaterialMode();
337 switch ( mMode ) {
338 case _PlaneStress:
339 {
340 RankineMatGradStatus *status = static_cast< RankineMatGradStatus * >( this->giveStatus(gp) );
341 answer.resize(1, 3);
342 answer.zero();
343 if ( mode != TangentStiffness ) {
344 return;
345 }
346
347 double tempKappa = status->giveTempCumulativePlasticStrain();
348 double dKappa = tempKappa - status->giveCumulativePlasticStrain();
349 if ( dKappa <= 0. ) {
350 return;
351 }
352
353 FloatArray eta(3);
354 double dkap1 = status->giveDKappa(1);
355 double H = evalPlasticModulus(tempKappa);
356
357 // evaluate in principal coordinates
358
359 if ( dkap1 == 0. ) {
360 // regular case
361 double Estar = E / ( 1. - nu * nu );
362 double aux = Estar / ( H + Estar );
363 eta.at(1) = aux;
364 eta.at(2) = nu * aux;
365 eta.at(3) = 0.;
366 } else {
367 // vertex case
368 double dkap2 = status->giveDKappa(2);
369 double denom = E * dkap1 + H * ( 1. - nu ) * ( dkap1 + dkap2 );
370 eta.at(1) = E * dkap1 / denom;
371 eta.at(2) = E * dkap2 / denom;
372 eta.at(3) = 0.;
373 }
374
375 // transform to global coordinates
376
377 FloatArray sigPrinc(2);
378 FloatMatrix nPrinc(2, 2);
379 StressVector effStress(status->giveTempEffectiveStress(), _PlaneStress);
380 effStress.computePrincipalValDir(sigPrinc, nPrinc);
381
383 FloatArray etaglob(3);
384 etaglob.beProductOf(T, eta);
385
387 answer.beDyadicProductOf(GradP, etaglob);
388 double iBPrime = this->computeEikonalInternalLength_bPrime(gp);
389 double gPrime = this->computeDamageParamPrime(tempKappa);
390 answer.times( iBPrime * gPrime * ( 1. - mParam ) );
391 }
392 break;
393 default:
394 OOFEM_ERROR("mMode = %d not supported\n", mMode);
395 }
396 } else {
397 OOFEM_WARNING("Unknown internalLengthDependenceType");
398 }
399}
400
401void
402RankineMatGrad :: giveGradientDamageStiffnessMatrix_dd_NN(FloatMatrix &answer, MatResponseMode mode, GaussPoint *gp, TimeStep *tStep)
403{
404 MaterialMode mMode = gp->giveMaterialMode();
405 switch ( mMode ) {
406 case _PlaneStress:
408 answer.clear();
410 RankineMatGradStatus *status = static_cast< RankineMatGradStatus * >( this->giveStatus(gp) );
411 answer.resize(1, 1);
412 answer.zero();
413 double iA = this->computeEikonalInternalLength_a(gp);
414
415 if ( iA != 0 ) {
416 answer.at(1, 1) += 1. / iA;
417 }
418 if ( mode == TangentStiffness ) {
419 double tempKappa = status->giveTempCumulativePlasticStrain();
420 if ( tempKappa > status->giveCumulativePlasticStrain() && iA != 0 ) {
421 double iAPrime = this->computeEikonalInternalLength_aPrime(gp);
422 double gPrime = this->computeDamageParamPrime(tempKappa);
423 double LocalCumulatedStrain = status->giveTempLocalDamageDrivingVariable();
424 double NonLocalCumulatedStrain = status->giveTempNonlocalDamageDrivingVariable();
425 answer.at(1, 1) += iAPrime / iA / iA * gPrime * mParam * ( LocalCumulatedStrain - NonLocalCumulatedStrain );
426 }
427 }
428 } else {
429 OOFEM_WARNING("Unknown internalLengthDependenceType");
430 }
431 break;
432 default:
433 OOFEM_ERROR("mMode = %d not supported\n", mMode);
434 }
435}
436
437void
438RankineMatGrad :: giveGradientDamageStiffnessMatrix_dd_BB(FloatMatrix &answer, MatResponseMode mode, GaussPoint *gp, TimeStep *tStep)
439{
440 MaterialMode mMode = gp->giveMaterialMode();
441 switch ( mMode ) {
442 case _PlaneStress:
443 {
444 int n = this->giveDimension(gp);
445 answer.resize(n, n);
446 answer.beUnitMatrix();
450 double iB = this->computeEikonalInternalLength_b(gp);
451 answer.times(iB);
452 } else {
453 OOFEM_WARNING("Unknown internalLengthDependenceType");
454 }
455 break;
456 }
457 default:
458 OOFEM_ERROR("mMode = %d not supported\n", mMode);
459 }
460}
461
462void
463RankineMatGrad :: giveGradientDamageStiffnessMatrix_dd_BN(FloatMatrix &answer, MatResponseMode mode, GaussPoint *gp, TimeStep *tStep)
464{
466 answer.clear();
468 MaterialMode mMode = gp->giveMaterialMode();
469 switch ( mMode ) {
470 case _PlaneStress:
471 {
472 RankineMatGradStatus *status = static_cast< RankineMatGradStatus * >( this->giveStatus(gp) );
474 answer = FloatMatrix::fromArray(GradP);
475 double iBPrime = this->computeEikonalInternalLength_bPrime(gp);
476 double tempKappa = status->giveTempCumulativePlasticStrain();
477 double gPrime = this->computeDamageParamPrime(tempKappa);
478 answer.times(iBPrime * gPrime * mParam);
479 break;
480 }
481 default:
482 OOFEM_ERROR("mMode = %d not supported\n", mMode);
483 }
484 } else {
485 OOFEM_WARNING("Unknown internalLengthDependenceType");
486 }
487}
488
490RankineMatGrad :: givePlaneStressStiffMtrx(MatResponseMode mode, GaussPoint *gp, TimeStep *tStep) const
491{
492 RankineMatGradStatus *status = static_cast< RankineMatGradStatus * >( this->giveStatus(gp) );
493 double tempDamage = status->giveTempDamage();
494 double damage = status->giveDamage();
495 double gprime;
496 // Note:
497 // The approximate solution of Helmholtz equation can lead
498 // to very small but nonzero nonlocal kappa at some points that
499 // are actually elastic. If such small values are positive,
500 // they lead to a very small but nonzero damage. If this is
501 // interpreted as "loading", the tangent terms are activated,
502 // but damage will not actually grow at such points and the
503 // convergence rate is slowed down. It is better to consider
504 // such points as elastic.
505 if ( tempDamage - damage <= negligible_damage ) {
506 gprime = 0.;
507 } else {
508 double nonlocalCumulatedStrain = status->giveNonlocalCumulatedStrain();
509 double tempLocalCumulatedStrain = status->giveTempCumulativePlasticStrain();
510 double overNonlocalCumulatedStrain = mParam * nonlocalCumulatedStrain + ( 1. - mParam ) * tempLocalCumulatedStrain;
511 gprime = computeDamageParamPrime(overNonlocalCumulatedStrain);
512 gprime *= ( 1. - mParam );
513 }
514
515 return evaluatePlaneStressStiffMtrx(mode, gp, tStep, gprime);
516}
517
518void
519RankineMatGrad :: giveInternalLength(FloatMatrix &answer, MatResponseMode mode, GaussPoint *gp, TimeStep *tStep)
520{
521 answer.resize(1, 1);
522 answer.at(1, 1) = L;
523}
524
525void
526RankineMatGrad :: giveNonlocalInternalForces_N_factor(double &answer, double nlDamageDrivingVariable, GaussPoint *gp, TimeStep *tStep)
527{
528 // I modified this one to put pnl -p instead of just pnl
529 RankineMatGradStatus *status = static_cast< RankineMatGradStatus * >( this->giveStatus(gp) );
530 double LocalCumulatedStrain = status->giveTempLocalDamageDrivingVariable();
531 double NonLocalCumulatedStrain = status->giveTempNonlocalDamageDrivingVariable();
532 answer = NonLocalCumulatedStrain - LocalCumulatedStrain;
534 double iA = this->computeEikonalInternalLength_a(gp);
535 if ( iA != 0 ) {
536 answer = answer / iA;
537 }
538 }
539}
540
541void
542RankineMatGrad :: giveNonlocalInternalForces_B_factor(FloatArray &answer, const FloatArray &nlDamageDrivingVariable_grad, GaussPoint *gp, TimeStep *tStep)
543{
544 answer = nlDamageDrivingVariable_grad;
546 double iB = this->computeEikonalInternalLength_b(gp);
547 answer.times(iB);
548 } else {
550 }
551}
552
553void
554RankineMatGrad :: computeLocalDamageDrivingVariable(double &answer, GaussPoint *gp, TimeStep *tStep)
555{
556 RankineMatGradStatus *status = static_cast< RankineMatGradStatus * >( this->giveStatus(gp) );
557 answer = status->giveTempCumulativePlasticStrain();
558}
559
560void
561RankineMatGrad :: giveRealStressVectorGradientDamage(FloatArray &answer1, double &answer2, GaussPoint *gp, const FloatArray &totalStrain, double nonlocalCumulatedStrain, TimeStep *tStep)
562{
563 RankineMatGradStatus *status = static_cast< RankineMatGradStatus * >( this->giveStatus(gp) );
564
565 this->initTempStatus(gp);
566
567 double tempDamage;
568 RankineMat :: performPlasticityReturn(gp, totalStrain);
569
570 tempDamage = computeDamage(gp, tStep);
571 const FloatArray &tempEffStress = status->giveTempEffectiveStress();
572 answer1.beScaled(1.0 - tempDamage, tempEffStress);
573 answer2 = status->giveTempCumulativePlasticStrain();
574
575 status->setNonlocalCumulatedStrain(nonlocalCumulatedStrain);
576 status->letTempStrainVectorBe(totalStrain);
577 status->setTempDamage(tempDamage);
578 status->letTempEffectiveStressBe(tempEffStress);
579 status->letTempStressVectorBe(answer1);
580#ifdef keep_track_of_dissipated_energy
581 double gf = sig0 * sig0 / E; // only estimated, but OK for this purpose
582 status->computeWork_PlaneStress(gp, gf);
583#endif
584 double knl = giveNonlocalCumPlasticStrain(gp);
585 double khat = mParam * knl + ( 1. - mParam ) * answer2;
586 status->setKappa_nl(knl);
587 status->setKappa_hat(khat);
588}
589
590double
591RankineMatGrad :: computeCumPlastStrain(GaussPoint *gp, TimeStep *tStep) const
592{
593 auto status = static_cast< RankineMatGradStatus * >( this->giveStatus(gp) );
594 double localCumPlastStrain = status->giveTempCumulativePlasticStrain();
595 double nlCumPlastStrain = status->giveNonlocalCumulatedStrain();
596 return mParam * nlCumPlastStrain + ( 1. - mParam ) * localCumPlastStrain;
597}
598
599double
600RankineMatGrad :: giveNonlocalCumPlasticStrain(GaussPoint *gp)
601{
602 auto status = static_cast< RankineMatGradStatus * >( this->giveStatus(gp) );
603 return status->giveNonlocalCumulatedStrain();
604}
605
606
607int
608RankineMatGrad :: giveIPValue(FloatArray &answer, GaussPoint *gp, InternalStateType type, TimeStep *tStep)
609{
610 if ( type == IST_CumPlasticStrain_2 ) {
611 answer.resize(1);
612 answer.at(1) = giveNonlocalCumPlasticStrain(gp);
613 return 1;
614 } else if ( type == IST_MaxEquivalentStrainLevel ) {
615 answer.resize(1);
616 answer.at(1) = computeCumPlastStrain(gp, tStep);
617 return 1;
618 } else {
619 return RankineMat :: giveIPValue(answer, gp, type, tStep);
620 }
621}
622
623
624double
625RankineMatGrad :: computeEikonalInternalLength_a(GaussPoint *gp)
626{
627 RankineMatGradStatus *status = static_cast< RankineMatGradStatus * >( this->giveStatus(gp) );
628
629 double damage = status->giveTempDamage();
630 return sqrt(1. - damage) * internalLength;
631}
632
633double
634RankineMatGrad :: computeEikonalInternalLength_b(GaussPoint *gp)
635{
636 RankineMatGradStatus *status = static_cast< RankineMatGradStatus * >( this->giveStatus(gp) );
637
638 double damage = status->giveTempDamage();
639 return sqrt(1. - damage) * internalLength;
640}
641
642
643double
644RankineMatGrad :: computeEikonalInternalLength_aPrime(GaussPoint *gp)
645{
646 RankineMatGradStatus *status = static_cast< RankineMatGradStatus * >( this->giveStatus(gp) );
647
648 double damage = status->giveTempDamage();
649 return -0.5 / sqrt(1. - damage) * internalLength;
650}
651
652double
653RankineMatGrad :: computeEikonalInternalLength_bPrime(GaussPoint *gp)
654{
655 RankineMatGradStatus *status = static_cast< RankineMatGradStatus * >( this->giveStatus(gp) );
656
657 double damage = status->giveTempDamage();
658 return -0.5 / sqrt(1. - damage) * internalLength;
659}
660
661int
662RankineMatGrad :: giveDimension(GaussPoint *gp)
663{
664 if ( gp->giveMaterialMode() == _1dMat ) {
665 return 1;
666 } else if ( gp->giveMaterialMode() == _PlaneStress ) {
667 return 2;
668 } else if ( gp->giveMaterialMode() == _PlaneStrain ) {
669 return 3;
670 } else if ( gp->giveMaterialMode() == _3dMat ) {
671 return 3;
672 } else {
673 return 0;
674 }
675}
676
677
678
679//=============================================================================
680// GRADIENT RANKINE MATERIAL STATUS
681//=============================================================================
682
683
684RankineMatGradStatus :: RankineMatGradStatus(GaussPoint *g) :
686{}
687
688void
689RankineMatGradStatus :: printOutputAt(FILE *file, TimeStep *tStep) const
690{
691 StructuralMaterialStatus :: printOutputAt(file, tStep);
692
693 fprintf(file, "status {");
694 fprintf(file, "damage %g, kappa %g, kappa_nl %g, kappa_hat %g", damage, kappa, kappa_nl, kappa_hat);
695#ifdef keep_track_of_dissipated_energy
696 fprintf(file, ", dissW %g, freeE %g, stressW %g", this->dissWork, ( this->stressWork ) - ( this->dissWork ), this->stressWork);
697#endif
698 fprintf(file, " }\n");
699}
700
701
702void
703RankineMatGradStatus :: initTempStatus()
704{
705 // RankineMatStatus::initTempStatus();
706 StructuralMaterialStatus :: initTempStatus();
707
708 if ( plasticStrain.giveSize() == 0 ) {
709 if ( gp->giveMaterialMode() == _PlaneStress ) {
710 plasticStrain.resize( StructuralMaterial :: giveSizeOfVoigtSymVector(_PlaneStress) );
711 } else if ( gp->giveMaterialMode() == _3dMat ) {
712 plasticStrain.resize( StructuralMaterial :: giveSizeOfVoigtSymVector(_3dMat) );
713 }
714
715 plasticStrain.zero();
716 }
717
721
722 kappa_nl = 0.; // only containers
723 kappa_hat = 0.;
724}
725
726
727void
728RankineMatGradStatus :: updateYourself(TimeStep *tStep)
729{
730 RankineMatStatus :: updateYourself(tStep);
731}
732} // end namespace oofem
#define REGISTER_Material(class)
void resize(Index s)
Definition floatarray.C:94
double & at(Index i)
Definition floatarray.h:202
void beProductOf(const FloatMatrix &aMatrix, const FloatArray &anArray)
Definition floatarray.C:689
void beScaled(double s, const FloatArray &b)
Definition floatarray.C:208
void times(double s)
Definition floatarray.C:834
void times(double f)
static FloatMatrix fromArray(const FloatArray &vector, bool transpose=false)
void resize(Index rows, Index cols)
Definition floatmatrix.C:79
*Sets size of receiver to be an empty matrix It will have zero rows and zero columns size void clear()
void zero()
Zeroes all coefficient of receiver.
void beDyadicProductOf(const FloatArray &vec1, const FloatArray &vec2)
double at(std::size_t i, std::size_t j) const
void beUnitMatrix()
Sets receiver to unity matrix.
MaterialMode giveMaterialMode()
Returns corresponding material mode of receiver.
Definition gausspoint.h:190
GaussPoint * gp
Associated integration point.
virtual MaterialStatus * giveStatus(GaussPoint *gp) const
Definition material.C:206
virtual void initTempStatus(GaussPoint *gp) const
Definition material.C:221
virtual double giveNonlocalCumulatedStrain()
void setKappa_hat(double kap)
virtual void setNonlocalCumulatedStrain(double nonlocalCumulatedStrain)
double computeEikonalInternalLength_b(GaussPoint *gp)
double computeEikonalInternalLength_bPrime(GaussPoint *gp)
double computeEikonalInternalLength_aPrime(GaussPoint *gp)
double giveNonlocalCumPlasticStrain(GaussPoint *gp)
int giveDimension(GaussPoint *gp)
LinearElasticMaterial * giveLinearElasticMaterial()
double computeCumPlastStrain(GaussPoint *gp, TimeStep *tStep) const override
GradientDamageFormulationType gradientDamageFormulationType
double computeEikonalInternalLength_a(GaussPoint *gp)
void computeWork_PlaneStress(GaussPoint *gp, double gf)
Definition rankinemat.C:820
double giveTempDamage() const
Definition rankinemat.h:244
FloatArray tempPlasticStrain
Plastic strain (final).
Definition rankinemat.h:197
FloatArray plasticStrain
Plastic strain (initial).
Definition rankinemat.h:194
double giveDamage() const
Definition rankinemat.h:243
void setTempDamage(double value)
Definition rankinemat.h:277
double tempKappa
Cumulative plastic strain (final).
Definition rankinemat.h:209
double giveTempCumulativePlasticStrain() const
Definition rankinemat.h:247
const FloatArray & giveTempEffectiveStress() const
Definition rankinemat.h:262
double tempDamage
Damage (final).
Definition rankinemat.h:222
double giveDKappa(int i) const
Definition rankinemat.h:249
void letTempEffectiveStressBe(FloatArray values)
Definition rankinemat.h:268
double stressWork
Density of total work done by stresses on strain increments.
Definition rankinemat.h:229
double kappa
Cumulative plastic strain (initial).
Definition rankinemat.h:206
double giveCumulativePlasticStrain() const
Definition rankinemat.h:246
double damage
Damage (initial).
Definition rankinemat.h:219
RankineMatStatus(GaussPoint *g)
Definition rankinemat.C:676
double dissWork
Density of dissipated work.
Definition rankinemat.h:233
double computeDamage(GaussPoint *gp, TimeStep *tStep) const
Definition rankinemat.C:454
double computeDamageParamPrime(double tempKappa) const
Definition rankinemat.C:435
double evalPlasticModulus(const double kappa) const
Definition rankinemat.C:241
RankineMat(int n, Domain *d)
Definition rankinemat.C:52
FloatMatrixF< 3, 3 > evaluatePlaneStressStiffMtrx(MatResponseMode mode, GaussPoint *gp, TimeStep *tStep, double gprime) const
Definition rankinemat.C:502
double sig0
Initial (uniaxial) yield stress.
Definition rankinemat.h:107
double nu
Poisson's ratio.
Definition rankinemat.h:95
double E
Young's modulus.
Definition rankinemat.h:92
void computePrincipalValDir(FloatArray &answer, FloatMatrix &dir) const override
void letTempStressVectorBe(const FloatArray &v)
Assigns tempStressVector to given vector v.
void letTempStrainVectorBe(const FloatArray &v)
Assigns tempStrainVector to given vector v.
static FloatMatrixF< 3, 3 > givePlaneStressVectorTranformationMtrx(const FloatMatrixF< 2, 2 > &base, bool transpose=false)
#define OOFEM_WARNING(...)
Definition error.h:80
#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_RankineMatGrad_m
#define _IFT_RankineMatGrad_L
#define _IFT_RankineMatGrad_negligibleDamage
#define _IFT_RankineMatGrad_formulationType

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