47 #include "../sm/Elements/structuralelement.h" 76 if ( result !=
IRRT_OK )
return result;
79 if ( result !=
IRRT_OK )
return result;
123 answer.
times(1 - omega);
127 double E = lmat->
give(
'E', gp), nu = lmat->
give(
'n', gp);
130 strain[0] = totalStrain[0];
157 answer.
times(1 - omega);
172 double kappa, dKappa, yieldValue, mi;
202 double leftCauchyGreenVol;
213 double sigmaY = this->
give(
's', gp, tStep) +
H * kappa;
215 yieldValue = trialS - sqrt(2. / 3.) * sigmaY;
222 mi = leftCauchyGreenVol *
G;
223 if ( yieldValue > 0 ) {
227 dKappa = ( yieldValue / ( 2 * mi ) ) / ( 1 +
H / ( 3 * mi ) );
229 n.
times(2 * mi * dKappa / trialS);
232 kappa += sqrt(2. / 3.) * dKappa;
237 trialLeftCauchyGreen.
times(1.0 / G);
238 trialLeftCauchyGreen.
at(1, 1) += leftCauchyGreenVol;
239 trialLeftCauchyGreen.
at(2, 2) += leftCauchyGreenVol;
240 trialLeftCauchyGreen.
at(2, 2) += leftCauchyGreenVol;
241 trialLeftCauchyGreen.
times(J * J);
247 kirchhoffStress.
at(1, 1) += 1. / 2. *
K * ( J * J - 1 );
248 kirchhoffStress.
at(2, 2) += 1. / 2. *
K * ( J * J - 1 );
249 kirchhoffStress.
at(3, 3) += 1. / 2. *
K * ( J * J - 1 );
258 S.beProductTOf(help, iF);
287 Ep.
times( pow(J, -2. / 3.) );
305 if ( totalStrain.
giveSize() == 1 ) {
307 double E = lmat->
give(
'E', gp);
310 fullStress.
at(1) = E * ( totalStrain.
at(1) - plStrain.
at(1) );
311 double trialS = fabs(fullStress.
at(1));
313 double yieldValue = trialS - (this->
give(
's', gp, tStep) +
H * kappa);
315 if ( yieldValue > 0 ) {
316 double dKappa = yieldValue / (
H +
E );
318 plStrain.
at(1) += dKappa *
signum( fullStress.
at(1) );
319 plStrain.
at(2) -= 0.5 * dKappa *
signum( fullStress.
at(1) );
320 plStrain.
at(3) -= 0.5 * dKappa *
signum( fullStress.
at(1) );
321 fullStress.
at(1) -= dKappa * E *
signum( fullStress.
at(1) );
333 double trialStressVol = 3 *
K * elStrainVol;
341 double yieldValue = sqrt(3./2.) * trialS - (this->
give(
's', gp, tStep) +
H * kappa);
342 if ( yieldValue > 0. ) {
344 double dKappa = yieldValue / (
H + 3. *
G );
350 plStrain.
add(sqrt(3. / 2.) * dKappa / trialS, dPlStrain);
352 trialStressDev.
times(1. - sqrt(6.) *
G * dKappa / trialS);
371 if ( tempKappa > 0. ) {
381 if ( tempKappa >= 0. ) {
393 double tempKappa, dam;
398 if ( dam > tempDam ) {
431 if ( mode != TangentStiffness ) {
439 double dKappa = tempKappa - kappa;
441 if ( dKappa <= 0.0 ) {
448 double sigmaY = this->
give(
's', gp, tStep) +
H * kappa;
458 double factor = -2. * sqrt(6.) *
G *
G / trialS;
459 double factor1 = factor * sigmaY / ( (
H + 3. *
G ) * trialS * trialS );
460 answer.
add(factor1, stiffnessCorrection);
464 double factor2 = factor * dKappa;
465 answer.
add(factor2, stiffnessCorrection);
470 answer.
times(1. - omega);
473 double scalar = -omegaPrime *sqrt(6.) *
G / ( 3. *
G +
H ) / trialS;
475 stiffnessCorrection.
times(scalar);
476 answer.
add(stiffnessCorrection);
491 double E = answer.
at(1, 1);
492 if ( mode != TangentStiffness ) {
497 if ( tempKappa <= kappa ) {
498 answer.
times(1 - omega);
505 double stress = stressVector.
at(1);
517 I.
at(1, 1) = I.
at(2, 2) = I.
at(3, 3) = 1;
518 I.
at(4, 4) = I.
at(5, 5) = I.
at(6, 6) = 0.5;
520 delta.
at(1) = delta.
at(2) = delta.
at(3) = 1;
541 help.
times(-1. / 3.);
544 C1.
times(2 * trialStressVol);
551 C1.
add(-2. / 3. * trialS, help);
554 C.
add(-
K * ( J * J - 1 ), I);
564 T.
at(1, 1) = invF.
at(1, 1) * invF.
at(1, 1);
565 T.
at(1, 2) = invF.
at(1, 2) * invF.
at(1, 2);
566 T.
at(1, 3) = invF.
at(1, 3) * invF.
at(1, 3);
567 T.
at(1, 4) = 2. * invF.
at(1, 2) * invF.
at(1, 3);
568 T.
at(1, 5) = 2. * invF.
at(1, 1) * invF.
at(1, 3);
569 T.
at(1, 6) = 2. * invF.
at(1, 1) * invF.
at(1, 2);
571 T.
at(2, 1) = invF.
at(2, 1) * invF.
at(2, 1);
572 T.
at(2, 2) = invF.
at(2, 2) * invF.
at(2, 2);
573 T.
at(2, 3) = invF.
at(2, 3) * invF.
at(2, 3);
574 T.
at(2, 4) = 2. * invF.
at(2, 2) * invF.
at(2, 3);
575 T.
at(2, 5) = 2. * invF.
at(2, 1) * invF.
at(2, 3);
576 T.
at(2, 6) = 2. * invF.
at(2, 1) * invF.
at(2, 2);
578 T.
at(3, 1) = invF.
at(3, 1) * invF.
at(3, 1);
579 T.
at(3, 2) = invF.
at(3, 2) * invF.
at(3, 2);
580 T.
at(3, 3) = invF.
at(3, 3) * invF.
at(3, 3);
581 T.
at(3, 4) = 2. * invF.
at(3, 2) * invF.
at(3, 3);
582 T.
at(3, 5) = 2. * invF.
at(3, 1) * invF.
at(3, 3);
583 T.
at(3, 6) = 2. * invF.
at(3, 1) * invF.
at(3, 2);
585 T.
at(4, 1) = invF.
at(2, 1) * invF.
at(3, 1);
586 T.
at(4, 2) = invF.
at(2, 2) * invF.
at(3, 2);
587 T.
at(4, 3) = invF.
at(2, 3) * invF.
at(3, 3);
588 T.
at(4, 4) = ( invF.
at(2, 2) * invF.
at(3, 3) + invF.
at(2, 3) * invF.
at(3, 2) );
589 T.
at(4, 5) = ( invF.
at(2, 1) * invF.
at(3, 3) + invF.
at(2, 3) * invF.
at(3, 1) );
590 T.
at(4, 6) = ( invF.
at(2, 1) * invF.
at(3, 2) + invF.
at(2, 2) * invF.
at(3, 1) );
592 T.
at(5, 1) = invF.
at(1, 1) * invF.
at(3, 1);
593 T.
at(5, 2) = invF.
at(1, 2) * invF.
at(3, 2);
594 T.
at(5, 3) = invF.
at(1, 3) * invF.
at(3, 3);
595 T.
at(5, 4) = ( invF.
at(1, 2) * invF.
at(3, 3) + invF.
at(1, 3) * invF.
at(3, 2) );
596 T.
at(5, 5) = ( invF.
at(1, 1) * invF.
at(3, 3) + invF.
at(1, 3) * invF.
at(3, 1) );
597 T.
at(5, 6) = ( invF.
at(1, 1) * invF.
at(3, 2) + invF.
at(1, 2) * invF.
at(3, 1) );
599 T.
at(6, 1) = invF.
at(1, 1) * invF.
at(2, 1);
600 T.
at(6, 2) = invF.
at(1, 2) * invF.
at(2, 2);
601 T.
at(6, 3) = invF.
at(1, 3) * invF.
at(2, 3);
602 T.
at(6, 4) = ( invF.
at(1, 2) * invF.
at(2, 3) + invF.
at(1, 3) * invF.
at(2, 2) );
603 T.
at(6, 5) = ( invF.
at(1, 1) * invF.
at(2, 3) + invF.
at(1, 3) * invF.
at(2, 1) );
604 T.
at(6, 6) = ( invF.
at(1, 1) * invF.
at(2, 2) + invF.
at(1, 2) * invF.
at(2, 1) );
607 if ( mode != TangentStiffness ) {
618 if ( dKappa <= 0.0 ) {
629 double beta1, beta3, beta4;
633 beta1 = 2 * trialStressVol * dKappa / trialS;
636 if ( trialStressVol == 0 ) {
640 double beta0 = 1 +
H / 3 / trialStressVol;
641 double beta2 = ( 1 - 1 / beta0 ) * 2. / 3. * trialS * dKappa / trialStressVol;
642 beta3 = 1 / beta0 - beta1 + beta2;
643 beta4 = ( 1 / beta0 - beta1 ) * trialS / trialStressVol;
648 N.
times(-2 * trialStressVol * beta3);
652 mN.
at(1, 1) = n.
at(1);
653 mN.
at(1, 2) = n.
at(6);
654 mN.
at(1, 3) = n.
at(5);
655 mN.
at(2, 1) = n.
at(6);
656 mN.
at(2, 2) = n.
at(2);
657 mN.
at(2, 3) = n.
at(4);
658 mN.
at(3, 1) = n.
at(5);
659 mN.
at(3, 2) = n.
at(4);
660 mN.
at(3, 3) = n.
at(3);
664 double volN2 = 1. / 3. * ( mN2.
at(1, 1) + mN2.
at(2, 2) + mN2.
at(3, 3) );
666 devN2.
at(1) = mN2.
at(1, 1) - volN2;
667 devN2.
at(2) = mN2.
at(2, 2) - volN2;
669 devN2.
at(3) = mN2.
at(3, 3) - volN2;
670 devN2.
at(4) = mN2.
at(2, 3);
671 devN2.
at(5) = mN2.
at(1, 3);
672 devN2.
at(6) = mN2.
at(1, 2);
678 nonSymPart.
times(-2 * trialStressVol * beta4);
695 if ( type == IST_PlasticStrainTensor ) {
698 }
else if ( type == IST_MaxEquivalentStrainLevel ) {
702 }
else if ( ( type == IST_DamageScalar ) || ( type == IST_DamageTensor ) ) {
706 }
else if ( type == IST_YieldStrength ) {
708 answer.
at(1) = this->
give(
's', gp, tStep);
739 fprintf(file,
" plastic ");
741 fprintf(file,
"%.4e ", val);
745 fprintf(file,
"status { ");
769 fprintf(file,
", kappa ");
770 fprintf(file,
" %.4e",
kappa);
772 fprintf(file,
"}\n");
796 fprintf(file,
"}\n");
833 if ( aProperty ==
's' ) {
834 return sig0.eval( { {
"te", giveTemperature(gp, tStep) }, {
"t", tStep->
giveIntrinsicTime() } }, this->
giveDomain(),
gp, giveTemperature(gp, tStep) );
845 if ( ( tf = fm->
giveField(FT_Temperature) ) ) {
849 if ( ( err = tf->evaluateAt(answer, gcoords, VM_Total, tStep) ) ) {
double giveDeterminant() const
Returns the trace (sum of diagonal components) of the receiver.
void letTempLeftCauchyGreenBe(const FloatMatrix &values)
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.
void subtract(const FloatArray &src)
Subtracts array src to receiver.
FloatArray plasticStrain
Plastic strain (initial).
void letTempStrainVectorBe(const FloatArray &v)
Assigns tempStrainVector to given vector v.
void bePinvID()
Sets receiver to the inverse of scaling matrix P multiplied by the deviatoric projector ID...
virtual void give1dStressStiffMtrx(FloatMatrix &answer, MatResponseMode mmode, GaussPoint *gp, TimeStep *tStep)
Method for computing 1d stiffness matrix of receiver.
virtual MaterialStatus * giveStatus(GaussPoint *gp) const
Returns material status of receiver in given integration point.
GaussPoint * gp
Associated integration point.
std::shared_ptr< Field > FieldPtr
static void applyDeviatoricElasticCompliance(FloatArray &strain, const FloatArray &stress, double EModulus, double nu)
void letTempFVectorBe(const FloatArray &v)
Assigns tempFVector to given vector v.
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 ...
FloatArray tempPlasticStrain
Plastic strain (final).
#define _IFT_MisesMat_sig0
Domain * domain
Link to domain object, useful for communicating with other FEM components.
static void computeDeviatoricVolumetricSum(FloatArray &s, const FloatArray &dev, double mean)
double H
Hardening modulus.
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.
double & at(int i)
Coefficient access function.
MisesMat(int n, Domain *d)
virtual void giveFirstPKStressVector_3d(FloatArray &answer, GaussPoint *gp, const FloatArray &vF, TimeStep *tStep)
Default implementation relies on giveRealStressVector for second Piola-Kirchoff stress.
This class implements a structural material status information.
void clear()
Clears receiver (zero size).
void letTempEffectiveStressBe(const FloatArray &values)
double giveCumulativePlasticStrain()
FloatArray stressVector
Equilibrated stress vector in reduced form.
double computeDamage(GaussPoint *gp, TimeStep *tStep)
double giveTempCumulativePlasticStrain()
EngngModel * giveEngngModel()
Returns engineering model to which receiver is associated.
void letTrialStressDevBe(const FloatArray &values)
void beVectorForm(const FloatMatrix &aMatrix)
Reciever will be a vector with 9 components formed from a 3x3 matrix.
const FloatMatrix & giveTempLeftCauchyGreen()
const FloatArray & givePlasDef()
virtual contextIOResultType saveContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Stores receiver state to output stream.
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
Element * giveElement()
Returns corresponding element to receiver.
void give_dPdF_from(const FloatMatrix &dSdE, FloatMatrix &answer, GaussPoint *gp)
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...
FieldManager * giveFieldManager()
virtual void printOutputAt(FILE *file, TimeStep *tStep)
Print receiver's output to given stream.
double K
Elastic bulk modulus.
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.
double computeDamageParam(double tempKappa)
This class is a abstract base class for all linear elastic material models in a finite element proble...
double giveTrialStressVol()
FloatArray trialStressD
Deviatoric trial stress - needed for tangent stiffness.
void beDifferenceOf(const FloatArray &a, const FloatArray &b)
Sets receiver to be a - b.
void setTempCumulativePlasticStrain(double value)
void beMatrixForm(const FloatArray &aArray)
virtual void updateYourself(TimeStep *tStep)
Update equilibrium history variables according to temp-variables.
void performPlasticityReturn(GaussPoint *gp, const FloatArray &totalStrain, TimeStep *tStep)
virtual int write(const int *data, int count)=0
Writes count integer values from array pointed by data.
FloatMatrix tempLeftCauchyGreen
Left Cauchy-Green deformation gradient (final).
virtual double give(int aProperty, GaussPoint *gp)
Returns the value of material property 'aProperty'.
Abstract base class for all "structural" finite elements.
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
virtual void printOutputAt(FILE *file, TimeStep *tStep)
Print receiver's output to given stream.
const FloatArray & giveTrialStressDev()
This class implements an isotropic linear elastic material in a finite element problem.
EngngModelContext * giveContext()
Context requesting service.
virtual ~MisesMatStatus()
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 void computeCumPlastStrain(double &kappa, GaussPoint *gp, TimeStep *tStep)
LinearElasticMaterial * linearElasticMaterial
Reference to the basic elastic material.
contextIOResultType restoreYourself(DataStream &stream)
static double computeStressNorm(const FloatArray &stress)
#define _IFT_MisesMat_omega_crit
virtual int giveIPValue(FloatArray &answer, GaussPoint *gp, InternalStateType type, TimeStep *tStep)
Returns the integration point corresponding value in Reduced form.
double at(int i, int j) const
Coefficient access function.
double giveIntrinsicTime()
Returns intrinsic time, e.g. time in which constitutive model is evaluated.
double computeDamageParamPrime(double tempKappa)
virtual void give3dLSMaterialStiffnessMatrix(FloatMatrix &answer, MatResponseMode mode, GaussPoint *gp, TimeStep *tStep)
virtual contextIOResultType restoreContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Restores the receiver state previously written in stream.
FieldPtr giveField(FieldType key)
Returns the previously registered field under given key; NULL otherwise.
MisesMatStatus(int n, Domain *d, GaussPoint *g)
void subtract(const FloatMatrix &a)
Subtracts matrix from the receiver.
void setTempDamage(double value)
Abstract base class representing a material status information.
Class representing vector of real numbers.
double kappa
Cumulative plastic strain (initial).
const FloatArray & getTempPlasticStrain() const
FloatArray strainVector
Equilibrated strain vector in reduced form.
Implementation of matrix containing floating point numbers.
virtual double give(int aProperty, GaussPoint *gp, TimeStep *tStep)
IRResultType
Type defining the return values of InputRecord reading operations.
double cbrt(double x)
Returns the cubic root of x.
void letTempStressVectorBe(const FloatArray &v)
Assigns tempStressVector to given vector v.
const FloatArray & giveFVector() const
Returns the const pointer to receiver's deformation gradient vector.
static void applyDeviatoricElasticStiffness(FloatArray &stress, const FloatArray &strain, double EModulus, double nu)
void resize(int rows, int cols)
Checks size of receiver towards requested bounds.
void setTrialStressVol(double value)
const FloatArray & giveTempEffectiveStress()
void add(const FloatMatrix &a)
Adds matrix to the receiver.
virtual void give3dMaterialStiffnessMatrix_dPdF(FloatMatrix &answer, MatResponseMode mode, GaussPoint *gp, TimeStep *tStep)
virtual MaterialStatus * CreateStatus(GaussPoint *gp) const
Creates new copy of associated status and inserts it into given integration point.
virtual void giveRealStressVector_1d(FloatArray &answer, GaussPoint *gp, const FloatArray &reducedE, TimeStep *tStep)
Default implementation relies on giveRealStressVector_StressControl.
double giveTemperature(GaussPoint *gp, TimeStep *tStep)
void beDyadicProductOf(const FloatArray &vec1, const FloatArray &vec2)
Assigns to the receiver the dyadic product .
void beTProductOf(const FloatMatrix &a, const FloatMatrix &b)
Assigns to the receiver product of .
const FloatArray & giveTempFVector() const
Returns the const pointer to receiver's temporary deformation gradient vector.
const FloatArray & givePlasticStrain()
void times(double s)
Multiplies receiver with scalar.
static double computeDeviatoricVolumetricSplit(FloatArray &dev, const FloatArray &s)
Computes split of receiver into deviatoric and volumetric part.
virtual void giveRealStressVector_1d(FloatArray &answer, GaussPoint *gp, const FloatArray &reducedE, TimeStep *tStep)
Default implementation relies on giveRealStressVector_StressControl.
long ContextMode
Context mode (mask), defining the type of information written/read to/from context.
void beSymVectorForm(const FloatMatrix &aMatrix)
Reciever will be a vector with 6 components formed from a 3x3 matrix.
Abstract base class for all "structural" constitutive models.
void letTempPlasticStrainBe(const FloatArray &values)
void beProductTOf(const FloatMatrix &a, const FloatMatrix &b)
Assigns to the receiver product of .
virtual contextIOResultType restoreContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Restores the receiver state previously written in stream.
virtual void initTempStatus()
Initializes the temporary internal variables, describing the current state according to previously re...
Domain * giveDomain() const
double signum(double i)
Returns the signum of given value (i = 0 returns 0, i < 0 returns -1, i > 0 returns 1) ...
void beUnitMatrix()
Sets receiver to unity matrix.
virtual void give1dStressStiffMtrx(FloatMatrix &answer, MatResponseMode mode, GaussPoint *gp, TimeStep *tStep)
Method for computing 1d stiffness matrix of receiver.
REGISTER_Material(DummyMaterial)
void beSymVectorFormOfStrain(const FloatMatrix &aMatrix)
void beProductOf(const FloatMatrix &a, const FloatMatrix &b)
Assigns to the receiver product of .
virtual void initTempStatus()
Initializes the temporary internal variables, describing the current state according to previously re...
int giveSize() const
Returns the size of receiver.
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.
double G
Elastic shear modulus.
double tempKappa
Cumulative plastic strain (final).
void beInverseOf(const FloatMatrix &src)
Modifies receiver to become inverse of given parameter.
ScalarFunction sig0
Initial (uniaxial) yield stress.
Class representing integration point in finite element program.
Class representing solution step.
virtual void giveRealStressVector_3d(FloatArray &answer, GaussPoint *gp, const FloatArray &reducedE, TimeStep *tStep)
Default implementation relies on giveRealStressVector for second Piola-Kirchoff stress.
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
void add(const FloatArray &src)
Adds array src to receiver.
void computeGLPlasticStrain(const FloatMatrix &F, FloatMatrix &Ep, FloatMatrix b, double J)
FloatMatrix leftCauchyGreen
Left Cauchy-Green deformation gradient (initial).
const FloatArray & giveNaturalCoordinates()
Returns coordinate array of receiver.
void letTempPVectorBe(const FloatArray &v)
Assigns tempPVector to given vector v.
void resize(int s)
Resizes receiver towards requested size.
LinearElasticMaterial * giveLinearElasticMaterial()
Returns a reference to the basic elastic material.