NeoPZ
pzviscoelastic.h
Go to the documentation of this file.
1 
7 #ifndef TPZVISCOELASTIC_H
8 #define TPZVISCOELASTIC_H
9 
11 const int _XX_ = 0;
13 const int _XY_ = 1;
15 const int _XZ_ = 2;
17 const int _YY_ = 3;
19 const int _YZ_ = 4;
21 const int _ZZ_ = 5;
22 
23 
24 #include <iostream>
25 #include "pzfmatrix.h"
26 #include "pzvec.h"
27 #include <vector>
28 
29 #include "pzelast3d.h"
30 #include "TPZMatWithMem.h"
31 
38 class TPZViscoelastic : public TPZMatWithMem<TPZFMatrix<STATE>, TPZElasticity3D>
39 {
40 
41 public:
43 
48 
52  TPZViscoelastic(int id);
53 
58  TPZViscoelastic(int id,STATE ElaE, STATE poissonE, STATE lambdaV, STATE muV, STATE alpha, STATE deltaT, TPZVec <STATE> &force);
59 
64  void SetMaterialDataHooke(STATE ElaE, STATE poissonE, STATE ElaV, STATE poissonV, STATE alpha, STATE deltaT, TPZVec <STATE> &force);
65 
66 
67  virtual void Contribute(TPZMaterialData &data,
68  REAL weight,
70  TPZFMatrix<STATE> &ef) override;
71 
72  void UpdateQsi(TPZMaterialData &data);
73 
75  virtual int VariableIndex(const std::string &name) override;
76 
78  virtual int NSolutionVariables(int var) override;
79 
80  /*
81  Computes the stress.
82  Remember you cant update qsi if you want to calculate stress
83  */
84  virtual void ComputeStressTensor(TPZFMatrix<STATE> &Stress, TPZMaterialData &data) const override;
85 
87  virtual void Solution(TPZMaterialData &data, int var, TPZVec<STATE> &Solout) override;
88 
90  virtual void FillDataRequirements(TPZMaterialData &data) override;
91 
93  void Write(TPZStream &buf, int withclassid) const override;
94 
96  void Read(TPZStream &buf, void *context) override;
97 
98  public:
99 int ClassId() const override;
100 
101 
102 protected:
103 
107  STATE fAlpha;
108 
112  STATE fDeltaT;
113 
117  STATE fLambdaV;
118  STATE fmuV;
119 };
120 
121 #endif
const int _YZ_
const int _ZZ_
const int _XZ_
virtual void ComputeStressTensor(TPZFMatrix< STATE > &Stress, TPZMaterialData &data) const override
Templated vector implementation.
void Write(TPZStream &buf, int withclassid) const override
Saves the element data to a stream.
Implements an abstract class implementing the memory features.
Definition: TPZMatWithMem.h:23
Contains the TPZElasticity3D class which implements a 3D isotropic elasticity material.
void Read(TPZStream &buf, void *context) override
Reads the element data from a stream.
Contains TPZMatrixclass which implements full matrix (using column major representation).
const int _XY_
Contains the TPZMatWithMem class which implements the memory features.
int ClassId() const override
Define the class id associated with the class.
const int _XX_
STATE fDeltaT
the stability coeficient alpha
STATE fAlpha
the stability coeficient alpha
TPZViscoelastic()
Empty constructor.
virtual int NSolutionVariables(int var) override
Number of data of variable var.
This class implements an isotropic viscoelasticity material.
virtual void FillDataRequirements(TPZMaterialData &data) override
Fill material data parameter with necessary requirements for the Contribute method.
STATE fLambdaV
viscoelasticity coeficients
const int _YY_
void UpdateQsi(TPZMaterialData &data)
Defines the interface for saving and reading data. Persistency.
Definition: TPZStream.h:50
virtual int VariableIndex(const std::string &name) override
Returns index of post-processing variable.
virtual void Contribute(TPZMaterialData &data, REAL weight, TPZFMatrix< REAL > &ek, TPZFMatrix< REAL > &ef)
void SetMaterialDataHooke(STATE ElaE, STATE poissonE, STATE ElaV, STATE poissonV, STATE alpha, STATE deltaT, TPZVec< STATE > &force)
Set material Data with hooke constants.
virtual void Solution(TPZMaterialData &data, int var, TPZVec< STATE > &Solout) override
Returns the solution associated with the var index based on the finite element approximation.