47 #include "../tm/latticetransportelement.h" 65 return mode == _2dLattice;
75 if ( result !=
IRRT_OK )
return result;
78 if ( result !=
IRRT_OK )
return result;
143 tempEquivStrain = 0.;
150 double paramA, paramB, paramC;
152 paramA = 0.5 * ( e0 +
ec * e0 );
153 paramB = (
coh * e0 ) / sqrt( 1. - pow( (
ec * e0 - e0 ) / ( e0 +
ec * e0 ), 2. ) );
154 paramC = 0.5 * ( this->
ec * e0 - e0 );
157 tempEquivStrain = sqrt( pow(this->
alphaOne * strain.
at(2) / paramB, 2.) + pow( ( strain.
at(1) + paramC ) / paramA, 2. ) ) * paramA - paramC;
168 double R, Lhs, Ft, help;
171 if ( tempKappa >= e0 && tempKappa < this->
wf / le ) {
174 if ( this->
wf / le <= e0 ) {
175 OOFEM_ERROR(
"e0>wf/Le \n Possible solutions: Increase fracture energy or reduce element size");
178 omega = ( 1. - e0 / tempKappa ) / ( 1. - e0 / ( this->
wf / le ) );
179 }
else if ( tempKappa >= this->
wf / le ) {
185 double helpStrain = 0.3 * e0;
188 if ( e0 >
wfOne / le ) {
190 }
else if (
wfOne / le > this->
wf / le ) {
195 if ( tempKappa > e0 ) {
196 omega = ( 1 - e0 / tempKappa ) / ( ( helpStrain - e0 ) / this->
wfOne * le + 1. );
198 if ( omega * tempKappa * le > 0 && omega * tempKappa * le < this->
wfOne ) {
201 omega = ( 1. - helpStrain / tempKappa - helpStrain * this->wfOne / ( tempKappa * ( this->
wf - this->
wfOne ) ) ) / ( 1. - helpStrain * le / ( this->
wf - this->wfOne ) );
203 if ( omega * tempKappa * le >= this->wfOne && omega * tempKappa * le < this->
wf ) {
210 }
else if ( omega < 0 ) {
221 if ( tempKappa <= e0 ) {
228 help = le * omega * tempKappa / this->
wf;
229 R = ( 1. - omega ) *
eNormal * tempKappa - Ft *exp(-help);
230 Lhs =
eNormal * tempKappa - Ft *exp(-help) * le * tempKappa / this->
wf;
235 }
while ( fabs(R) >= 1.e-4 );
237 if ( ( omega > 1.0 ) || ( omega < 0.0 ) ) {
277 if ( mode == VM_Total ) {
280 answer.
at(1) = this->
give(
tAlpha, gp) * deltaTemperature;
287 answer.
at(1) += this->
cAlpha * et.
at(1) / length;
301 if ( status == NULL ) {
305 if ( status != NULL ) {
333 double f, equivStrain, tempKappa, omega = 0.;
336 reducedStrain = totalStrain;
360 tempKappa = equivStrain;
372 answer.
at(1) = ( 1. - omega ) *
eNormal * reducedStrain.
at(1);
373 answer.
at(2) = ( 1. - omega ) *
eShear * reducedStrain.
at(2);
374 answer.
at(3) = ( 1. - omega ) *
eTorsion * reducedStrain.
at(3);
378 double waterPressure = 0.;
385 if ( couplingFlag == 1 && coupledModels.
at(2) != 0 && !tStep->
isTheFirstStep() ) {
400 tempDissipation += tempDeltaDissipation;
404 double crackWidth = omega * sqrt( pow(reducedStrain.
at(1), 2.) + pow(reducedStrain.
at(2), 2.) ) * le;
416 answer.
at(1) = answer.
at(1) + biot * waterPressure;
447 }
else if ( omega*kappa*le > 0 && omega*kappa*le < this->
wf ) {
453 OOFEM_ERROR(
"Wrong stype for btype=1. Only linear and exponential softening considered so far\n");
477 crackOpeningOld.
times(omegaOld);
478 crackOpeningOld.
times(length);
481 double tempDeltaDissipation = 0.;
482 double deltaTempDeltaDissipation = 0.;
484 double intermediateOmega = 0;
486 oldIntermediateStrain = reducedStrainOld;
487 double oldIntermediateOmega = omegaOld;
488 deltaOmega = ( omega - omegaOld );
489 double testDissipation =
490 0.5 * length * ( pow( ( reducedStrain(0) + reducedStrainOld(0) ) / 2., 2. ) *
eNormal +
491 pow( ( reducedStrain(1) + reducedStrainOld(1) ) / 2., 2. ) *
eShear +
492 pow( ( reducedStrain(2) + reducedStrainOld(2) ) / 2., 2. ) *
eTorsion ) * deltaOmega;
495 double intervals = 0.;
497 double referenceGf = 0;
500 referenceGf = e0 *
eNormal * this->
wf / 2.;
505 if ( testDissipation / ( referenceGf ) > 0.01 ) {
506 intervals = 1000. * testDissipation / referenceGf;
511 if ( intervals > 1000. ) {
516 double f, equivStrain;
517 if ( deltaOmega > 0 ) {
518 for (
int k = 0; k < intervals; k++ ) {
519 intermediateStrain(0) = reducedStrainOld(0) + ( k + 1 ) / intervals * ( reducedStrain(0) - reducedStrainOld(0) );
520 intermediateStrain(1) = reducedStrainOld(1) + ( k + 1 ) / intervals * ( reducedStrain(1) - reducedStrainOld(1) );
521 intermediateStrain(2) = reducedStrainOld(2) + ( k + 1 ) / intervals * ( reducedStrain(2) - reducedStrainOld(2) );
523 f = equivStrain - oldKappa;
526 deltaOmega = ( intermediateOmega - oldIntermediateOmega );
527 deltaTempDeltaDissipation =
528 0.5 * length * ( pow( ( intermediateStrain(0) + oldIntermediateStrain(0) ) / 2., 2. ) *
eNormal +
529 pow( ( intermediateStrain(1) + oldIntermediateStrain(1) ) / 2., 2. ) *
eShear +
530 pow( ( intermediateStrain(2) + oldIntermediateStrain(2) ) / 2., 2. ) *
eTorsion ) * deltaOmega;
532 oldKappa = equivStrain;
533 oldIntermediateOmega = intermediateOmega;
535 deltaTempDeltaDissipation = 0.;
538 tempDeltaDissipation += deltaTempDeltaDissipation;
539 oldIntermediateStrain = intermediateStrain;
542 tempDeltaDissipation = 0.;
545 if ( tempDeltaDissipation >= 2. * referenceGf ) {
546 tempDeltaDissipation = 2. * referenceGf;
549 return tempDeltaDissipation;
561 OOFEM_ERROR(
"Unknown local random type:\n randomtype 1 = Gaussian");
582 if ( rMode == ElasticStiffness ) {
584 }
else if ( rMode == SecantStiffness ) {
586 }
else if ( rMode == TangentStiffness ) {
608 if ( omega > 1. - 1.e-9 ) {
615 answer.
at(1, 1) = ( 1 - omega ) *
eNormal;
616 answer.
at(2, 2) = ( 1 - omega ) *
eShear;
648 if ( static_cast< LatticeDamage2dStatus * >( this->
giveStatus(gp) )->_giveProperty(aProperty, answer) ) {
650 }
else if ( aProperty ==
e0_ID ) {
652 }
else if ( aProperty ==
ef_ID ) {
667 if ( type == IST_CrackStatuses ) {
671 }
else if ( type == IST_DamageScalar ) {
675 }
else if ( type == IST_DamageTensor ) {
679 }
else if ( type == IST_DissWork ) {
683 }
else if ( type == IST_DeltaDissWork ) {
687 }
else if ( type == IST_CrackWidth ) {
737 fprintf(file,
"status { ");
738 fprintf(file,
"reduced strains ");
740 fprintf( file,
"%.4e ", val );
743 fprintf(file,
"kappa %f, equivStrain %f, damage %f, dissipation %f, deltaDissipation %f, e0 %f, crack_flag %d, crackWidth %.8e, biotCoeff %f", this->
kappa, this->
equivStrain, this->
damage, this->
dissipation, this->
deltaDissipation, this->
e0, this->
crack_flag, this->
crackWidth, this->
biot);
744 fprintf(file,
"}\n");
virtual EngngModel * giveSlaveProblem(int i)
Returns i-th slave problem.
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.
MaterialMode giveMaterialMode()
Returns corresponding material mode of receiver.
virtual void giveRealStressVector(FloatArray &answer, GaussPoint *, const FloatArray &, TimeStep *)
Computes the real stress vector for given total strain and integration point.
virtual void computeResultingIPTemperatureAt(FloatArray &answer, TimeStep *tStep, GaussPoint *gp, ValueModeType mode)
Computes at given time (tStep) the the resulting temperature component array.
void letTempStrainVectorBe(const FloatArray &v)
Assigns tempStrainVector to given vector v.
void setTempDamage(double newDamage)
Sets the temp damage level to given value.
double tempNormalStress
nonequilibrated normal stress
double coefficientOfVariation
Coefficient variation of the Gaussian distribution.
IntegrationPointStatus * setMaterialStatus(IntegrationPointStatus *ptr, int n)
Sets Material status managed by receiver.
double tempKappa
Non-equilibrated scalar measure of the largest strain level.
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
Domain * domain
Link to domain object, useful for communicating with other FEM components.
virtual contextIOResultType saveContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Stores receiver state to output stream.
double giveKappa()
Returns the last equilibrated scalar measure of the largest strain level.
int temp_crack_flag
Non-equilibrated temp flag.
double tempDeltaDissipation
Non-equilibrated increment of dissipation.
The purpose of DataStream abstract class is to allow to store/restore context to different streams...
contextIOResultType storeYourself(DataStream &stream) const
virtual int giveIPValue(FloatArray &answer, GaussPoint *gp, InternalStateType type, TimeStep *tStep)
Returns the integration point corresponding value in Reduced form.
LatticeDamage2dStatus(int n, Domain *d, GaussPoint *g)
Constructor.
double e0
Random material parameter stored in status, since each gp has a different value.
double & at(int i)
Coefficient access function.
ValueModeType
Type representing the mode of UnknownType or CharType, or similar types.
double computeDeltaDissipation(double omega, FloatArray &reducedStrain, GaussPoint *gp, TimeStep *tStep)
Compute increment of dissipation for post-processing reasons.
This class implements associated Material Status to LatticeDamage2d.
void clear()
Clears receiver (zero size).
#define _IFT_LatticeDamage2d_calpha
LatticeDamage2d(int n, Domain *d)
Constructor.
double normalStress
equilibrated normal stress
virtual int giveIPValue(FloatArray &answer, GaussPoint *gp, InternalStateType type, TimeStep *tStep)
Returns the integration point corresponding value in Reduced form.
virtual ~LatticeDamage2d()
Destructor.
double deltaDissipation
Increment of dissipation.
EngngModel * giveEngngModel()
Returns engineering model to which receiver is associated.
#define _IFT_LatticeDamage2d_localrandomtype
Dictionary propertyDictionary
Property dictionary.
double coh
Parameter setting ratio of shear and tensile strength.
void setBiotCoefficientInStatus(double variable)
Element * giveElement()
Returns corresponding element to receiver.
This class implements a base lattice material status.
void setTempEquivalentStrain(double newEquivStrain)
Sets the temp scalar measure of the largest strain level to given value.
virtual Interface * giveInterface(InterfaceType)
Interface requesting service.
double giveDeltaDissipation()
Returns the last equilibrated increment of dissipation.
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.
Class implementing an array of integers.
int & at(int i)
Coefficient access function.
virtual int read(int *data, int count)=0
Reads count integer values into array pointed by data.
MatResponseMode
Describes the character of characteristic material matrix.
virtual void computeEquivalentStrain(double &kappa, const FloatArray &strain, GaussPoint *gp, TimeStep *tStep)
virtual void setVariableInStatus(double variable)
double giveTempDamage()
Returns the temp. damage level.
#define _IFT_LatticeDamage2d_alphaTwo
double tempDissipation
Non-equilibrated dissipation..
bool isTheFirstStep()
Check if receiver is first step.
FloatArray reducedStrain
Reduced strain.
void _generateStatusVariables(GaussPoint *) const
Sets up (generates) the variables identified in randVariables array using generators given in randomV...
void letTempReducedStrainBe(FloatArray v)
Assign the temp value of plastic strain.
virtual int write(const int *data, int count)=0
Writes count integer values from array pointed by data.
void setTempNormalStress(double val)
Sets the temp normalStress.
virtual double give(int aProperty, GaussPoint *gp)
Returns the value of material property 'aProperty'.
void setE0(double val)
Set random e0.
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
double tempDamage
Non-equilibrated damage level of material.
#define _IFT_IsotropicLinearElasticMaterial_talpha
double tempEquivStrain
Non-equilibrated scalar measure of the strain.
double crackWidth
Crack width.
void setTempDissipation(double newDiss)
Sets the temp dissipation.
Element * giveElement(int n)
Service for accessing particular domain fe element.
virtual MaterialStatus * CreateStatus(GaussPoint *gp) const
Creates new copy of associated status and inserts it into given integration point.
void printOutputAt(FILE *file, TimeStep *tStep)
Prints the receiver state to given stream.
double ec
Parameter for the elliptic equivalent strain function.
virtual void computeStressIndependentStrainVector(FloatArray &answer, GaussPoint *gp, TimeStep *tStep, ValueModeType mode)
Computes reduced strain vector in given integration point, generated by internal processes in materia...
double le
Characteristic length.
void setTempCrackWidth(double val)
Sets the temp crack width.
#define _IFT_LatticeDamage2d_softeningType
#define _IFT_LatticeDamage2d_alphaOne
void setTempKappa(double newKappa)
Sets the temp scalar measure of the largest strain level to given value.
#define _IFT_LatticeDamage2d_ec
double e0OneMean
Mean effective strain at sigma1.
Abstract base class for all random materials.
contextIOResultType restoreYourself(DataStream &stream)
virtual double givePressure()
Returns the pressure.
FloatArray tempReducedStrain
Non-equilibrated reduced strain.
Implementation of general sequence (staggered) problem.
#define _IFT_LatticeDamage2d_bio
virtual Interface * giveInterface(InterfaceType)
Interface requesting service.
bool isEmpty() const
Returns true if receiver is empty.
double at(int i, int j) const
Coefficient access function.
virtual void initTempStatus()
Initializes the temporary internal variables, describing the current state according to previously re...
Abstract base class for all random constitutive model statuses.
void setOldNormalStress(double val)
Sets the old normalStress.
void setTempCrackFlag(int val)
Sets the temp_crack_flag.
double giveIntrinsicTime()
Returns intrinsic time, e.g. time in which constitutive model is evaluated.
double equivStrain
Scalar measure of the strain.
EngngModel * giveMasterEngngModel()
Returns the master engnmodel.
double giveDissipation()
Returns the last equilibrated dissipation.
virtual contextIOResultType restoreContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Restores the receiver state previously written in stream.
virtual void updateYourself(TimeStep *)
Update equilibrium history variables according to temp-variables.
#define _IFT_LatticeDamage2d_wfOne
#define _IFT_LatticeDamage2d_e0OneMean
int crack_flag
The crack_flag indicates if the gp is cracked: crack_flag = 0 gp is uncracked crack_flag = 1 gp is cr...
Abstract base class representing a material status information.
Pair * add(int aKey, double value)
Adds a new Pair with given keyword and value into receiver.
Class representing vector of real numbers.
double damage
Damage level of material.
int biotType
Parameter specifying how the biot coefficient changes with the crack opening.
Implementation of matrix containing floating point numbers.
#define _IFT_LatticeDamage2d_coefficientOfVariation
double oldNormalStress
old normal stress
IRResultType
Type defining the return values of InputRecord reading operations.
void letTempStressVectorBe(const FloatArray &v)
Assigns tempStressVector to given vector v.
IntegrationPointStatus * giveMaterialStatus()
Returns reference to associated material status (NULL if not defined).
double referenceTemperature
Reference temperature (temperature, when material has been built into structure). ...
double kappa
Scalar measure of the largest strain level ever reached in material.
double alphaOne
Ratio of shear and normal modulus.
virtual void computeDamageParam(double &omega, double kappa, const FloatArray &strain, GaussPoint *gp)
void resize(int rows, int cols)
Checks size of receiver towards requested bounds.
virtual void giveElasticStiffnessMatrix(FloatMatrix &answer, GaussPoint *gp, TimeStep *tStep)
double eNormal
Normal modulus.
virtual contextIOResultType restoreContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Restores the receiver state previously written in stream.
#define _IFT_LatticeDamage2d_coh
void zero()
Zeroes all coefficients of receiver.
double eShear
Shear modulus.
void times(double s)
Multiplies receiver with scalar.
#define _IFT_LatticeDamage2d_e0Mean
virtual int hasMaterialModeCapability(MaterialMode mode)
Tests if material supports material mode.
long ContextMode
Context mode (mask), defining the type of information written/read to/from context.
virtual void giveThermalDilatationVector(FloatArray &answer, GaussPoint *gp, TimeStep *tStep)
Returns a vector of coefficients of thermal dilatation in direction of each material principal (local...
Abstract base class for all "structural" constitutive models.
void zero()
Zeroes all coefficient of receiver.
virtual void initTempStatus()
Initializes the temporary internal variables, describing the current state according to previously re...
Domain * giveDomain() const
double localRandomType
Flag which chooses between no distribution (0) and Gaussian distribution (1)
InterfaceType
Enumerative type, used to identify interface type.
int softeningType
Parameter which determines the typ of the softeningFunction 1 = linear softening 2 = bilinear softeni...
double tempCrackWidth
Non-equilibrated crack width.
virtual double computeBiot(double omega, double kappa, double le)
virtual void giveRandomParameters(FloatArray ¶m)
double biot
Set biot coefficient.
REGISTER_Material(DummyMaterial)
double castingTime
Casting time.
#define _IFT_LatticeDamage2d_btype
This class implements the base of a special lattice element following the concepts orginally develope...
virtual MaterialStatus * giveStatus(GaussPoint *gp) const
Returns material status of receiver in given integration point.
double biotCoefficient
Parameter controlling the amount of fluid pressure added to the mechanical stress (Biot's coefficient...
int giveSize() const
Returns the size of receiver.
virtual void giveSecantStiffnessMatrix(FloatMatrix &answer, GaussPoint *gp, TimeStep *tStep)
virtual contextIOResultType saveContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Stores receiver state to output stream.
double cAlpha
coefficient used for modelling eigendisplacements
the oofem namespace is to define a context or scope in which all oofem names are defined.
double e0Mean
Mean effective strain at peak.
double dissipation
Dissipation.
double wf
Determines the softening -> corresponds to threshold of crack opening (not strain) ...
virtual void initTempStatus(GaussPoint *gp)
Initializes temporary variables stored in integration point status at the beginning of new time step...
double eTorsion
Torsion modulus.
#define _IFT_LatticeDamage2d_eNormal
virtual void giveStiffnessMatrix(FloatMatrix &answer, MatResponseMode mode, GaussPoint *gp, TimeStep *tStep)
Computes the stiffness matrix for giveRealStressVector of receiver in given integration point...
double giveDamage()
Returns the last equilibrated damage level.
Class representing integration point in finite element program.
#define OOFEM_WARNING(...)
IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
double alphaTwo
Ratio of torsion and normal modulus.
void setTempDeltaDissipation(double newDiss)
Sets the temp. increment dissipation.
Class representing solution step.
const FloatArray & giveReducedStrain() const
Gives the old equilibrated value of plastic strain.
int giveCrackFlag()
Returns the crack_flag.
#define _IFT_LatticeDamage2d_wf
double giveCrackWidth()
Gives the last equilibrated crack width.
virtual double give(int aProperty, GaussPoint *gp)
Returns the value of material property 'aProperty'.
void resize(int s)
Resizes receiver towards requested size.