00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00035
00036
00037
00047
00048
00049
00050 #ifndef NewTemplate3Dep_H
00051 #define NewTemplate3Dep_H
00052
00053 #include <stresst.h>
00054 #include <straint.h>
00055 #include <BJtensor.h>
00056 #include <BJmatrix.h>
00057 #include <BJvector.h>
00058 #include <Matrix.h>
00059 #include <Vector.h>
00060
00061 #include <NDMaterial.h>
00062
00063 #include "MaterialParameter.h"
00064 #include "ElasticState.h"
00065 #include "YieldFunction.h"
00066 #include "PlasticFlow.h"
00067 #include "ScalarEvolution.h"
00068 #include "TensorEvolution.h"
00069
00070 #include <G3Globals.h>
00071
00072
00073 #include <iostream>
00074 using namespace std;
00075
00076
00077
00078 #include <Channel.h>
00079
00080 using namespace std;
00081
00082
00083
00084 class NewTemplate3Dep : public NDMaterial
00085 {
00086
00087 public:
00088
00125
00126
00127
00128
00129 NewTemplate3Dep( int tag,
00130 MaterialParameter *ptr_material_parameter_in,
00131 ElasticState *ptr_elastic_state_in,
00132 YieldFunction *ptr_yield_function_in,
00133 PlasticFlow *ptr_plastic_flow_in,
00134 ScalarEvolution **ptr_scalar_evolution_in,
00135 TensorEvolution **ptr_tensor_evolution_in,
00136 int caseIndex_in, int subStep_in = 1);
00137
00138
00172
00173 NewTemplate3Dep( int tag,
00174 MaterialParameter *ptr_material_parameter_in,
00175 ElasticState *ptr_elastic_state_in,
00176 YieldFunction *ptr_yield_function_in,
00177 PlasticFlow *ptr_plastic_flow_in,
00178 ScalarEvolution **ptr_scalar_evolution_in,
00179 int caseIndex_in, int subStep_in = 1);
00180
00181
00214
00215
00216 NewTemplate3Dep( int tag,
00217 MaterialParameter *ptr_material_parameter_in,
00218 ElasticState *ptr_elastic_state_in,
00219 YieldFunction *ptr_yield_function_in,
00220 PlasticFlow *ptr_plastic_flow_in,
00221 TensorEvolution **ptr_tensor_evolution_in,
00222 int caseIndex_in, int subStep_in = 1);
00223
00224
00253
00254
00255
00256 NewTemplate3Dep( int tag,
00257 MaterialParameter *ptr_material_parameter_in,
00258 ElasticState *ptr_elastic_state_in,
00259 YieldFunction *ptr_yield_function_in,
00260 PlasticFlow *ptr_plastic_flow_in,
00261 int caseIndex_in, int subStep_in = 1);
00262
00263 NewTemplate3Dep(void);
00264
00265
00266 ~NewTemplate3Dep(void);
00267
00268 const char *getClassType(void) const {return "NewTemplate3Dep";};
00269
00270
00271
00274
00275
00276
00277 int setTrialStrain (const Vector &v);
00278 int setTrialStrain (const Vector &v, const Vector &r);
00279 int setTrialStrainIncr (const Vector &v);
00280 int setTrialStrainIncr (const Vector &v, const Vector &r);
00281
00282
00284
00285 const Matrix &getTangent (void);
00286
00287
00289
00290 const BJmatrix& getTangentBJmatrix(void);
00291
00292
00294
00295 const Vector &getStress (void);
00296
00297
00299
00300 const Vector &getStrain (void);
00301
00302
00303 int setTrialStrain(const Tensor& v);
00304 int setTrialStrain(const Tensor& v, const Tensor& r);
00305 int setTrialStrainIncr(const Tensor& v);
00306 int setTrialStrainIncr(const Tensor& v, const Tensor& r);
00307
00308
00310
00311 const BJtensor& getTangentTensor(void);
00312
00313
00315
00316 const stresstensor& getStressTensor(void);
00317
00318
00320
00321 const straintensor& getStrainTensor(void);
00322
00323
00325
00326 const straintensor& getPlasticStrainTensor(void);
00327
00328
00329
00330
00331
00332 double getRho();
00333
00334 int commitState(void);
00335 int revertToLastCommit(void);
00336 int revertToStart(void);
00337
00338 NDMaterial* getCopy(void);
00339 NDMaterial* getCopy(const char *code);
00340
00341 const char *getType(void) const;
00342
00343
00344 int sendSelf(int commitTag, Channel &theChannel);
00345 int recvSelf(int commitTag, Channel &theChannel, FEM_ObjectBroker &theBroker);
00346
00347 void Print(OPS_Stream& s, int flag =0);
00348
00349 private:
00350
00351
00353
00354 int Explicit(const straintensor& strain_incr, int NumStep_in = 1);
00355
00356
00358
00359 int Implicit(const straintensor& strain_incr, int NumStep_in = 1);
00360
00361
00363
00364 int ImplicitLineSearch(const straintensor& strain_incr);
00365
00366
00368
00369 int ScaledExplicit(const straintensor& strain_incr, int NumStep_in = 1);
00370
00371
00373
00374 int PredictorEPState(const straintensor& strain_incr);
00375
00376
00378
00379 stresstensor yield_surface_cross(const stresstensor& start_stress,
00380 const stresstensor& end_stress,
00381 double a);
00382
00383
00385
00386 double zbrentstress(const stresstensor& start_stress,
00387 const stresstensor& end_stress,
00388 double x1, double x2, double tol) const;
00389
00390
00392
00393 double func( const stresstensor& start_stress,
00394 const stresstensor& end_stress,
00395 const MaterialParameter& ptr_material_parameter,
00396 double alfa ) const;
00397
00398
00399
00401
00402 int Tensor2MatrixSysR4(const tensor& T, Matrix& M);
00403
00404
00406
00407 int Tensor2VectorSysR2(const tensor& T, Vector& V);
00408
00409
00411
00412 int Matrix2TensorSysR4(const Matrix& M, tensor& T);
00413
00414
00416
00417 int Vector2TensorSysR2(const Vector& V, tensor& T, int Num0 = 0);
00418
00419 public:
00420
00421
00423
00424 int Stiffness2Compliance(const tensor& S, tensor& C);
00425
00426 private:
00427
00428
00429
00431
00432 straintensor TrialStrain;
00433
00434
00436
00437 stresstensor TrialStress;
00438
00439
00441
00442 straintensor TrialPlastic_Strain;
00443
00444
00446
00447 stresstensor CommitStress;
00448
00449
00451
00452 straintensor CommitStrain;
00453
00454
00456
00457 straintensor CommitPlastic_Strain;
00458
00459
00461
00462 BJtensor Stiffness;
00463
00464 MaterialParameter *ptr_material_parameter;
00465 ElasticState *ptr_elastic_state;
00466 YieldFunction *ptr_yield_function;
00467 PlasticFlow *ptr_plastic_flow;
00468 ScalarEvolution **ptr_scalar_evolution;
00469 TensorEvolution **ptr_tensor_evolution;
00470
00471 int caseIndex;
00472 int subStep;
00473 int divergeOrnot;
00474
00475 static const straintensor ZeroStrain;
00476 static const stresstensor ZeroStress;
00477 static const BJtensor ZeroI4;
00478 static const int ISMAX;
00479 static const int ITMAX;
00480 static const double TOL;
00481 static const double FTOL;
00482
00483
00484 static Vector sigma;
00485 static Matrix D;
00486
00487 static BJmatrix TangentMatrix;
00488 static Vector epsilon;
00489 };
00490
00491 #endif