44 #ifdef microplane_m1_new_implementation 47 {
E = 0.;
nu = 0.;
EN = 0.;
s0 = 0.;
HN = 0.; }
57 OOFEM_WARNING(
"Poisson ratio of microplane model M1 must be set to 0.25");
60 EN =
E / ( 1. - 2. *
nu );
97 double sigTrial =
EN * ( epsN - epspN.
at(imp) );
99 double sigYield =
EN * (
s0 +
HN * epsN ) / (
EN +
HN );
100 if ( sigYield < 0. ) {
104 if ( sigTrial > sigYield ) {
105 sigN.
at(imp) = sigYield;
106 epspN.
at(imp) = epsN - sigYield /
EN;
109 sigN.
at(imp) = sigTrial;
113 for (
int i = 1; i <= 6; i++ ) {
137 if ( mode == ElasticStiffness ) {
149 double aux, D11 = 0., D12 = 0., D13 = 0., D14 = 0., D15 = 0., D16 = 0., D22 = 0., D23 = 0., D24 = 0., D25 = 0., D26 = 0., D33 = 0., D34 = 0., D35 = 0., D36 = 0.;
152 if ( plasticState.
at(im + 1) ) {
157 D11 += aux *
N [ im ] [ 0 ] *
N [ im ] [ 0 ];
158 D12 += aux * N [ im ] [ 0 ] * N [ im ] [ 1 ];
159 D13 += aux * N [ im ] [ 0 ] * N [ im ] [ 2 ];
160 D14 += aux * N [ im ] [ 0 ] * N [ im ] [ 3 ];
161 D15 += aux * N [ im ] [ 0 ] * N [ im ] [ 4 ];
162 D16 += aux * N [ im ] [ 0 ] * N [ im ] [ 5 ];
164 D22 += aux * N [ im ] [ 1 ] * N [ im ] [ 1 ];
165 D23 += aux * N [ im ] [ 1 ] * N [ im ] [ 2 ];
166 D24 += aux * N [ im ] [ 1 ] * N [ im ] [ 3 ];
167 D25 += aux * N [ im ] [ 1 ] * N [ im ] [ 4 ];
168 D26 += aux * N [ im ] [ 1 ] * N [ im ] [ 5 ];
170 D33 += aux * N [ im ] [ 2 ] * N [ im ] [ 2 ];
171 D34 += aux * N [ im ] [ 2 ] * N [ im ] [ 3 ];
172 D35 += aux * N [ im ] [ 2 ] * N [ im ] [ 4 ];
173 D36 += aux * N [ im ] [ 2 ] * N [ im ] [ 5 ];
175 answer.
at(1, 1) = D11;
176 answer.
at(1, 2) = answer.
at(2, 1) = answer.
at(6, 6) = D12;
177 answer.
at(1, 3) = answer.
at(3, 1) = answer.
at(5, 5) = D13;
178 answer.
at(1, 4) = answer.
at(4, 1) = answer.
at(5, 6) = answer.
at(6, 5) = D14;
179 answer.
at(1, 5) = answer.
at(5, 1) = D15;
180 answer.
at(1, 6) = answer.
at(6, 1) = D16;
182 answer.
at(2, 2) = D22;
183 answer.
at(2, 3) = answer.
at(3, 2) = answer.
at(4, 4) = D23;
184 answer.
at(2, 4) = answer.
at(4, 2) = D24;
185 answer.
at(2, 5) = answer.
at(5, 2) = answer.
at(4, 6) = answer.
at(6, 4) = D25;
186 answer.
at(2, 6) = answer.
at(6, 2) = D26;
188 answer.
at(3, 3) = answer.
at(3, 3) = D33;
189 answer.
at(3, 4) = answer.
at(4, 3) = D34;
190 answer.
at(3, 5) = answer.
at(5, 3) = D35;
191 answer.
at(3, 6) = answer.
at(6, 3) = answer.
at(4, 5) = answer.
at(5, 4) = D36;
200 if ( type == IST_PlasticStrainTensor ) {
205 double aux =
nu * ( sig.
at(1) + sig.
at(2) + sig.
at(3) );
206 double G =
E / ( 2. * ( 1. +
nu ) );
207 answer.
at(1) -= ( ( 1. +
nu ) * sig.
at(1) - aux ) /
E;
208 answer.
at(2) -= ( ( 1. +
nu ) * sig.
at(2) - aux ) /
E;
209 answer.
at(3) -= ( ( 1. +
nu ) * sig.
at(3) - aux ) /
E;
210 answer.
at(4) -= sig.
at(4) / G;
211 answer.
at(5) -= sig.
at(5) / G;
212 answer.
at(6) -= sig.
at(6) / G;
238 fprintf(file,
"status { sigN ");
240 for (
int imp = 1; imp <= nm; imp++ ) {
241 fprintf( file,
" %g ",
sigN.
at(imp) );
243 fprintf(file,
" epspN ");
244 for (
int imp = 1; imp <= nm; imp++ ) {
245 fprintf( file,
" %g ",
epspN.
at(imp) );
247 fprintf(file,
" plast ");
248 for (
int imp = 1; imp <= nm; imp++ ) {
251 fprintf(file,
"}\n");
277 {
E = 0.; nu = 0.; EN = 0.; s0 = 0.; HN = 0.; }
302 for (
int imp = 1; imp <= nmp; imp++ ) {
303 depsN =
N.at(imp, 1) * deps.
at(1) +
N.at(imp, 2) * deps.
at(2) +
N.at(imp, 3) * deps.
at(3);
304 epsN =
N.at(imp, 1) * totalStrain.
at(1) +
N.at(imp, 2) * totalStrain.
at(2) +
N.at(imp, 3) * totalStrain.
at(3);
305 sigmaN.
at(imp) += EN * depsN;
306 double sy = EN * ( s0 + HN * epsN ) / ( EN + HN );
310 if ( sigmaN.
at(imp) > sy ) {
313 sigmaNyield.
at(imp) = sy;
314 for (
int i = 1; i <= 3; i++ ) {
315 answer.
at(i) +=
N.at(imp, i) * sigmaN.
at(imp) * mw.at(imp);
322 status->letNormalMplaneYieldStressesBe(sigmaNyield);
327 M1Material :: giveElasticPlaneStressStiffMtrx(
FloatMatrix &answer)
330 answer.
at(1, 1) = answer.
at(2, 2) =
E / ( 1. - nu * nu );
331 answer.
at(1, 2) = answer.
at(2, 1) =
E * nu / ( 1. - nu * nu );
332 answer.
at(1, 3) = answer.
at(2, 3) = answer.
at(3, 1) = answer.
at(3, 2) = 0.;
333 answer.
at(3, 3) =
E / ( 2. * ( 1. + nu ) );
340 if ( rMode == ElasticStiffness ) {
341 giveElasticPlaneStressStiffMtrx(answer);
350 giveElasticPlaneStressStiffMtrx(answer);
354 FloatArray sigmaNyield = status->giveNormalMplaneYieldStresses();
356 double D11, D12, D13, D22, D23, aux;
357 D11 = D12 = D13 = D22 = D23 = 0.;
358 for (
int imp = 1; imp <= nmp; imp++ ) {
359 if ( sigmaN.
at(imp) < sigmaNyield.
at(imp) ) {
360 aux = mw.at(imp) * EN;
361 }
else if ( sigmaNyield.
at(imp) > 0. ) {
362 aux = mw.at(imp) * EN * HN / ( EN + HN );
366 D11 += aux * NN.at(imp, 1);
367 D12 += aux * NN.at(imp, 3);
368 D13 += aux * NN.at(imp, 2);
369 D22 += aux * NN.at(imp, 5);
370 D23 += aux * NN.at(imp, 4);
372 answer.
at(1, 1) = D11;
373 answer.
at(1, 2) = answer.
at(2, 1) = answer.
at(3, 3) = D12;
374 answer.
at(1, 3) = answer.
at(3, 1) = D13;
375 answer.
at(2, 2) = D22;
376 answer.
at(2, 3) = answer.
at(3, 2) = D23;
386 if ( result !=
IRRT_OK )
return result;
401 for (
int imp = 1; imp <= nmp; imp++ ) {
402 double alpha = ( imp - 1 ) * (
M_PI / nmp );
403 double c = cos(alpha);
404 double s = sin(alpha);
407 N.at(imp, 1) = c * c;
408 N.at(imp, 2) = s * s;
409 N.at(imp, 3) = c * s;
410 NN.at(imp, 1) = c * c * c * c;
411 NN.at(imp, 2) = c * c * c * s;
412 NN.at(imp, 3) = c * c * s * s;
413 NN.at(imp, 4) = c * s * s * s;
414 NN.at(imp, 5) = s * s * s * s;
415 mw.at(imp) = 2. / nmp;
424 return mode == _PlaneStress;
431 if ( type == IST_PlasticStrainTensor ) {
433 plasticStrain.
zero();
436 double Exx, Eyy, Gamma;
437 Exx = Eyy = Gamma = 0.;
439 for (
int imp = 1; imp <= nmp; imp++ ) {
441 for (
int i = 1; i <= 3; i++ ) {
442 epsN += strain.
at(i) *
N.at(imp, i);
444 double epsNpl = epsN - sigmaN.
at(imp) / EN;
445 double aux = epsNpl * mw.at(imp);
446 Exx += aux *
N.at(imp, 1);
447 Eyy += aux *
N.at(imp, 2);
448 Gamma += aux *
N.at(imp, 3);
451 plasticStrain.
at(1) = 1.5 * Exx - 0.5 * Eyy;
452 plasticStrain.
at(2) = -0.5 * Exx + 1.5 * Eyy;
453 plasticStrain.
at(3) = 4. * Gamma;
481 fprintf(file,
"status { sigN ");
483 for (
int imp = 1; imp <= nm; imp++ ) {
484 fprintf( file,
" %f ",
sigN.
at(imp) );
486 fprintf(file,
"}\n");
508 #endif // end of old implementation
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.
MaterialMode giveMaterialMode()
Returns corresponding material mode of receiver.
int numberOfMicroplanes
Number of microplanes.
M1Material(int n, Domain *d)
Constructor.
virtual contextIOResultType saveContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Stores receiver state to output stream.
void letTempStrainVectorBe(const FloatArray &v)
Assigns tempStrainVector to given vector v.
void letTempNormalMplaneStressesBe(FloatArray sigmaN)
virtual void initTempStatus()
Initializes the temporary internal variables, describing the current state according to previously re...
virtual MaterialStatus * giveStatus(GaussPoint *gp) const
Returns material status of receiver in given integration point.
GaussPoint * gp
Associated integration point.
virtual ~M1MaterialStatus()
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 ...
double E
Young's modulus.
virtual void updateYourself(TimeStep *tStep)
Update equilibrium history variables according to temp-variables.
The purpose of DataStream abstract class is to allow to store/restore context to different streams...
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.
void letTempNormalMplanePlasticStrainsBe(FloatArray epsilonpN)
This class implements a structural material status information.
const FloatArray & giveNormalMplaneStresses()
void letPlasticStateIndicatorsBe(IntArray plSt)
Microplane * giveMicroplane(int i, GaussPoint *masterGp)
Returns i-th microplane belonging to master-macro-integration point. )-based indexing.
MaterialMode
Type representing material mode of integration point.
M1MaterialStatus(int n, Domain *d, GaussPoint *g)
virtual void printOutputAt(FILE *file, TimeStep *tStep)
Print receiver's output to given stream.
Class implementing an array of integers.
const FloatArray & giveNormalMplanePlasticStrains()
int & at(int i)
Coefficient access function.
MatResponseMode
Describes the character of characteristic material matrix.
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.
virtual void initTempStatus(GaussPoint *gp)
Initializes temporary variables stored in integration point status at the beginning of new time step...
Abstract base class for all microplane models.
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
StructuralMaterialStatus(int n, Domain *d, GaussPoint *g)
Constructor. Creates new StructuralMaterialStatus with number n, belonging to domain d and Integratio...
virtual int giveIPValue(FloatArray &answer, GaussPoint *gp, InternalStateType type, TimeStep *tStep)
Returns the integration point corresponding value in Reduced form.
double nu
Poisson's ratio.
Class representing microplane integration point in finite element program.
void times(double f)
Multiplies receiver by factor f.
const FloatArray & giveTempStrainVector() const
Returns the const pointer to receiver's temporary strain vector.
virtual contextIOResultType restoreContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Restores the receiver state previously written in stream.
double at(int i, int j) const
Coefficient access function.
double computeNormalStrainComponent(Microplane *mplane, const FloatArray ¯oStrain)
Computes the length of normal strain vector on given microplane.
virtual void printOutputAt(FILE *file, TimeStep *tStep)
Print receiver's output to given stream.
virtual contextIOResultType restoreContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Restores the receiver state previously written in stream.
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 ...
Class representing vector of real numbers.
double N[MAX_NUMBER_OF_MICROPLANES][6]
Normal projection tensors for all microplanes.
#define _IFT_M1Material_s0
Implementation of matrix containing floating point numbers.
IRResultType
Type defining the return values of InputRecord reading operations.
#define _IFT_M1Material_hn
void letTempStressVectorBe(const FloatArray &v)
Assigns tempStressVector to given vector v.
double microplaneWeights[MAX_NUMBER_OF_MICROPLANES]
Integration weights of microplanes.
const FloatArray & giveStressVector() const
Returns the const pointer to receiver's stress vector.
virtual int hasMaterialModeCapability(MaterialMode mode)
Tests if material supports material mode.
void resize(int rows, int cols)
Checks size of receiver towards requested bounds.
void zero()
Zeroes all coefficients of receiver.
virtual void giveRealStressVector_3d(FloatArray &answer, GaussPoint *gp, const FloatArray &reducedStrain, 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 times(double s)
Multiplies receiver with scalar.
long ContextMode
Context mode (mask), defining the type of information written/read to/from context.
Abstract base class for all "structural" constitutive models.
void zero()
Zeroes all coefficient of receiver.
virtual void initTempStatus()
Initializes the temporary internal variables, describing the current state according to previously re...
virtual void giveRealStressVector_PlaneStress(FloatArray &answer, GaussPoint *gp, const FloatArray &reducedE, TimeStep *tStep)
Default implementation relies on giveRealStressVector_StressControl.
const IntArray & givePlasticStateIndicators()
REGISTER_Material(DummyMaterial)
int giveSize() const
Returns the size of receiver.
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
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 givePlaneStressStiffMtrx(FloatMatrix &answer, MatResponseMode mmode, GaussPoint *gp, TimeStep *tStep)
Method for computing plane stress stiffness matrix of receiver.
const FloatArray & giveStrainVector() const
Returns the const pointer to receiver's strain vector.
const FloatArray & giveTempNormalMplaneStresses()
Class representing integration point in finite element program.
#define OOFEM_WARNING(...)
Class representing solution step.
void resize(int s)
Resizes receiver towards requested size.