36 #include "../sm/Elements/structuralelement.h" 38 #include "../sm/Materials/structuralmaterial.h" 39 #include "../sm/Materials/structuralms.h" 91 OOFEM_ERROR(
"need 12 components for tension in pairs f0 Gf for all 6 directions");
95 OOFEM_ERROR(
"need 12 components for compression in pairs f0 Gf for all 6 directions");
98 for (
int i = 1; i <= 12; i += 2 ) {
104 OOFEM_ERROR(
"positive f0 detected for compression");
140 double delta, sigma, charLen, tmp = 0., Gf_tmp;
143 FloatArray strainVectorL(6), stressVectorL(6), tempStressVectorL(6), reducedTotalStrainVector(6), ans, equilStressVectorL(6), equilStrainVectorL(6), charLenModes(6);
177 tempStressVectorL.beProductOf(de, strainVectorL);
190 strainVectorL.at(1) = reducedTotalStrainVector.at(1);
191 tempStressVectorL.zero();
192 tempStressVectorL.at(1) = this->
give(
Ex, NULL) * strainVectorL.at(1);
205 for (
int i = 1; i <= i_max; i++ ) {
206 if ( tempStressVectorL.at(i) >= 0. ) {
214 if ( ( fabs( tempStressVectorL.at(i) ) > fabs( ( * inputFGf ).at(2 * i - 1) ) ) && ( st->
strainAtMaxStress.
at(i + s) == 0. ) && ( st->
Iteration > this->afterIter ) ) {
234 delta = ( ( * inputFGf ).at(2 * i - 1) - equilStressVectorL.at(i) ) / ( tempStressVectorL.at(i) - equilStressVectorL.at(i) );
235 delta =
min(delta, 1.);
236 delta =
max(delta, 0.);
238 st->
strainAtMaxStress.
at(i + s) = equilStrainVectorL.at(i) + delta * ( strainVectorL.at(i) - equilStrainVectorL.at(i) );
240 st->
initDamageStress.
at(i + s) = equilStressVectorL.at(i) + delta * ( tempStressVectorL.at(i) - equilStressVectorL.at(i) );
244 charLen = charLenModes.
at(i);
252 case 1: tmp = this->
give(
Ex, NULL);
254 case 2: tmp = this->
give(
Ey, NULL);
256 case 3: tmp = this->
give(
Ez, NULL);
258 case 4: tmp = this->
give(
Gyz, NULL);
260 case 5: tmp = this->
give(
Gxz, NULL);
262 case 6: tmp = this->
give(
Gxy, NULL);
270 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);
290 sigma =
max(sigma, 0.000001);
292 sigma =
min(sigma, -0.000001);
297 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) );
299 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) );
301 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) );
303 case 4: tmp = 1. - sigma / this->
give(
Gyz, NULL) / strainVectorL.at(i);
305 case 5: tmp = 1. - sigma / this->
give(
Gxz, NULL) / strainVectorL.at(i);
307 case 6: tmp = 1. - sigma / this->
give(
Gxy, NULL) / strainVectorL.at(i);
328 stressVectorL.beProductOf(de, strainVectorL);
355 if ( type == IST_DamageTensor ) {
356 answer = status->
omega;
367 double ex, ey, ez, nxy, nxz, nyz, gyz, gzx, gxy;
368 double a, b, c, d, e, f;
376 ex = this->
give(
Ex, NULL);
377 ey = this->
give(
Ey, NULL);
378 ez = this->
give(
Ez, NULL);
395 if ( mode == ElasticStiffness ) {
396 a = b = c = d = e = f = 0.;
399 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;
401 answer.
at(1, 1) = ( -ey + nyz * nyz * b * c * ez ) * a * ex * ex / denom;
402 answer.
at(1, 2) = -( nxy * ey + nxz * nyz * c * ez ) * ex * ey * a * b / denom;
403 answer.
at(1, 3) = -( nxy * nyz * b + nxz ) * ey * ex * a * c * ez / denom;
404 answer.
at(2, 2) = ( -ex + nxz * nxz * a * c * ez ) * b * ey * ey / denom;
405 answer.
at(2, 3) = -( nyz * ex + nxz * nxy * a * ey ) * ey * b * c * ez / denom;
406 answer.
at(3, 3) = ( -ex + nxy * nxy * a * b * ey ) * ey * c * ez / denom;
407 answer.
at(4, 4) = gyz;
408 answer.
at(5, 5) = gzx;
409 answer.
at(6, 6) = gxy;
453 for (
int i = 1; i <= 3; i++ ) {
454 for (
int j = 1; j <= 3; j++ ) {
455 crackPlaneNormal.
at(j) = elementCs.
at(j, i);
483 double l_ch, ft, Gf, elem_h, modulus = -1.0;
485 for (
int j = 0; j <= 1; j++ ) {
495 for (
int i = 1; i <= 6; i++ ) {
496 ft = fabs( ( * inputFGf ).at(2 * i - 1) );
497 Gf = ( * inputFGf ).at(2 * i);
500 modulus = this->
give(
Ex, NULL);
503 modulus = this->
give(
Ey, NULL);
506 modulus = this->
give(
Ez, NULL);
509 modulus = this->
give(
Gyz, NULL);
512 modulus = this->
give(
Gxz, NULL);
515 modulus = this->
give(
Gxy, NULL);
519 l_ch = modulus * Gf / ft / ft;
520 elem_h = charLenModes.
at(i);
521 if ( elem_h > 2 * l_ch ) {
525 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);
532 ft = fabs( ( * inputFGf ).at(1) );
533 Gf = ( * inputFGf ).at(2);
534 modulus = this->
give(
Ex, NULL);
535 l_ch = modulus * Gf / ft / ft;
537 if ( elem_h > 2 * l_ch ) {
542 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);
593 int maxComponents = 0;
595 fprintf(file,
"status {");
610 fprintf(file,
" omega ");
611 for (
int i = 1; i <= maxComponents; i++ ) {
612 fprintf( file,
"%.4f ", this->
omega.
at(i) );
616 fprintf(file,
" Local_stress ");
617 for (
int i = 1; i <= maxComponents; i++ ) {
621 fprintf(file,
" kappa ");
622 for (
int i = 1; i <= maxComponents; i++ ) {
623 for (
int j = 0; j < 2; j++ ) {
624 fprintf( file,
"%.2e ", this->
kappa.
at(6 * j + i) );
630 fprintf(file,
"}\n");
bool contains(int value) const
CrossSection * giveCrossSection()
FloatArray inputTension
Six stress components of tension components read from the input file.
IntArray hasSnapBack
Checks whether snapback occurred at IP.
virtual void updateYourself(TimeStep *tStep)
Update equilibrium history variables according to temp-variables.
InternalStateType
Type representing the physical meaning of element or constitutive model internal variable.
FloatArray maxStrainAtZeroStress
Maximum strain when stress becomes zero due to complete damage (omega = 1) at IP. Determined from fra...
#define _IFT_CompoDamageMat_compres_f0_gf
MaterialMode giveMaterialMode()
Returns corresponding material mode of receiver.
CompoDamageMatStatus(int n, Domain *d, GaussPoint *g)
Constructor.
void letTempStrainVectorBe(const FloatArray &v)
Assigns tempStrainVector to given vector v.
FloatArray omega
Highest damage ever reached in all previous equilibrated steps at IP [6 for tension and compression]...
virtual MaterialStatus * giveStatus(GaussPoint *gp) const
Returns material status of receiver in given integration point.
GaussPoint * gp
Associated integration point.
virtual void giveInputRecord(DynamicInputRecord &input)
Setups the input record string of receiver.
The purpose of DataStream abstract class is to allow to store/restore context to different streams...
virtual int giveIPValue(FloatArray &answer, GaussPoint *gp, InternalStateType type, TimeStep *tStep)
Returns the integration point corresponding value in Reduced form.
virtual ~CompoDamageMat()
Destructor.
FloatArray tempKappa
Highest strain ever reached at IP. Can be unequilibrated from last iterations [6 tension, 6 compression].
void zero()
Sets all component to zero.
double & at(int i)
Coefficient access function.
int max(int i, int j)
Returns bigger value form two given decimals.
This class implements a structural material status information.
virtual void updateYourself(TimeStep *tStep)
Update equilibrium history variables according to temp-variables.
Dictionary propertyDictionary
Property dictionary.
Abstract base class for all finite elements.
Element * giveElement()
Returns corresponding element to receiver.
static void giveStrainVectorTranformationMtrx(FloatMatrix &answer, const FloatMatrix &base, bool transpose=false)
Computes 3d strain vector transformation matrix from standard vector transformation matrix...
void checkSnapBack(GaussPoint *gp, MaterialMode mMode)
Check that element is small enough or Gf is large enough to prevent the snap-back.
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
void giveStressDependentPartOfStrainVector(FloatArray &answer, GaussPoint *gp, const FloatArray &reducedStrainVector, TimeStep *tStep, ValueModeType mode)
Method for subtracting from reduced space strain vector its stress-independent parts (caused by tempe...
MaterialMode
Type representing material mode of integration point.
virtual void printOutputAt(FILE *file, TimeStep *tStep)
Print receiver's output to given stream.
int & at(int i)
Coefficient access function.
MatResponseMode
Describes the character of characteristic material matrix.
IntArray allowSnapBack
Stress components which are allowed for snap back [6 tension, 6 compression].
#define _IFT_CompoDamageMat_allowSnapBack
const char * __MaterialModeToString(MaterialMode _value)
virtual double give(int aProperty, GaussPoint *gp)
Returns the value of material property 'aProperty'.
Abstract base class for all "structural" finite elements.
virtual contextIOResultType saveContext(DataStream &stream, ContextMode mode, void *obj)
Stores receiver state to output stream.
Class for maintaining Gauss point values for CompoDamageMat model.
#define OOFEM_LOG_INFO(...)
int giveMatStiffRotationMatrix(FloatMatrix &answer, GaussPoint *gp)
Returns [6x6] rotation matrix in the global coordinate system.
virtual void give3dMaterialStiffnessMatrix(FloatMatrix &answer, MatResponseMode mmode, GaussPoint *gp, TimeStep *tStep)
Computes full 3d material stiffness matrix at given integration point, time, respecting load history ...
virtual void giveRealStressVector(FloatArray &answer, GaussPoint *gp, const FloatArray &, TimeStep *tStep)
Computes the real stress vector for given total strain and integration point.
int afterIter
Optional parameter determining after how many iterations within the time step the damage is calculate...
FloatArray strainAtMaxStress
Strain when damage is initiated at IP. In literature denoted eps_0 [6 tension, 6 compression].
int giveNumber()
Returns number of receiver.
#define _IFT_CompoDamageMat_nuyz
void rotatedWith(const FloatMatrix &r, char mode= 'n')
Returns the receiver 'a' transformed using give transformation matrix r.
#define _IFT_CompoDamageMat_tension_f0_gf
#define _IFT_CompoDamageMat_Gxy
CompoDamageMat(int n, Domain *d)
Constructor.
FloatArray elemCharLength
Characteristic element length at IP in three perpendicular planes aligned with material orientation...
virtual int giveLocalCoordinateSystem(FloatMatrix &answer)
Returns local coordinate system of receiver Required by material models with ortho- and anisotrophy...
double at(int i, int j) const
Coefficient access function.
void resize(int n)
Checks size of receiver towards requested bounds.
FloatArray initDamageStress
Stress at which damage starts. For uniaxial loading is equal to given maximum stress in the input...
virtual contextIOResultType restoreContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Restores the receiver state previously written in stream.
virtual ~CompoDamageMatStatus()
Destructor.
Pair * add(int aKey, double value)
Adds a new Pair with given keyword and value into receiver.
Class representing vector of real numbers.
virtual int giveIPValue(FloatArray &answer, GaussPoint *gp, InternalStateType type, TimeStep *tStep)
Returns the integration point corresponding value in Reduced form.
Implementation of matrix containing floating point numbers.
IRResultType
Type defining the return values of InputRecord reading operations.
static void transformStrainVectorTo(FloatArray &answer, const FloatMatrix &base, const FloatArray &strainVector, bool transpose=false)
Transforms 3d strain vector into another coordinate system.
void letTempStressVectorBe(const FloatArray &v)
Assigns tempStressVector to given vector v.
const FloatArray & giveStressVector() const
Returns the const pointer to receiver's stress vector.
FloatArray kappa
Highest strain ever reached in all previous equilibrated steps [6 tension, 6 compression].
FloatArray tempStressMLCS
Only for printing purposes in CompoDamageMatStatus.
void resize(int rows, int cols)
Checks size of receiver towards requested bounds.
void zero()
Zeroes all coefficients of receiver.
virtual double giveCharacteristicLength(const FloatArray &normalToCrackPlane)
Returns the size of element in the given direction, in some cases adjusted (e.g.
void giveUnrotated3dMaterialStiffnessMatrix(FloatMatrix &answer, MatResponseMode mode, GaussPoint *gp)
Returns 3D material stiffness matrix [6x6] in unrotated form.
#define _IFT_CompoDamageMat_nuxynuxz
#define _IFT_CompoDamageMat_afteriter
void giveCharLength(CompoDamageMatStatus *status, GaussPoint *gp, FloatMatrix &elementCs)
Fills array elemCharLength with characteristic length related to three perpendicular planes...
long ContextMode
Context mode (mask), defining the type of information written/read to/from context.
Abstract base class for all "structural" constitutive models.
FloatArray tempOmega
Highest damage ever reached at IP. Can be unequilibrated from last iterations [6 for tension and comp...
virtual void initTempStatus()
Initializes the temporary internal variables, describing the current state according to previously re...
void zero()
Zeroes all coefficient of receiver.
int min(int i, int j)
Returns smaller value from two given decimals.
void beUnitMatrix()
Sets receiver to unity matrix.
virtual void giveInputRecord(DynamicInputRecord &input)
Setups the input record string of receiver.
void giveCharLengthForModes(FloatArray &charLenModes, GaussPoint *gp)
Computes characteristic length for fixed planes of material orientation.
REGISTER_Material(DummyMaterial)
int giveSize() const
Returns the size of receiver.
virtual contextIOResultType restoreContext(DataStream &stream, ContextMode mode, void *obj)
Restores the receiver state previously written in stream.
bool containsOnlyZeroes() const
Returns nonzero if all coefficients of the receiver are 0, else returns zero.
virtual contextIOResultType saveContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Stores receiver state to output stream.
the oofem namespace is to define a context or scope in which all oofem names are defined.
const FloatArray & giveStrainVector() const
Returns the const pointer to receiver's strain vector.
void symmetrized()
Initializes the lower half of the receiver according to the upper half.
FloatArray inputCompression
Six stress components of compression components read from the input file.
static void transformStressVectorTo(FloatArray &answer, const FloatMatrix &base, const FloatArray &stressVector, bool transpose=false)
Transforms 3d stress vector into another coordinate system.
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
Class representing integration point in finite element program.
#define OOFEM_WARNING(...)
Class representing solution step.
#define _IFT_CompoDamageMat_exx
#define _IFT_CompoDamageMat_eyyezz
int Iteration
Iteration in the time step.
void resize(int s)
Resizes receiver towards requested size.
virtual void printOutputAt(FILE *file, TimeStep *tStep)
Print receiver's output to given stream.