55 Material :: initializeFrom(ir);
87 OOFEM_ERROR(
"need 12 components for tension in pairs f0 Gf for all 6 directions");
91 OOFEM_ERROR(
"need 12 components for compression in pairs f0 Gf for all 6 directions");
94 for (
int i = 1; i <= 12; i += 2 ) {
100 OOFEM_ERROR(
"positive f0 detected for compression");
113 StructuralMaterial :: giveInputRecord(input);
120CompoDamageMat :: give3dMaterialStiffnessMatrix(MatResponseMode mode,
GaussPoint *gp,
TimeStep *tStep)
const
127 d =
rotate(d, rotationMatrix);
136 double delta, sigma, charLen, tmp = 0., Gf_tmp;
139 FloatArray strainVectorL(6), stressVectorL(6), tempStressVectorL(6), reducedTotalStrainVector(6), ans, equilStressVectorL(6), equilStrainVectorL(6), charLenModes(6);
173 tempStressVectorL.beProductOf(de, strainVectorL);
186 strainVectorL.at(1) = reducedTotalStrainVector.at(1);
187 tempStressVectorL.zero();
188 tempStressVectorL.at(1) = this->
give(
Ex, NULL) * strainVectorL.at(1);
194 OOFEM_ERROR(
"Material mode %s not supported", __MaterialModeToString(mMode) );
200 for (
int i = 1; i <= i_max; i++ ) {
201 if ( tempStressVectorL.at(i) >= 0. ) {
209 if ( ( fabs( tempStressVectorL.at(i) ) > fabs( ( * inputFGf ).at(2 * i - 1) ) ) && ( st->
strainAtMaxStress.
at(i + s) == 0. ) && ( st->
Iteration > this->afterIter ) ) {
225 OOFEM_ERROR(
"Material mode %s not supported", __MaterialModeToString(mMode) );
229 delta = ( ( * inputFGf ).at(2 * i - 1) - equilStressVectorL.at(i) ) / ( tempStressVectorL.at(i) - equilStressVectorL.at(i) );
230 delta =
min(delta, 1.);
231 delta =
max(delta, 0.);
233 st->
strainAtMaxStress.
at(i + s) = equilStrainVectorL.at(i) + delta * ( strainVectorL.at(i) - equilStrainVectorL.at(i) );
235 st->
initDamageStress.
at(i + s) = equilStressVectorL.at(i) + delta * ( tempStressVectorL.at(i) - equilStressVectorL.at(i) );
239 charLen = charLenModes.
at(i);
247 case 1: tmp = this->
give(
Ex, NULL);
249 case 2: tmp = this->
give(
Ey, NULL);
251 case 3: tmp = this->
give(
Ez, NULL);
253 case 4: tmp = this->
give(
Gyz, NULL);
255 case 5: tmp = this->
give(
Gxz, NULL);
257 case 6: tmp = this->
give(
Gxy, NULL);
265 OOFEM_WARNING(
"Too large initiation trial stress in element %d, component %d, |%f| < |%f|=f_t, negative remaining Gf=%f, treated as a snap-back", gp->
giveElement()->
giveNumber(), s == 0 ? i : -i, st->
initDamageStress.
at(i + s), tempStressVectorL.at(i), Gf_tmp);
285 sigma =
max(sigma, 0.000001);
287 sigma =
min(sigma, -0.000001);
292 case 1: tmp = 1. - sigma / ( this->
give(
Ex, NULL) * strainVectorL.at(i) + this->
give(
NYxy, NULL) * tempStressVectorL.at(2) + this->
give(
NYxz, NULL) * tempStressVectorL.at(3) );
294 case 2: tmp = 1. - sigma / ( this->
give(
Ey, NULL) * strainVectorL.at(i) + this->
give(
NYyx, NULL) * tempStressVectorL.at(1) + this->
give(
NYyz, NULL) * tempStressVectorL.at(3) );
296 case 3: tmp = 1. - sigma / ( this->
give(
Ez, NULL) * strainVectorL.at(i) + this->
give(
NYzx, NULL) * tempStressVectorL.at(1) + this->
give(
NYzy, NULL) * tempStressVectorL.at(2) );
298 case 4: tmp = 1. - sigma / this->
give(
Gyz, NULL) / strainVectorL.at(i);
300 case 5: tmp = 1. - sigma / this->
give(
Gxz, NULL) / strainVectorL.at(i);
302 case 6: tmp = 1. - sigma / this->
give(
Gxy, NULL) / strainVectorL.at(i);
323 stressVectorL.beProductOf(de, strainVectorL);
350 if ( type == IST_DamageTensor ) {
351 answer = status->
omega;
353 StructuralMaterial :: giveIPValue(answer, gp, type, tStep);
362 double ex, ey, ez, nxy, nxz, nyz, gyz, gzx, gxy;
363 double a, b, c, d, e, f;
370 ex = this->
give(
Ex, NULL);
371 ey = this->
give(
Ey, NULL);
372 ez = this->
give(
Ez, NULL);
389 if ( mode == ElasticStiffness ) {
390 a = b = c = d = e = f = 0.;
393 denom = -ey * ex + ex * nyz * nyz * b * c * ez + nxy * nxy * a * b * ey * ey + 2 * nxy * a * b * ey * nxz * nyz * c * ez + nxz * nxz * a * ey * c * ez;
395 answer.
at(1, 1) = ( -ey + nyz * nyz * b * c * ez ) * a * ex * ex / denom;
396 answer.
at(1, 2) = -( nxy * ey + nxz * nyz * c * ez ) * ex * ey * a * b / denom;
397 answer.
at(1, 3) = -( nxy * nyz * b + nxz ) * ey * ex * a * c * ez / denom;
398 answer.
at(2, 2) = ( -ex + nxz * nxz * a * c * ez ) * b * ey * ey / denom;
399 answer.
at(2, 3) = -( nyz * ex + nxz * nxy * a * ey ) * ey * b * c * ez / denom;
400 answer.
at(3, 3) = ( -ex + nxy * nxy * a * b * ey ) * ey * c * ez / denom;
401 answer.
at(4, 4) = gyz;
402 answer.
at(5, 5) = gzx;
403 answer.
at(6, 6) = gxy;
404 answer.symmetrized();
430 OOFEM_ERROR(
"Material mode %s not supported", __MaterialModeToString(mMode) );
448 for (
int i = 1; i <= 3; i++ ) {
449 for (
int j = 1; j <= 3; j++ ) {
450 crackPlaneNormal.
at(j) = elementCs.
at(j, i);
473void CompoDamageMat :: checkSnapBack(
GaussPoint *gp, MaterialMode mMode)
const
478 double l_ch, ft, Gf, elem_h, modulus = -1.0;
480 for (
int j = 0; j <= 1; j++ ) {
490 for (
int i = 1; i <= 6; i++ ) {
491 ft = fabs( ( * inputFGf ).at(2 * i - 1) );
492 Gf = ( * inputFGf ).at(2 * i);
495 modulus = this->
give(
Ex, NULL);
498 modulus = this->
give(
Ey, NULL);
501 modulus = this->
give(
Ez, NULL);
504 modulus = this->
give(
Gyz, NULL);
507 modulus = this->
give(
Gxz, NULL);
510 modulus = this->
give(
Gxy, NULL);
514 l_ch = modulus * Gf / ft / ft;
515 elem_h = charLenModes.
at(i);
516 if ( elem_h > 2 * l_ch ) {
520 OOFEM_ERROR(
"Decrease size of 3D element %d or increase Gf(%d)=%f to Gf>%f, possible snap-back problems", gp->
giveElement()->
giveNumber(), j == 0 ? i : -i, Gf, ft * ft * elem_h / 2 / modulus);
527 ft = fabs( ( * inputFGf ).at(1) );
528 Gf = ( * inputFGf ).at(2);
529 modulus = this->
give(
Ex, NULL);
530 l_ch = modulus * Gf / ft / ft;
532 if ( elem_h > 2 * l_ch ) {
537 OOFEM_ERROR(
"Decrease size of 1D element %d or increase Gf(%d)=%f to Gf>%f, possible snap-back problems", gp->
giveElement()->
giveNumber(), j == 0 ? 1 : -1, Gf, ft * ft * elem_h / 2 / modulus);
543 OOFEM_ERROR(
"Material mode %s not supported", __MaterialModeToString(mMode) );
552 this->
kappa.resize(12);
558 this->
omega.resize(6);
580void CompoDamageMatStatus :: printOutputAt(FILE *file,
TimeStep *tStep)
const
582 int maxComponents = 0;
583 StructuralMaterialStatus :: printOutputAt(file, tStep);
584 fprintf(file,
"status {");
585 switch (
gp->giveMaterialMode() ) {
598 if ( !this->
omega.containsOnlyZeroes() ) {
599 fprintf(file,
" omega ");
600 for (
int i = 1; i <= maxComponents; i++ ) {
601 fprintf( file,
"%.4f ", this->
omega.at(i) );
605 fprintf(file,
" Local_stress ");
606 for (
int i = 1; i <= maxComponents; i++ ) {
610 fprintf(file,
" kappa ");
611 for (
int i = 1; i <= maxComponents; i++ ) {
612 for (
int j = 0; j < 2; j++ ) {
613 fprintf( file,
"%.2e ", this->
kappa.at(6 * j + i) );
617 fprintf(file,
"}\n");
623void CompoDamageMatStatus :: initTempStatus()
629void CompoDamageMatStatus :: updateYourself(
TimeStep *tStep)
632 StructuralMaterialStatus :: updateYourself(tStep);
641 StructuralMaterialStatus :: saveContext(stream, mode);
646 StructuralMaterialStatus :: restoreContext(stream, mode);
#define REGISTER_Material(class)
FloatArray initDamageStress
Stress at which damage starts. For uniaxial loading is equal to given maximum stress in the input....
FloatArray tempKappa
Highest strain ever reached at IP. Can be unequilibrated from last iterations [6 tension,...
FloatArray elemCharLength
Characteristic element length at IP in three perpendicular planes aligned with material orientation.
FloatArray kappa
Highest strain ever reached in all previous equilibrated steps [6 tension, 6 compression].
FloatArray tempStressMLCS
Only for printing purposes in CompoDamageMatStatus.
FloatArray strainAtMaxStress
Strain when damage is initiated at IP. In literature denoted eps_0 [6 tension, 6 compression].
IntArray hasSnapBack
Checks whether snapback occurred at IP.
int Iteration
Iteration in the time step.
FloatArray omega
Highest damage ever reached in all previous equilibrated steps at IP [6 for tension and compression].
FloatArray maxStrainAtZeroStress
Maximum strain when stress becomes zero due to complete damage (omega = 1) at IP. Determined from fra...
FloatArray tempOmega
Highest damage ever reached at IP. Can be unequilibrated from last iterations [6 for tension and comp...
void giveCharLengthForModes(FloatArray &charLenModes, GaussPoint *gp) const
IntArray allowSnapBack
Stress components which are allowed for snap back [6 tension, 6 compression].
FloatArray inputTension
Six stress components of tension components read from the input file.
int giveMatStiffRotationMatrix(FloatMatrixF< 6, 6 > &answer, GaussPoint *gp) const
void checkSnapBack(GaussPoint *gp, MaterialMode mMode) const
void giveCharLength(CompoDamageMatStatus *status, GaussPoint *gp, FloatMatrix &elementCs) const
FloatMatrixF< 6, 6 > giveUnrotated3dMaterialStiffnessMatrix(MatResponseMode mode, GaussPoint *gp) const
FloatArray inputCompression
Six stress components of compression components read from the input file.
int giveGlobalNumber() const
virtual double giveCharacteristicLength(const FloatArray &normalToCrackPlane)
virtual int giveLocalCoordinateSystem(FloatMatrix &answer)
double at(std::size_t i, std::size_t j) const
void resize(Index rows, Index cols)
double at(std::size_t i, std::size_t j) const
void beUnitMatrix()
Sets receiver to unity matrix.
int giveNumber()
Returns number of receiver.
MaterialMode giveMaterialMode()
Returns corresponding material mode of receiver.
Element * giveElement()
Returns corresponding element to receiver.
GaussPoint * gp
Associated integration point.
virtual MaterialStatus * giveStatus(GaussPoint *gp) const
Dictionary propertyDictionary
virtual double give(int aProperty, GaussPoint *gp) const
const FloatArray & giveStrainVector() const
Returns the const pointer to receiver's strain vector.
StructuralMaterialStatus(GaussPoint *g)
Constructor. Creates new StructuralMaterialStatus with IntegrationPoint g.
const FloatArray & giveStressVector() const
Returns the const pointer to receiver's stress vector.
void letTempStressVectorBe(const FloatArray &v)
Assigns tempStressVector to given vector v.
void letTempStrainVectorBe(const FloatArray &v)
Assigns tempStrainVector to given vector v.
StructuralMaterial(int n, Domain *d)
static FloatMatrixF< 6, 6 > giveStrainVectorTranformationMtrx(const FloatMatrixF< 3, 3 > &base, bool transpose=false)
static FloatArrayF< 6 > transformStrainVectorTo(const FloatMatrixF< 3, 3 > &base, const FloatArrayF< 6 > &strain, bool transpose=false)
void giveStressDependentPartOfStrainVector(FloatArray &answer, GaussPoint *gp, const FloatArray &reducedStrainVector, TimeStep *tStep, ValueModeType mode) const
static FloatArrayF< 6 > transformStressVectorTo(const FloatMatrixF< 3, 3 > &base, const FloatArrayF< 6 > &stress, bool transpose=false)
#define _IFT_CompoDamageMat_afteriter
#define _IFT_CompoDamageMat_nuyz
#define _IFT_CompoDamageMat_Gxy
#define _IFT_CompoDamageMat_nuxynuxz
#define _IFT_CompoDamageMat_exx
#define _IFT_CompoDamageMat_allowSnapBack
#define _IFT_CompoDamageMat_compres_f0_gf
#define _IFT_CompoDamageMat_eyyezz
#define _IFT_CompoDamageMat_tension_f0_gf
#define OOFEM_WARNING(...)
#define OOFEM_LOG_INFO(...)
FloatArrayF< N > min(const FloatArrayF< N > &a, const FloatArrayF< N > &b)
FloatArrayF< N > max(const FloatArrayF< N > &a, const FloatArrayF< N > &b)
FloatMatrixF< M, M > rotate(FloatMatrixF< N, N > &a, const FloatMatrixF< N, M > &r)
Computes .