71 if ( result !=
IRRT_OK )
return result;
73 if ( result !=
IRRT_OK )
return result;
76 k = value / sqrt(3.0);
112 const FloatArray &strainSpaceHardeningVariables)
130 for (
int i = 1; i <= isize; i++ ) {
133 answer.
at( mask.
at(i) ) = ( sqrt(2.) * 2. / 3. ) * this->
kinematicModuli * strainSpaceHardeningVariables.
at(i);
141 strainSpaceHardeningVariables.
at(rSize);
159 helpVector = stressVector;
160 helpVector.
add(backStress);
165 helpVector = stressVector;
178 const FloatArray &strainSpaceHardeningVariables,
190 answer.
resize(size, size);
196 for (
int i = 1; i <= ksize; i++ ) {
213 double f, ax, ay, az, sx, sy, sz;
221 helpVector = stressVector;
222 helpVector.
add(backStress);
227 helpVector = stressVector;
232 if ( fabs(f) < 1.e-6 ) {
236 ax = helpVector.
at(1);
237 ay = helpVector.
at(2);
238 az = helpVector.
at(3);
240 sx = ( 2. / 3. ) * ax - ( 1. / 3. ) * ay - ( 1. / 3. ) * az;
241 sy = ( 2. / 3. ) * ay - ( 1. / 3. ) * ax - ( 1. / 3. ) * az;
242 sz = ( 2. / 3. ) * az - ( 1. / 3. ) * ay - ( 1. / 3. ) * ax;
244 answer.
at(1) = 0.5 * sx / f;
245 answer.
at(2) = 0.5 * sy / f;
246 answer.
at(3) = 0.5 * sz / f;
247 answer.
at(4) = helpVector.
at(4) / f;
248 answer.
at(5) = helpVector.
at(5) / f;
249 answer.
at(6) = helpVector.
at(6) / f;
261 FloatArray fullKinematicGradient, reducedKinematicGrad;
275 kcount = reducedKinematicGrad.
giveSize();
279 for (
int i = 1; i <= kcount; i++ ) {
280 answer.
at(i) = reducedKinematicGrad.
at(i);
285 answer.
at(size) = sqrt(1. / 3.);
307 double f, f32, f12, ax, ay, az;
313 answer.
resize(size, size);
317 if ( stressVector.
giveSize() != 0 ) {
321 helpVector = stressVector;
322 helpVector.
add(backStress);
324 helpVector = stressVector;
329 f32 = pow(f, 3. / 2.);
331 ax = helpVector.
at(1);
332 ay = helpVector.
at(2);
333 az = helpVector.
at(3);
335 df.
at(1) = ( 2. / 3. ) * ax - ( 1. / 3. ) * ay - ( 1. / 3. ) * az;
336 df.
at(2) = ( 2. / 3. ) * ay - ( 1. / 3. ) * ax - ( 1. / 3. ) * az;
337 df.
at(3) = ( 2. / 3. ) * az - ( 1. / 3. ) * ay - ( 1. / 3. ) * ax;
338 df.
at(4) = 2. * helpVector.
at(4);
339 df.
at(5) = 2. * helpVector.
at(5);
340 df.
at(6) = 2. * helpVector.
at(6);
342 for (
int i = 1; i <= 3; i++ ) {
343 if ( ( imask = mask.
at(i) ) == 0 ) {
347 for (
int j = i; j <= 3; j++ ) {
348 if ( ( jmask = mask.
at(j) ) == 0 ) {
353 answer.
at(imask, jmask) = -( 1. / 4. ) * ( 1. / f32 ) * df.
at(i) * df.
at(j) + 0.5 * ( 1. / f12 ) * ( 4. / 6 );
355 answer.
at(imask, jmask) = -( 1. / 4. ) * ( 1. / f32 ) * df.
at(i) * df.
at(j) + 0.5 * ( 1. / f12 ) * ( -2. / 6 );
356 answer.
at(jmask, imask) = -( 1. / 4. ) * ( 1. / f32 ) * df.
at(i) * df.
at(j) + 0.5 * ( 1. / f12 ) * ( -2. / 6 );
361 for (
int i = 1; i <= 3; i++ ) {
362 if ( ( imask = mask.
at(i) ) == 0 ) {
366 for (
int j = 4; j <= 6; j++ ) {
367 if ( ( jmask = mask.
at(j) ) == 0 ) {
371 answer.
at(imask, jmask) = -( 1. / 4. ) * ( 1. / f32 ) * df.
at(i) * df.
at(j);
372 answer.
at(jmask, imask) = -( 1. / 4. ) * ( 1. / f32 ) * df.
at(i) * df.
at(j);
376 for (
int i = 4; i <= 6; i++ ) {
377 if ( ( imask = mask.
at(i) ) == 0 ) {
381 for (
int j = i; j <= 6; j++ ) {
382 if ( ( jmask = mask.
at(j) ) == 0 ) {
387 answer.
at(imask, jmask) = -( 1. / 4. ) * ( 1. / f32 ) * df.
at(i) * df.
at(j) + 0.5 * ( 1. / f12 ) * 2.;
389 answer.
at(imask, jmask) = -( 1. / 4. ) * ( 1. / f32 ) * df.
at(i) * df.
at(j);
390 answer.
at(jmask, imask) = -( 1. / 4. ) * ( 1. / f32 ) * df.
at(i) * df.
at(j);
416 if ( stressVector.
isEmpty() ) {
420 v1 = ( ( stressVector.
at(1) - stressVector.
at(2) ) * ( stressVector.
at(1) - stressVector.
at(2) ) );
421 v2 = ( ( stressVector.
at(2) - stressVector.
at(3) ) * ( stressVector.
at(2) - stressVector.
at(3) ) );
422 v3 = ( ( stressVector.
at(3) - stressVector.
at(1) ) * ( stressVector.
at(3) - stressVector.
at(1) ) );
424 answer = ( 1. / 6. ) * ( v1 + v2 + v3 ) + stressVector.
at(4) * stressVector.
at(4) +
425 stressVector.
at(5) * stressVector.
at(5) + stressVector.
at(6) * stressVector.
at(6);
473 for (
int i = 1; i <= 6; i++ ) {
474 answer.
at(i) = stressSpaceHardeningVars.
at(i);
491 return stressSpaceHardeningVars.
at(7);
493 return stressSpaceHardeningVars.
at(1);
static int giveSizeOfVoigtSymVector(MaterialMode mmode)
Returns the size of symmetric part of a reduced stress/strain vector according to given mode...
virtual MaterialStatus * CreateStatus(GaussPoint *gp) const
Creates new copy of associated status and inserts it into given integration point.
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...
J2MPlasticMaterial(int n, Domain *d)
virtual double computeYieldValueAt(GaussPoint *gp, int isurf, const FloatArray &stressVector, const FloatArray &stressSpaceHardeningVars)
functType
Type that allows to distinguish between yield function and loading function.
#define _IFT_J2MPlasticMaterial_khm
#define _IFT_J2MPlasticMaterial_ry
double & at(int i)
Coefficient access function.
void clear()
Clears receiver (zero size).
int kinematicHardeningFlag
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
double giveIsotropicHardeningVar(const FloatArray &stressSpaceHardeningVars)
LinearElasticMaterial * linearElasticMaterial
Reference to bulk (undamaged) material.
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
LinearElasticMaterial * giveLinearElasticMaterial()
Returns reference to undamaged (bulk) material.
This class implements a general plastic material.
Class implementing an array of integers.
int & at(int i)
Coefficient access function.
#define _IFT_J2MPlasticMaterial_rma
int giveSizeOfFullHardeningVarsVector()
int nsurf
Number of yield surfaces.
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
static void giveReducedSymVectorForm(FloatArray &answer, const FloatArray &vec, MaterialMode matMode)
Converts the full unsymmetric Voigt vector (2nd order tensor) to reduced form.
virtual void computeReducedGradientMatrix(FloatMatrix &answer, int isurf, GaussPoint *gp, const FloatArray &stressVector, const FloatArray &stressSpaceHardeningVars)
This class implements an isotropic linear elastic material in a finite element problem.
virtual void computeStressGradientVector(FloatArray &answer, functType ftype, int isurf, GaussPoint *gp, const FloatArray &stressVector, const FloatArray &stressSpaceHardeningVars)
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 ...
virtual ~J2MPlasticMaterial()
bool isEmpty() const
Returns true if receiver is empty.
double at(int i, int j) const
Coefficient access function.
virtual void computeStressSpaceHardeningVarsReducedGradient(FloatArray &answer, functType ftype, int isurf, GaussPoint *gp, const FloatArray &stressVector, const FloatArray &stressSpaceHardeningVars)
enum oofem::MPlasticMaterial::ReturnMappingAlgoType rmType
This class implements associated Material Status to MPlasticMaterial.
Abstract base class representing a material status information.
#define _IFT_J2MPlasticMaterial_ihm
Class representing vector of real numbers.
virtual void computeStressSpaceHardeningVars(FloatArray &answer, GaussPoint *gp, const FloatArray &strainSpaceHardeningVariables)
Implementation of matrix containing floating point numbers.
IRResultType
Type defining the return values of InputRecord reading operations.
virtual int hasHardening()
virtual void compute3dElasticModuli(FloatMatrix &answer, GaussPoint *gp, TimeStep *tStep)
void resize(int rows, int cols)
Checks size of receiver towards requested bounds.
void zero()
Zeroes all coefficients of receiver.
virtual void computeHardeningReducedModuli(FloatMatrix &answer, GaussPoint *gp, const FloatArray &strainSpaceHardeningVariables, TimeStep *tStep)
int giveSizeOfReducedHardeningVarsVector(GaussPoint *gp) const
static void giveInvertedVoigtVectorMask(IntArray &answer, MaterialMode mmode)
Gives the inverted version of giveVoigtVectorMask.
void zero()
Zeroes all coefficient of receiver.
void giveStressBackVector(FloatArray &answer, const FloatArray &stressSpaceHardeningVars)
Domain * giveDomain() const
double computeJ2InvariantAt(const FloatArray &stressVector)
REGISTER_Material(DummyMaterial)
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.
void clear()
Sets size of receiver to be an empty matrix. It will have zero rows and zero columns size...
void negated()
Switches the sign of every coefficient of receiver.
Class representing integration point in finite element program.
Class representing solution step.
void add(const FloatArray &src)
Adds array src to receiver.
int isotropicHardeningFlag
void resize(int s)
Resizes receiver towards requested size.