67 if ( result !=
IRRT_OK )
return result;
70 if ( result !=
IRRT_OK )
return result;
73 k = value / sqrt(3.0);
152 helpVector = stressVector;
154 helpVector.
add(backStress);
159 helpVector = stressVector;
173 double f, ax, ay, az, sx, sy, sz;
181 helpVector = stressVector;
182 helpVector.
add(backStress);
187 helpVector = stressVector;
192 if ( fabs(f) < 1.e-6 ) {
196 ax = helpVector.
at(1);
197 ay = helpVector.
at(2);
198 az = helpVector.
at(3);
200 sx = ( 2. / 3. ) * ax - ( 1. / 3. ) * ay - ( 1. / 3. ) * az;
201 sy = ( 2. / 3. ) * ay - ( 1. / 3. ) * ax - ( 1. / 3. ) * az;
202 sz = ( 2. / 3. ) * az - ( 1. / 3. ) * ay - ( 1. / 3. ) * ax;
204 answer.
at(1) = 0.5 * sx / f;
205 answer.
at(2) = 0.5 * sy / f;
206 answer.
at(3) = 0.5 * sz / f;
207 answer.
at(4) = helpVector.
at(4) / f;
208 answer.
at(5) = helpVector.
at(5) / f;
209 answer.
at(6) = helpVector.
at(6) / f;
222 int sizer = dplasticStrain.
giveSize();
223 double coeff = sqrt(2.) * ( 2. / 3. );
224 for (
int i = 1; i <= sizer; i++ ) {
225 answer.
at(i) = dplasticStrain.
at(i) * coeff;
230 answer.
at(size) = sqrt(1. / 3.) * dlambda.
at(1);
237 const FloatArray &strainSpaceHardeningVariables)
252 kcount = reducedKinematicGrad.
giveSize();
253 for (
int i = 1; i <= kcount; i++ ) {
274 double coeff = sqrt(2.) * ( 2. / 3. ) * gamma.
at(1);
278 for (
int i = 1; i <= rsize; i++ ) {
279 for (
int j = 1; j <= rsize; j++ ) {
280 answer.
at(i, j) = coeff * h.
at(i, j);
300 strainSpaceHardeningVars);
302 for (
int i = 1; i <= rsize; i++ ) {
303 answer.
at(i, 1) = loadGradSigVec.
at(i);
306 answer.
times( sqrt(2.) * ( 2. / 3. ) );
310 answer.
at(size, 1) = sqrt(1. / 3.);
323 double f, f32, f12, ax, ay, az;
328 gradientMatrix.
resize(size, size);
329 gradientMatrix.
zero();
332 if ( fullStressVector.
giveSize() != 0 ) {
336 helpVector = fullStressVector;
337 helpVector.
add(backStress);
339 helpVector = fullStressVector;
344 f32 = pow(f, 3. / 2.);
346 ax = helpVector.
at(1);
347 ay = helpVector.
at(2);
348 az = helpVector.
at(3);
350 df.
at(1) = ( 2. / 3. ) * ax - ( 1. / 3. ) * ay - ( 1. / 3. ) * az;
351 df.
at(2) = ( 2. / 3. ) * ay - ( 1. / 3. ) * ax - ( 1. / 3. ) * az;
352 df.
at(3) = ( 2. / 3. ) * az - ( 1. / 3. ) * ay - ( 1. / 3. ) * ax;
353 df.
at(4) = 2. * helpVector.
at(4);
354 df.
at(5) = 2. * helpVector.
at(5);
355 df.
at(6) = 2. * helpVector.
at(6);
357 for (
int i = 1; i <= 3; i++ ) {
358 if ( ( imask = mask.
at(i) ) == 0 ) {
362 for (
int j = i; j <= 3; j++ ) {
363 if ( ( jmask = mask.
at(j) ) == 0 ) {
368 gradientMatrix.
at(imask, jmask) = -( 1. / 4. ) * ( 1. / f32 ) * df.
at(i) * df.
at(j) + 0.5 * ( 1. / f12 ) * ( 4. / 6 );
370 gradientMatrix.
at(imask, jmask) = -( 1. / 4. ) * ( 1. / f32 ) * df.
at(i) * df.
at(j) + 0.5 * ( 1. / f12 ) * ( -2. / 6 );
371 gradientMatrix.
at(jmask, imask) = -( 1. / 4. ) * ( 1. / f32 ) * df.
at(i) * df.
at(j) + 0.5 * ( 1. / f12 ) * ( -2. / 6 );
376 for (
int i = 1; i <= 3; i++ ) {
377 if ( ( imask = mask.
at(i) ) == 0 ) {
381 for (
int j = 4; j <= 6; j++ ) {
382 if ( ( jmask = mask.
at(j) ) == 0 ) {
386 gradientMatrix.
at(imask, jmask) = -( 1. / 4. ) * ( 1. / f32 ) * df.
at(i) * df.
at(j);
387 gradientMatrix.
at(jmask, imask) = -( 1. / 4. ) * ( 1. / f32 ) * df.
at(i) * df.
at(j);
391 for (
int i = 4; i <= 6; i++ ) {
392 if ( ( imask = mask.
at(i) ) == 0 ) {
396 for (
int j = i; j <= 6; j++ ) {
397 if ( ( jmask = mask.
at(j) ) == 0 ) {
402 gradientMatrix.
at(imask, jmask) = -( 1. / 4. ) * ( 1. / f32 ) * df.
at(i) * df.
at(j) + 0.5 * ( 1. / f12 ) * 2.;
404 gradientMatrix.
at(imask, jmask) = -( 1. / 4. ) * ( 1. / f32 ) * df.
at(i) * df.
at(j);
405 gradientMatrix.
at(jmask, imask) = -( 1. / 4. ) * ( 1. / f32 ) * df.
at(i) * df.
at(j);
415 const FloatArray &strainSpaceHardeningVariables)
421 gradientMatrix.
zero();
428 for (
int ii = 1; ii <= kcount; ii++ ) {
429 for (
int j = 1; j <= kcount; j++ ) {
430 gradientMatrix.
at(ii, j) = helpMat.
at(ii, j);
450 if ( stressVector.
isEmpty() ) {
454 v1 = ( ( stressVector.
at(1) - stressVector.
at(2) ) * ( stressVector.
at(1) - stressVector.
at(2) ) );
455 v2 = ( ( stressVector.
at(2) - stressVector.
at(3) ) * ( stressVector.
at(2) - stressVector.
at(3) ) );
456 v3 = ( ( stressVector.
at(3) - stressVector.
at(1) ) * ( stressVector.
at(3) - stressVector.
at(1) ) );
458 answer = ( 1. / 6. ) * ( v1 + v2 + v3 ) + stressVector.
at(4) * stressVector.
at(4) +
459 stressVector.
at(5) * stressVector.
at(5) + stressVector.
at(6) * stressVector.
at(6);
480 for (
int i = 1; i <= isize; i++ ) {
static int giveSizeOfVoigtSymVector(MaterialMode mmode)
Returns the size of symmetric part of a reduced stress/strain vector according to given mode...
MaterialMode giveMaterialMode()
Returns corresponding material mode of receiver.
static int giveVoigtSymVectorMask(IntArray &answer, MaterialMode mmode)
The same as giveVoigtVectorMask but returns a mask corresponding to a symmetric second order tensor...
LinearElasticMaterial * linearElasticMaterial
Reference to bulk (undamaged) material.
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
virtual void computeReducedHardeningVarsSigmaGradient(FloatMatrix &answer, GaussPoint *gp, const IntArray &activeConditionMap, const FloatArray &fullStressVector, const FloatArray &strainSpaceHardeningVars, const FloatArray &gamma)
Computes derivative of vector with respect to stress.
int nsurf
Number of yield surfaces.
double & at(int i)
Coefficient access function.
void computeReducedStressGradientVector(FloatArray &answer, functType ftype, int isurf, GaussPoint *gp, const FloatArray &stressVector, const FloatArray &strainSpaceHardeningVariables)
int kinematicHardeningFlag
void clear()
Clears receiver (zero size).
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
This class implements associated Material Status to MPlasticMaterial.
Class implementing an array of integers.
int & at(int i)
Coefficient access function.
functType
Type that allows to distinguish between yield function and loading function.
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
virtual void computeReducedSSGradientMatrix(FloatMatrix &gradientMatrix, int i, GaussPoint *gp, const FloatArray &fullStressVector, const FloatArray &strainSpaceHardeningVariables)
Computes second derivative of loading function with respect to stress.
This class implements an isotropic linear elastic material in a finite element problem.
virtual MaterialStatus * CreateStatus(GaussPoint *gp) const
Creates new copy of associated status and inserts it into given integration point.
void times(double f)
Multiplies receiver by factor f.
double giveIsotropicHardeningVar(GaussPoint *gp, const FloatArray &strainSpaceHardeningVars)
enum oofem::MPlasticMaterial2::ReturnMappingAlgoType rmType
bool isEmpty() const
Returns true if receiver is empty.
double at(int i, int j) const
Coefficient access function.
static double computeJ2InvariantAt(const FloatArray &stressVector)
virtual void computeKGradientVector(FloatArray &answer, functType ftype, int isurf, GaussPoint *gp, FloatArray &fullStressVector, const FloatArray &strainSpaceHardeningVariables)
Computes the derivative of yield/loading function with respect to vector.
Abstract base class representing a material status information.
virtual int giveSizeOfReducedHardeningVarsVector(GaussPoint *gp) const
Class representing vector of real numbers.
Implementation of matrix containing floating point numbers.
virtual double computeYieldValueAt(GaussPoint *gp, int isurf, const FloatArray &stressVector, const FloatArray &strainSpaceHardeningVars)
Computes the value of yield function.
IRResultType
Type defining the return values of InputRecord reading operations.
void resize(int rows, int cols)
Checks size of receiver towards requested bounds.
void zero()
Zeroes all coefficients of receiver.
void giveStressBackVector(FloatArray &answer, GaussPoint *gp, const FloatArray &strainSpaceHardeningVars)
virtual void computeStressGradientVector(FloatArray &answer, functType ftype, int isurf, GaussPoint *gp, const FloatArray &stressVector, const FloatArray &strainSpaceHardeningVars)
Computes the stress gradient of yield/loading function (df/d_sigma).
static void giveInvertedVoigtVectorMask(IntArray &answer, MaterialMode mmode)
Gives the inverted version of giveVoigtVectorMask.
void zero()
Zeroes all coefficient of receiver.
Domain * giveDomain() const
virtual void computeReducedSKGradientMatrix(FloatMatrix &gradientMatrix, int i, GaussPoint *gp, const FloatArray &fullStressVector, const FloatArray &strainSpaceHardeningVariables)
Computes second derivative of loading function with respect to stress and hardening vars...
REGISTER_Material(DummyMaterial)
int isotropicHardeningFlag
virtual void computeReducedHardeningVarsLamGradient(FloatMatrix &answer, GaussPoint *gp, int actSurf, const IntArray &activeConditionMap, const FloatArray &fullStressVector, const FloatArray &strainSpaceHardeningVars, const FloatArray &gamma)
computes derivative of vector with respect to lambda vector
int giveSize() const
Returns the size of receiver.
the oofem namespace is to define a context or scope in which all oofem names are defined.
bool isNotEmpty() const
Returns true if receiver is not empty.
virtual int giveSizeOfFullHardeningVarsVector()
virtual int hasHardening()
Indicates, whether receiver model has hardening/softening behavior or behaves according to perfect pl...
int giveNumberOfRows() const
Returns number of rows of receiver.
Class representing integration point in finite element program.
This class represents a base class for non-associated multisurface plasticity.
void add(const FloatArray &src)
Adds array src to receiver.
void resize(int s)
Resizes receiver towards requested size.
virtual void computeStrainHardeningVarsIncrement(FloatArray &answer, GaussPoint *gp, const FloatArray &stress, const FloatArray &dlambda, const FloatArray &dplasticStrain, const IntArray &activeConditionMap)
Computes the increment of strain-space hardening variables.