64 double f, equivStrain, tempKappa = 0.0, omega = 0.0;
78 tempKappa = equivStrain;
85 if ( equivStrain >= 0.0 ) {
86 de.
times(1.0 - omega);
108 answer.
at(1, 1) =
kn;
109 answer.
at(2, 2) =
ks;
110 answer.
at(3, 3) =
ks;
112 if ( rMode == ElasticStiffness ) {
116 if ( rMode == SecantStiffness ) {
123 answer.
times(1.0 - om);
138 answer.
times(1.0 - om);
142 double dom = -( -
e0 / un / un * exp( -(
ft / gf ) * ( un -
e0 ) ) +
e0 / un * exp( -(
ft / gf ) * ( un -
e0 ) ) * ( -(
ft / gf ) ) );
144 answer.
at(1, 1) -= se.
at(1) * dom;
145 answer.
at(2, 1) -= se.
at(2) * dom;
157 if ( type == IST_DamageTensor ) {
162 }
else if ( type == IST_DamageTensorTemp ) {
167 }
else if ( type == IST_PrincipalDamageTensor ) {
171 }
else if ( type == IST_PrincipalDamageTempTensor ) {
175 }
else if ( type == IST_MaxEquivalentStrainLevel ) {
190 int nbrOfLinesToRead;
206 is.open(
tablename.c_str(), std :: ifstream :: in);
207 if ( !is.is_open() ) {
212 if ( is >> nbrOfLinesToRead ) {
213 printf(
"NumberofLinestoRead: %d\n", nbrOfLinesToRead);
215 OOFEM_ERROR(
"Error reading table file, first line should be " 216 "an integer stating how many strain damage pairs that exist in the file.");
225 for (
int i = 0; i < nbrOfLinesToRead; i++ ) {
227 OOFEM_ERROR(
"Error reading table file at line %d, expected a " 228 "strain damage pair.", i + 2);
232 OOFEM_ERROR(
"Error reading table file at line %d, strain " 233 "and damage must be given in an increasing order and be positive.", i + 2);
267 if ( kappa > this->
e0 ) {
278 printf(
"e0 %lf\n",
e0);
280 printf(
"pointer: %d\n", index);
281 printf(
"value: %lf\n", * index);
288 double x0 =
strains(index - 1);
290 double y0 =
damages(index - 1);
294 omega = y0 + ( y1 - y0 ) * ( kappa - x0 ) / ( x1 - x0 );
317 fprintf(file,
"status { ");
318 if ( this->
damage > 0.0 ) {
319 fprintf(file,
"kappa %f, damage %f ", this->
kappa, this->
damage);
322 fprintf(file,
"}\n");
virtual int giveIPValue(FloatArray &answer, GaussPoint *gp, InternalStateType type, TimeStep *tStep)
Returns the integration point corresponding value in Reduced form.
InternalStateType
Type representing the physical meaning of element or constitutive model internal variable.
virtual contextIOResultType saveContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Stores receiver state to output stream.
virtual void giveInputRecord(DynamicInputRecord &input)
Setups the input record string of receiver.
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
virtual MaterialStatus * giveStatus(GaussPoint *gp) const
Returns material status of receiver in given integration point.
double maxOmega
Maximum limit on omega. The purpose is elimination of a too compliant material which may cause conver...
double kappa
Scalar measure of the largest equivalent displacement ever reached in material.
#define _IFT_IsoInterfaceDamageMaterial_2_kn
The purpose of DataStream abstract class is to allow to store/restore context to different streams...
double & at(int i)
Coefficient access function.
int max(int i, int j)
Returns bigger value form two given decimals.
double kn
Elastic properties (normal moduli).
double ft
Tension strength.
virtual ~IsoInterfaceDamageMaterialStatus_2()
Destructor.
virtual void giveInputRecord(DynamicInputRecord &input)
Setups the input record string of receiver.
double macbra(double x)
Returns the positive part of given float.
virtual contextIOResultType restoreContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Restores the receiver state previously written in stream.
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 contextIOResultType restoreContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Restores the receiver state previously written in stream.
virtual ~IsoInterfaceDamageMaterial_2()
Destructor.
virtual void updateYourself(TimeStep *tStep)
Update equilibrium history variables according to temp-variables.
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
double damage
Damage level of material.
std::string tablename
Name of table file.
virtual int giveIPValue(FloatArray &answer, GaussPoint *gp, InternalStateType type, TimeStep *tStep)
Returns the integration point corresponding value in Reduced form.
virtual int write(const int *data, int count)=0
Writes count integer values from array pointed by data.
double giveTempDamage()
Returns the temp. damage level.
This class implements associated Material Status to IsoInterfaceDamageMaterial_2. ...
void letTempJumpBe(FloatArray v)
Assigns tempJump to given vector v.
void times(double f)
Multiplies receiver by factor f.
void setTempDamage(double newDamage)
Sets the temp damage level to given value.
void beProductOf(const FloatMatrix &aMatrix, const FloatArray &anArray)
Receiver becomes the result of the product of aMatrix and anArray.
This class implements a structural interface material status information.
double giveDamage()
Returns the last equilibrated damage level.
double giveTempKappa()
Returns the temp. scalar measure of the largest strain level.
double at(int i, int j) const
Coefficient access function.
void setTempKappa(double newKappa)
Sets the temp scalar measure of the largest strain level to given value.
IsoInterfaceDamageMaterialStatus_2(int n, Domain *d, GaussPoint *g)
Constructor.
virtual void updateYourself(TimeStep *tStep)
Update equilibrium history variables according to temp-variables.
virtual void initTempStatus()
Initializes the temporary internal variables, describing the current state according to previously re...
double giveKappa()
Returns the last equilibrated scalar measure of the largest strain level.
virtual void printOutputAt(FILE *file, TimeStep *tStep)
Print receiver's output to given stream.
FloatArray damages
Damages read from the second column in the table file.
Class representing vector of real numbers.
Implementation of matrix containing floating point numbers.
virtual void give3dStiffnessMatrix_Eng(FloatMatrix &answer, MatResponseMode rMode, GaussPoint *gp, TimeStep *tStep)
IRResultType
Type defining the return values of InputRecord reading operations.
virtual void computeEquivalentStrain(double &kappa, const FloatArray &strain, GaussPoint *gp, TimeStep *tStep)
Computes the equivalent strain measure from given strain vector (full form).
void resize(int rows, int cols)
Checks size of receiver towards requested bounds.
void zero()
Zeroes all coefficients of receiver.
#define _IFT_IsoInterfaceDamageMaterial_2_maxOmega
virtual contextIOResultType saveContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Stores receiver state to output stream.
const double * givePointer() const
Gives the pointer to the raw data, breaking encapsulation.
long ContextMode
Context mode (mask), defining the type of information written/read to/from context.
#define _IFT_IsoInterfaceDamageMaterial_2_ks
virtual void giveEngTraction_3d(FloatArray &answer, GaussPoint *gp, const FloatArray &jump, TimeStep *tStep)
virtual void printOutputAt(FILE *file, TimeStep *tStep)
Print receiver's output to given stream.
void zero()
Zeroes all coefficient of receiver.
int min(int i, int j)
Returns smaller value from two given decimals.
IsoInterfaceDamageMaterial_2(int n, Domain *d)
Constructor.
REGISTER_Material(DummyMaterial)
void letTempTractionBe(FloatArray v)
Assigns tempTraction to given vector v.
double tempDamage
Non-equilibrated damage level of material.
#define _IFT_IsoInterfaceDamageMaterial_2_tablename
int giveSize() const
Returns the size of receiver.
Abstract base class for all "structural" interface models.
#define _IFT_IsoInterfaceDamageMaterial_2_ft
the oofem namespace is to define a context or scope in which all oofem names are defined.
double e0
Limit elastic deformation.
const FloatArray & giveTempJump() const
Returns the const pointer to receiver's temporary jump.
virtual void initTempStatus()
Initializes the temporary internal variables, describing the current state according to previously re...
double tempKappa
Non-equilibrated scalar measure of the largest equivalent displacement.
Class representing integration point in finite element program.
Class representing solution step.
void add(const FloatArray &src)
Adds array src to receiver.
FloatArray strains
Strains read from the first column in the table file.
virtual void computeDamageParam(double &omega, double kappa, const FloatArray &strain, GaussPoint *gp)
computes the value of damage parameter omega, based on given value of equivalent strain.
void resize(int s)
Resizes receiver towards requested size.