NeoPZ
TPZMohrCoulomb.h
Go to the documentation of this file.
1 /*
2  * TPZMohrCoulomb.h
3  * FEMPZ
4  *
5  * Created by Diogo Cecilio on 5/4/10.
6  * Copyright 2010 __MyCompanyName__. All rights reserved.
7  *
8  */
9 
10 
11 /* Generated by Together */// $Id: TPZMohrCoulomb.h,v 1.2 2010-06-11 22:12:14 diogo Exp $
12 
13 #ifndef TPZMOHRCOULOMB_H
14 #define TPZMOHRCOULOMB_H
15 
16 #include "pzlog.h"
17 #include "TPZPlasticStep.h"
18 #include "TPZYCMohrCoulomb.h"
19 #include "TPZThermoForceA.h"
20 #include "TPZElasticResponse.h"
21 #include "pzvec_extras.h"
22 #include "TPZPlasticStepID.h"
23 
24 #ifdef LOG4CXX_PLASTICITY
25 static LoggerPtr loggerMohrCoulomb(Logger::getLogger("MCC"));
26 #endif
27 
28 #define MOHRCOULOMBPARENT TPZPlasticStep<TPZYCMohrCoulomb, TPZThermoForceA, TPZElasticResponse>
29 
30 
32 
33 public:
34 
36 
37 public:
38 
40  {
41  fMaterialTensionSign = 1; // internally in this material tension is negative
42  fInterfaceTensionSign = 1; // by default
43  }
44 
46  {
47  }
48 
50  {
51  MOHRCOULOMBPARENT::operator=(source);
52  return *this;
53  }
54 
55  virtual const char * Name() const override
56  {
57  return "TPZMohrCoulomb";
58  }
59 
60  static void ConventionalConcrete(TPZMohrCoulomb & material)
61  {
62  REAL pi = M_PI;
63  REAL cohesion = 11.2033; //yield- coesao inicial correspondeno a fck igual 32 Mpa
64  REAL phi = 20./180. * pi; //phi=20
65  REAL hardening = 1000.; //Modulo de hardening da coesao equivante 1 Mpa a cada 0.1% de deformacao
66  REAL young = 20000.;
67  REAL poisson = 0.2;
68  material.fYC.SetUp(phi);
69  material.fTFA.SetUp(cohesion, hardening);
70  material.fER.SetEngineeringData(young, poisson);
71  }
72 
73  static void TaludeMaterial(TPZMohrCoulomb & material)
74  {
75  REAL pi = M_PI;
76  REAL cohesion = 50.; //yield- coesao inicialem KPa
77  REAL phi = 20./180. * pi; //phi=20
78  REAL hardening = 10.; //Modulo de hardening da coesao equivante 0.01 Mpa a cada 0.1% de deformacao
79  REAL young = 20000.;//E em KPa
80  REAL poisson = 0.49;
81  material.fYC.SetUp(phi);
82  material.fTFA.SetUp(cohesion, hardening);
83  material.fER.SetEngineeringData(young, poisson);
84  }
85 
86  void SetUp(REAL & cohesion, REAL & phi, REAL & hardening, REAL &young, REAL &poisson)
87  {
88  MOHRCOULOMBPARENT::fYC.SetUp(phi);
89  MOHRCOULOMBPARENT::fTFA.SetUp(cohesion, hardening);
90  MOHRCOULOMBPARENT::fER.SetEngineeringData(young, poisson);
91  }
92 
93  virtual void SetUp(const TPZTensor<REAL> & epsTotal) override {
94  MOHRCOULOMBPARENT::SetUp(epsTotal);
95  }
96 
97  virtual void Print(std::ostream & out) const override
98  {
99  out << "\n" << this->Name();
100  out << "\n Base Class Data:\n";
101  MOHRCOULOMBPARENT::Print(out);
102  }
103 
104  public:
105 int ClassId() const override;
106 
107 
108  void Write(TPZStream &buf, int withclassid) const override{
109  MOHRCOULOMBPARENT::Write(buf, withclassid);
110 
111  buf.Write(&fYC.fPhi, 1);
112 
113  REAL lambda = fER.Lambda();
114  REAL mu = fER.Mu();
115  buf.Write(&lambda, 1);
116  buf.Write(&mu, 1);
117 
118  buf.Write(&fTFA.fSigmaYield0, 1);
119  buf.Write(&fTFA.fK, 1);
120 
121  buf.Write(&fResTol, 1);
122  buf.Write(&fIntegrTol, 1);
123  buf.Write(&fMaxNewton, 1);
124  buf.Write(&fMinLambda, 1);
125 
126  buf.Write(&fN.m_eps_t.fData[0], 6);
127  buf.Write(&fN.m_eps_p.fData[0], 6);
128  buf.Write(&fN.m_hardening, 1);
129 
130  // fPlasticMem does not need to be stored
131  }
132 
133  void Read(TPZStream& buf, void* context) override {
134  MOHRCOULOMBPARENT::Read(buf, context);
135 
136  buf.Read(&fYC.fPhi, 1);
137 
138  REAL lambda = fER.Lambda();
139  REAL mu = fER.Mu();
140  buf.Read(&lambda, 1);
141  buf.Read(&mu, 1);
142 
143  buf.Read(&fTFA.fSigmaYield0, 1);
144  buf.Read(&fTFA.fK, 1);
145 
146  buf.Read(&fResTol, 1);
147  buf.Read(&fIntegrTol, 1);
148  buf.Read(&fMaxNewton, 1);
149  buf.Read(&fMinLambda, 1);
150 
151  buf.Read(&fN.m_eps_t.fData[0], 6);
152  buf.Read(&fN.m_eps_p.fData[0], 6);
153  buf.Read(&fN.m_hardening, 1);
154 
155  fPlasticMem.Resize(0);
156  }
157 
158 
159 public:
160 
161  virtual int GetNYield() const {
162  return as_integer(NYield);
163  }
164 
165 };
166 
167 
168 #endif //TPZMohrCoulomb_H
TPZMohrCoulomb(const TPZMohrCoulomb &source)
Contains definitions to LOGPZ_DEBUG, LOGPZ_INFO, LOGPZ_WARN, LOGPZ_ERROR and LOGPZ_FATAL, and the implementation of the inline InitializePZLOG(string) function using log4cxx library or not. It must to be called out of "#ifdef LOG4CXX" scope.
static void ConventionalConcrete(TPZMohrCoulomb &material)
void Read(TPZStream &buf, void *context) override
std::underlying_type< Enumeration >::type as_integer(const Enumeration value)
Definition: pzreal.h:37
void Write(TPZStream &buf, int withclassid) const override
virtual void SetUp(const TPZTensor< REAL > &epsTotal) override
virtual void Print(std::ostream &out) const override
virtual const char * Name() const override
virtual int GetNYield() const
virtual void Write(const bool val)
Definition: TPZStream.cpp:8
static void TaludeMaterial(TPZMohrCoulomb &material)
void SetUp(REAL &cohesion, REAL &phi, REAL &hardening, REAL &young, REAL &poisson)
#define MOHRCOULOMBPARENT
int ClassId() const override
Defines the interface for saving and reading data. Persistency.
Definition: TPZStream.h:50
Extra utilities for TPZVec. Implementations of the saxpy, sscal, sdot, intercept, max and min functio...
TPZMohrCoulomb & operator=(const TPZMohrCoulomb &source)
virtual void Read(bool &val)
Definition: TPZStream.cpp:91