36 #include "../sm/CrossSections/structuralcrosssection.h" 51 return mode == _3dMat ||
53 mode == _PlaneStress ||
55 mode == _PlaneStrain ||
57 mode == _PlateLayer ||
80 FloatArray workStress, *yieldStressGrad, workStress2, stressVector3d;
81 FloatArray mStrainIncrement3d, mStressElasticIncrement3d, PlasticStrainVector3d;
82 FloatArray dSigmaIncrement3d, *stressCorrection, *loadingStressGrad;
84 FloatArray plasticStrainIncrement3d, strainIncrement, reducedStrain, reducedStrainIncrement;
85 FloatArray statusFullStressVector, statusFullPlasticVector;
92 double f0, f1, f2, help, dLambda, r, r1, m;
116 workStress = statusFullStressVector;
117 workStress.
add(elasticStressIncrement);
120 & statusFullPlasticVector);
123 & statusFullPlasticVector);
125 PlasticStrainVector3d = statusFullPlasticVector;
133 r1 = -f0 / ( f1 - f0 );
135 & statusFullPlasticVector);
139 for (
int i = 1; i <= 6; i++ ) {
140 help += yieldStressGrad->
at(i) * elasticStressIncrement.
at(i);
143 delete yieldStressGrad;
145 workStress2 = elasticStressIncrement;
146 workStress2.
times(r1);
147 workStress2.
add(statusFullStressVector);
150 & statusFullPlasticVector);
152 if ( fabs(help) > 1.e-6 ) {
161 stressVector3d = elasticStressIncrement;
162 stressVector3d.
times(r);
163 stressVector3d.
add(statusFullStressVector);
166 mStrainIncrement3d = strainIncrement;
167 mStrainIncrement3d.
times( ( 1.0 - r ) / m );
168 mStressElasticIncrement3d = elasticStressIncrement;
169 mStressElasticIncrement3d.
times( ( 1.0 - r ) / m );
176 for (
int i = 1; i <= m; i++ ) {
185 & PlasticStrainVector3d,
186 & mStrainIncrement3d,
189 if ( dLambda < 0. ) {
193 dSigmaIncrement3d.
beProductOf(dp, mStrainIncrement3d);
195 dSigmaIncrement3d.
add(mStressElasticIncrement3d);
198 & PlasticStrainVector3d);
201 stressVector3d.
add(dSigmaIncrement3d);
204 stressCorrection = this->
206 & PlasticStrainVector3d);
209 stressVector3d.
add(* stressCorrection);
217 loadingStressGrad->
times(dLambda);
218 PlasticStrainVector3d.
add(* loadingStressGrad);
223 this->
updateTempYC(gp, & stressVector3d, & PlasticStrainVector3d);
224 this->
updateTempLC(gp, & stressVector3d, & PlasticStrainVector3d);
229 delete loadingStressGrad;
230 delete stressCorrection;
246 stressVector3d = statusFullStressVector;
247 stressVector3d.
add(elasticStressIncrement);
257 plasticStrainIncrement3d.
beDifferenceOf(PlasticStrainVector3d, statusFullPlasticVector);
292 OOFEM_ERROR(
"giveEffectiveMaterialStiffnessMatrix - unsupported material mode");
317 FloatArray statusFullStressVector, statusFullPlasticVector, plasticStrainVector;
334 if ( mode == SecantStiffness ) {
345 & statusFullPlasticVector,
374 if ( originalMode != _3dMat ) {
375 OOFEM_ERROR(
"Different stressStrain mode encountered");
387 if ( mode == ElasticStiffness ) {
410 if ( mode == ElasticStiffness ) {
432 if ( mode == ElasticStiffness ) {
452 if ( mode == ElasticStiffness ) {
476 if ( mode == ElasticStiffness ) {
499 if ( mode == ElasticStiffness ) {
519 if ( strainIncrement.
giveSize() == 0 ) {
525 answer.
beProductOf(materialMatrix, strainIncrement);
544 FloatMatrix de, *yeldStressGradMat, *loadingStressGradMat;
546 FloatArray *yeldStressGrad, *loadingStressGrad;
548 double denominator, nominator;
559 currentPlasticStrainVector);
561 yeldStressGradMat =
new FloatMatrix(*yeldStressGrad, 1);
564 currentPlasticStrainVector);
567 loadingStressGradMat =
new FloatMatrix(*yeldStressGrad);
570 delete loadingStressGrad;
573 delete yeldStressGradMat;
575 delete loadingStressGradMat;
578 for (
int i = 1; i <= 6; i++ ) {
579 denominator += yeldStressGrad->
at(i) * help.
at(i);
584 answer.
times( -( 1. / denominator ) );
586 if ( strainIncrement3d != NULL ) {
589 for (
int i = 1; i <= 6; i++ ) {
590 nominator += yeldStressGrad->
at(i) * help.
at(i);
593 lambda = nominator / denominator;
596 delete yeldStressGrad;
609 FloatArray *yeldStressGrad, *stressCorrection;
622 for (
int j = 1; j <= 6; j++ ) {
623 help += yeldStressGrad->
at(j) * yeldStressGrad->
at(j);
626 stressCorrection =
new FloatArray(*yeldStressGrad);
627 stressCorrection->
times(-f3 / help);
630 delete yeldStressGrad;
631 return stressCorrection;
639 if ( result !=
IRRT_OK )
return result;
679 if ( type == IST_PlasticStrainTensor ) {
684 }
else if ( type == IST_PrincipalPlasticStrainTensor ) {
769 fprintf(file,
"status { yield_flag %d}\n",
yield_flag);
static int giveSizeOfVoigtSymVector(MaterialMode mmode)
Returns the size of symmetric part of a reduced stress/strain vector according to given mode...
CrossSection * giveCrossSection()
virtual void givePlaneStressStiffMtrx(FloatMatrix &answer, MatResponseMode mode, GaussPoint *gp, TimeStep *tStep)
Method for computing plane stress stiffness matrix of receiver.
virtual FloatArray * imposeStressConstrainsOnGradient(GaussPoint *gp, FloatArray *gradientStressVector3d)
Returns modified gradient of stress vector, which is used to bring stresses back to yield surface...
virtual FloatArray * GiveYCStressGradient(GaussPoint *gp, FloatArray *, FloatArray *)
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.
static void computePrincipalValues(FloatArray &answer, const FloatArray &s, stressStrainPrincMode mode)
Common functions for convenience.
MaterialMode giveMaterialMode()
Returns corresponding material mode of receiver.
const FloatArray & givePlasticStrainVector() const
void letTempStrainVectorBe(const FloatArray &v)
Assigns tempStrainVector to given vector v.
virtual MaterialStatus * giveStatus(GaussPoint *gp) const
Returns material status of receiver in given integration point.
virtual void updateTempLC(GaussPoint *gp, FloatArray *, FloatArray *)
GaussPoint * gp
Associated integration point.
virtual void updateYourself(TimeStep *tStep)
Update equilibrium history variables according to temp-variables.
For computing principal strains from engineering strains.
void letPlasticStrainIncrementVectorBe(FloatArray v)
virtual contextIOResultType saveContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Stores receiver state to output stream.
double & at(int aKey)
Returns the value of the pair which key is aKey.
virtual void initTempStatus()
Initializes the temporary internal variables, describing the current state according to previously re...
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.
virtual FloatArray * imposeStrainConstrainsOnGradient(GaussPoint *gp, FloatArray *gradientStressVector3d)
Returns modified gradient of strain vector, which is used to compute plastic strain increment...
double & at(int i)
Coefficient access function.
virtual void updateTempYC(GaussPoint *gp, FloatArray *, FloatArray *)
void computeTrialStressIncrement(FloatArray &answer, GaussPoint *gp, const FloatArray &strainIncrement, TimeStep *tStep)
virtual void updateIfFailure(GaussPoint *gp, FloatArray *stressVector3d, FloatArray *PlasticStrainVector3d)
This class implements a structural material status information.
virtual void give3dMaterialStiffnessMatrix(FloatMatrix &answer, MatResponseMode mode, GaussPoint *gp, TimeStep *tStep)
Computes full 3d material stiffness matrix at given integration point, time, respecting load history ...
void clear()
Clears receiver (zero size).
This class implements associated Material Status to PerfectlyPlasticMaterial.
bool includes(int aKey)
Checks if dictionary includes given key.
static void giveFullSymMatrixForm(FloatMatrix &answer, const FloatMatrix &red, MaterialMode matMode)
Converts the full unsymmetric Voigt matrix (4th order tensor) to reduced form.
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
Dictionary propertyDictionary
Property dictionary.
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
Element * giveElement()
Returns corresponding element to receiver.
virtual void printOutputAt(FILE *file, TimeStep *tStep)
Print receiver's output to given stream.
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 contextIOResultType restoreContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Restores the receiver state previously written in stream.
virtual void printOutputAt(FILE *file, TimeStep *tStep)
Print receiver's output to given 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.
FloatArray * GiveStressCorrectionBackToYieldSurface(GaussPoint *gp, FloatArray *stressVector3d, FloatArray *plasticVector3d)
virtual void give1dStressStiffMtrx(FloatMatrix &answer, MatResponseMode mode, GaussPoint *gp, TimeStep *tStep)
Method for computing 1d stiffness matrix of receiver.
FloatArray plasticStrainVector
void beDifferenceOf(const FloatArray &a, const FloatArray &b)
Sets receiver to be a - b.
static void giveFullSymVectorForm(FloatArray &answer, const FloatArray &vec, MaterialMode matMode)
Converts the reduced unsymmetric Voigt vector (2nd order tensor) to full form.
int setTempYieldFlag(int i)
virtual int hasMaterialModeCapability(MaterialMode mode)
Tests if material supports material mode.
LinearElasticMaterial * linearElasticMaterial
virtual int write(const int *data, int count)=0
Writes count integer values from array pointed by data.
virtual double give(int aProperty, GaussPoint *gp)
Returns the value of material property 'aProperty'.
virtual void giveStiffnessMatrix(FloatMatrix &answer, MatResponseMode mode, GaussPoint *gp, TimeStep *tStep)
Computes the stiffness matrix for giveRealStressVector of receiver in given integration point...
static void giveReducedSymVectorForm(FloatArray &answer, const FloatArray &vec, MaterialMode matMode)
Converts the full unsymmetric Voigt vector (2nd order tensor) to reduced form.
virtual double give(int aProperty, GaussPoint *gp)
Returns the value of material property 'aProperty'.
virtual MaterialStatus * CreateStatus(GaussPoint *gp) const
Creates new copy of associated status and inserts it into given integration point.
virtual void give2dBeamLayerStiffMtrx(FloatMatrix &answer, MatResponseMode mode, GaussPoint *gp, TimeStep *tStep)
Method for computing 2d beam layer stiffness matrix of receiver.
virtual void give3dMaterialStiffnessMatrix(FloatMatrix &answer, MatResponseMode mode, GaussPoint *gp, TimeStep *tStep)
Computes full 3d material stiffness matrix at given integration point, time, respecting load history ...
void times(double f)
Multiplies receiver by factor f.
virtual int giveIPValue(FloatArray &answer, GaussPoint *gp, InternalStateType type, TimeStep *tStep)
Returns the integration point corresponding value in Reduced form.
contextIOResultType restoreYourself(DataStream &stream)
LinearElasticMaterial * giveLinearElasticMaterial()
void beProductOf(const FloatMatrix &aMatrix, const FloatArray &anArray)
Receiver becomes the result of the product of aMatrix and anArray.
virtual FloatArray * GiveLCStressGradient(GaussPoint *gp, FloatArray *, FloatArray *)
virtual void givePlaneStrainStiffMtrx(FloatMatrix &answer, MatResponseMode mode, GaussPoint *gp, TimeStep *tStep)
Method for computing plane strain stiffness matrix of receiver.
virtual contextIOResultType restoreContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Restores the receiver state previously written in stream.
Abstract base class representing a material status information.
PerfectlyPlasticMaterialStatus(int n, Domain *d, GaussPoint *g)
Class representing vector of real numbers.
virtual void giveRealStressVector(FloatArray &answer, GaussPoint *gp, const FloatArray &reducedStrain, TimeStep *tStep)
Computes the real stress vector for given total strain and integration point.
Implementation of matrix containing floating point numbers.
IRResultType
Type defining the return values of InputRecord reading operations.
FloatArray plasticStrainIncrementVector
void letTempStressVectorBe(const FloatArray &v)
Assigns tempStressVector to given vector v.
const FloatArray & giveStressVector() const
Returns the const pointer to receiver's stress vector.
virtual void giveEffectiveMaterialStiffnessMatrix(FloatMatrix &answer, MatResponseMode mode, GaussPoint *gp, TimeStep *tStep)
virtual int hasMaterialModeCapability(MaterialMode mode)
Tests if material supports material mode.
void add(const FloatMatrix &a)
Adds matrix to the receiver.
virtual void giveMaterialStiffnessMatrix(FloatMatrix &answer, MatResponseMode mode, GaussPoint *gp, TimeStep *tStep)
void zero()
Zeroes all coefficients of receiver.
void computePlasticStiffnessAt(FloatMatrix &answer, GaussPoint *gp, FloatArray *currentStressVector, FloatArray *currentPlasticStrainVector, FloatArray *strainIncrement3d, TimeStep *tStep, double &lambda)
void times(double s)
Multiplies receiver with scalar.
virtual void givePlateLayerStiffMtrx(FloatMatrix &answer, MatResponseMode mode, GaussPoint *gp, TimeStep *tStep)
Method for computing 2d plate layer stiffness matrix of receiver.
long ContextMode
Context mode (mask), defining the type of information written/read to/from context.
Abstract base class for all "structural" constitutive models.
virtual void initTempStatus()
Initializes the temporary internal variables, describing the current state according to previously re...
virtual ~PerfectlyPlasticMaterialStatus()
Domain * giveDomain() const
virtual double computeYCValueAt(GaussPoint *gp, FloatArray *, FloatArray *)
void beProductOf(const FloatMatrix &a, const FloatMatrix &b)
Assigns to the receiver product of .
int giveSize() const
Returns the size of receiver.
Abstract base class for all structural cross section models.
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.
virtual void initTempStatus(GaussPoint *gp)
Initializes temporary variables stored in integration point status at the beginning of new time step...
void negated()
Switches the sign of every coefficient of receiver.
const FloatArray & giveStrainVector() const
Returns the const pointer to receiver's strain vector.
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
Class representing integration point in finite element program.
Class representing solution step.
void add(const FloatArray &src)
Adds array src to receiver.
static void giveReducedSymMatrixForm(FloatMatrix &answer, const FloatMatrix &full, MaterialMode matMode)
Converts the full unsymmetric Voigt matrix (4th order tensor) to reduced form.
void resize(int s)
Resizes receiver towards requested size.