| 462 | } |
| 463 | |
| 464 | int |
| 465 | VonPapaDamage::commitState( ) |
| 466 | { |
| 467 | // opserr << "VonPapaDamage::commitState called!" << endln; |
| 468 | //Calcular los stresses nuevos y guardar los max min... |
| 469 | |
| 470 | // Getting actual strains |
| 471 | const Vector& epsilon = getStrain(); |
| 472 | // opserr << "epsilon = " << epsilon << endln; |
| 473 | |
| 474 | // Compute the stiffness matrix in the LOCAL MATERIAL coordinate system |
| 475 | // The elastic constants are updated through the composite fatigue law (ref. Paepegem model) |
| 476 | const Matrix& Q = getTangent(); |
| 477 | |
| 478 | // Getting stresses (should remove the permament strain too) |
| 479 | static Vector stress(3); // malloc |
| 480 | stress.Zero(); |
| 481 | |
| 482 | // Compute P.K. II stresses in the current ply in the LOCAL MATERIAL coord. system |
| 483 | // Gotta be careful with voigt notation in epsilon(2) |
| 484 | stress(0) = Q(0, 0) * (epsilon(0) - strain1_p) + Q(0, 1) * (epsilon(1) - strain2_p) + Q(0, 2) * epsilon(2); |
| 485 | stress(1) = Q(1, 0) * (epsilon(0) - strain1_p) + Q(1, 1) * (epsilon(1) - strain2_p) + Q(1, 2) * epsilon(2); |
| 486 | stress(2) = Q(2, 0) * epsilon(0) + Q(2, 1) * epsilon(1) + Q(2, 2) * epsilon(2); |
| 487 | |
| 488 | // if (stress(0) != 0) |
| 489 | // { |
| 490 | // opserr << "stress(0) = " << stress(0) << endln; |
| 491 | // opserr << "deltaSigma1_t = " << deltaSigma1_t << endln; |
| 492 | // opserr << "deltaSigma1_c = " << deltaSigma1_c << endln << endln; |
| 493 | // } |
| 494 | |
| 495 | // if (stress(1) != 0) |
| 496 | // { |
| 497 | // opserr << "stress(1) = " << stress(1) << endln; |
| 498 | // opserr << "deltaSigma2_t = " << deltaSigma2_t << endln; |
| 499 | // opserr << "deltaSigma2_c =" << deltaSigma2_c << endln << endln; |
| 500 | // } |
| 501 | |
| 502 | // if (stress(2) != 0) |
| 503 | // { |
| 504 | // opserr << "stress(2) = " << stress(2) << endln; |
| 505 | // opserr << "deltaSigma12_t = " << deltaSigma12_t << endln; |
| 506 | // opserr << "deltaSigma12_c = " << deltaSigma12_c << endln << endln; |
| 507 | // } |
| 508 | |
| 509 | |
| 510 | // // Updating max stresses |
| 511 | // if (stress(0) >= 0.0) |
| 512 | // { |
| 513 | // deltaSigma1_t = max(stress(0), deltaSigma1_t); |
| 514 | // } else if (stress(0) < 0.0) { |
| 515 | // deltaSigma1_c = min(stress(0), deltaSigma1_c); |
| 516 | // } |
| 517 | |
| 518 | // if (stress(1) >= 0.0) |
| 519 | // { |
| 520 | // deltaSigma2_t = max(stress(1), deltaSigma2_t); |
| 521 | // } else if (stress(1) < 0.0) { |
nothing calls this directly
no test coverage detected