NeoPZ
TPZMatPorous.h
Go to the documentation of this file.
1 
5 #ifndef PZPORO_H
6 #define PZPORO_H
7 
8 
9 #include "TPZMaterial.h"
10 #include "TPZMatTemporal.h"
11 #include "pzporoelastoplasticmem.h"
12 #include "TPZMatElastoPlastic.h"
13 #include "pzbndcond.h"
14 
15 #define TBASEPOROUS(T, TMEM) TPZMatElastoPlastic< T, TMEM >
16 
21 template <class T, class TMEM = TPZPoroElastoPlasticMem >
22 class TPZMatPorous : public TPZMatTemporal, public TPZMatElastoPlastic< T, TMEM >
23 {
24  public:
25 
26  enum SOLUTIONVARS{ENone = -1,
28 
30  TPZMatPorous();
31 
37  TPZMatPorous(int id);
38 
46  virtual ~TPZMatPorous();
47 
49  virtual std::string Name() override;
50 
59  void SetUp(const REAL &k, const REAL &Mu,
60  const REAL &StorageEps,
61  const REAL &Alpha,
62  const REAL &Rhof);
63 
65  virtual int Dimension() const override { return TBASEPOROUS(T, TMEM)::Dimension(); }
66 
68  virtual int NStateVariables() const override{ return TBASEPOROUS(T, TMEM)::NStateVariables() + 1; }
69 
71  virtual void Print(std::ostream &out = std::cout, const int memory = 0) override;
72 
74  virtual int VariableIndex(const std::string &name) override;
75 
78  virtual int NSolutionVariables(int var) override;
79 
82  virtual void Solution(TPZMaterialData &data, int var, TPZVec<REAL> &Solout) override;
83 
87  virtual int NFluxes() override
88  {
89  PZError << "TPZMatPorous<TBASEPOROUS(T, TMEM)>::NFluxes() - Method not implemented\n";
90  return 0;
91  }
92 
96  virtual void Flux(TPZVec<REAL> &x, TPZVec<REAL> &Sol, TPZFMatrix<REAL> &DSol, TPZFMatrix<REAL> &axes, TPZVec<REAL> &flux) override
97  {
98  PZError << "TPZMatPorous<TBASEPOROUS(T, TMEM)>::Flux - Method not implemented\n";
99  }
100 
104  virtual void Errors(TPZVec<REAL> &x,TPZVec<REAL> &u, TPZFMatrix<REAL> &dudx,
106  TPZVec<REAL> &u_exact,TPZFMatrix<REAL> &du_exact,TPZVec<REAL> &values) override;
111  virtual int NEvalErrors() override {return NStateVariables();}
112 
120  virtual void Contribute(TPZMaterialData &data, REAL weight, TPZFMatrix<REAL> &ek, TPZFMatrix<REAL> &ef) override;
121 
130  virtual void ContributeBC(TPZMaterialData &data, REAL weight, TPZFMatrix<REAL> &ek, TPZFMatrix<REAL> &ef, TPZBndCond &bc) override;
131 
138  virtual void Contribute(TPZMaterialData &data, REAL weight, TPZFMatrix<REAL> &ef) override;
139 
147  virtual void ContributeBC(TPZMaterialData &data, REAL weight, TPZFMatrix<REAL> &ef, TPZBndCond &bc) override;
148 
150  virtual TPZMaterial * NewMaterial() override;
151 
153  public:
154 virtual int ClassId() const override;
155 
156 
158  virtual void Write(TPZStream &buf, int withclassid) const override;
159 
161  virtual void Read(TPZStream &buf, void *context) override;
162 
167  virtual void FillDataRequirements(TPZMaterialData &data) override;
168 
170  void ComputePorePressure(TPZMaterialData & data, REAL & Pp, TPZVec<REAL> & dPp);
171 
173  void UpdatePorePressure(TPZMaterialData & data);
174 
176  void SetPorePressure(const REAL Pp);
177 
178 protected:
179 
181  REAL fk;
182 
184  REAL fMu;
185 
188 
191 
193  REAL fRhof;
194 
195 };
196 
197 template <class T, class TMEM>
199  return Hash("TPZMatPorous") ^ TPZMatTemporal::ClassId() << 1 ^ TPZMatElastoPlastic<T, TMEM>::ClassId() << 2;
200 }
201 #endif
virtual void Flux(TPZVec< REAL > &x, TPZVec< REAL > &Sol, TPZFMatrix< REAL > &DSol, TPZFMatrix< REAL > &axes, TPZVec< REAL > &flux) override
Definition: TPZMatPorous.h:96
virtual int NSolutionVariables(int var) override
virtual void Contribute(TPZMaterialData &data, REAL weight, TPZFMatrix< REAL > &ek, TPZFMatrix< REAL > &ef) override
TPZManVector< REAL, 3 > x
value of the coordinate at the integration point
clarg::argBool bc("-bc", "binary checkpoints", false)
virtual void Write(TPZStream &buf, int withclassid) const override
virtual std::string Name() override
virtual int VariableIndex(const std::string &name) override
virtual void Read(TPZStream &buf, void *context) override
void SetPorePressure(const REAL Pp)
void SetUp(const REAL &k, const REAL &Mu, const REAL &StorageEps, const REAL &Alpha, const REAL &Rhof)
Initializes the poroelastic material coefficients.
virtual void Solution(TPZMaterialData &data, int var, TPZVec< REAL > &Solout) override
This abstract class defines the behaviour which each derived class needs to implement.
Definition: TPZMaterial.h:39
virtual void FillDataRequirements(TPZMaterialData &data) override
Contains the TPZBndCond class which implements a boundary condition for TPZMaterial objects...
Implements an porous media material to be used together with elastic elastoplastic mechanical counter...
Definition: TPZMatPorous.h:22
void UpdatePorePressure(TPZMaterialData &data)
virtual void ContributeBC(TPZMaterialData &data, REAL weight, TPZFMatrix< REAL > &ek, TPZFMatrix< REAL > &ef, TPZBndCond &bc) override
This class defines the boundary condition for TPZMaterial objects.
Definition: pzbndcond.h:29
#define TBASEPOROUS(T, TMEM)
Definition: TPZMatPorous.h:15
TPZFNMatrix< 9, REAL > axes
axes indicating the directions of the derivatives of the shapefunctions
int32_t Hash(std::string str)
Definition: TPZHash.cpp:10
virtual int NFluxes() override
Definition: TPZMatPorous.h:87
virtual void Errors(TPZVec< REAL > &x, TPZVec< REAL > &u, TPZFMatrix< REAL > &dudx, TPZFMatrix< REAL > &axes, TPZVec< REAL > &flux, TPZVec< REAL > &u_exact, TPZFMatrix< REAL > &du_exact, TPZVec< REAL > &values) override
virtual int ClassId() const override
virtual void Print(std::ostream &out=std::cout, const int memory=0) override
virtual ~TPZMatPorous()
Default destructor.
Defines the interface for saving and reading data. Persistency.
Definition: TPZStream.h:50
def values
Definition: rdt.py:119
virtual int NEvalErrors() override
Definition: TPZMatPorous.h:111
virtual TPZMaterial * NewMaterial() override
void ComputePorePressure(TPZMaterialData &data, REAL &Pp, TPZVec< REAL > &dPp)
int ClassId() const override
virtual int NStateVariables() const override
Definition: TPZMatPorous.h:68
virtual int Dimension() const override
Definition: TPZMatPorous.h:65
#define PZError
Defines the output device to error messages and the DebugStop() function.
Definition: pzerror.h:15
virtual int ClassId() const override
Definition: TPZMatPorous.h:198