26 STATE lambdaE = (poissonE * ElaE)/((1+poissonE)*(1-2*poissonE));
27 STATE muE = ElaE/(2*(1+poissonE));
29 STATE muVE = muE -(fDeltaT*muV)/(1+
fAlpha*fDeltaT);
30 STATE ElaVE = muVE*(3*lambdaVE+2*muVE)/(lambdaVE+muVE);
31 STATE PoissonVE = lambdaVE/(2*(lambdaVE+muVE));
32 if (lambdaVE < 0 || muVE < 0)
34 PZError <<
"lambdaVE and muVE must be positive. Check your constants values\n";
46 STATE lambdaE = (poissonE * ElaE)/((1+poissonE)*(1-2*poissonE));
47 STATE muE = ElaE/(2*(1+poissonE));
48 STATE lambdaV = (poissonV * ElaV)/((1+poissonV)*(1-2*poissonV));
49 STATE muV = ElaV/(2*(1+poissonV));
53 STATE muVE = muE -(fDeltaT*muV)/(1+
fAlpha*fDeltaT);
54 STATE ElaVE = muVE*(3*lambdaVE+2*muVE)/(lambdaVE+muVE);
55 STATE PoissonVE = lambdaVE/(2*(lambdaVE+muVE));
56 if (lambdaVE < 0 || muVE < 0)
58 PZError <<
"lambdaVE and muVE must be positive. Check your constants values\n";
77 const int phr = phi.
Rows();
82 if (rows < 6 || rows > 6)
91 for(in = 0; in < phr; in++)
95 val -= qsi(
_XX_,0) * dphi(0,in);
96 val -= qsi(
_XY_,0) * dphi(1,in);
97 val -= qsi(
_XZ_,0) * dphi(2,in);
99 ef(in*nstate+0,0) += weight *
val;
103 val -= qsi(
_XY_,0) * dphi(0,in);
104 val -= qsi(
_YY_,0) * dphi(1,in);
105 val -= qsi(
_YZ_,0) * dphi(2,in);
107 ef(in*nstate+1,0) += weight *
val;
111 val -= qsi(
_XZ_,0) * dphi(0,in);
112 val -= qsi(
_YZ_,0) * dphi(1,in);
113 val -= qsi(
_ZZ_,0) * dphi(2,in);
115 ef(in*nstate+2,0) += weight *
val;
128 if (numbersol != 1) {
132 DSolXYZ = data.
dsol[0];
136 Strain(
_XX_,0) = DSolXYZ(0,0);
137 Strain(
_YY_,0) = DSolXYZ(1,1);
138 Strain(
_ZZ_,0) = DSolXYZ(2,2);
139 Strain(
_XY_,0) = 0.5 * ( DSolXYZ(1,0) + DSolXYZ(0,1) );
140 Strain(
_XZ_,0) = 0.5 * ( DSolXYZ(2,0) + DSolXYZ(0,2) );
141 Strain(
_YZ_,0) = 0.5 * ( DSolXYZ(2,1) + DSolXYZ(1,2) );
181 PZError <<
"TPZViscoelastic::NSolutionVariables Error\n";
188 if (numbersol != 1) {
198 qsi(
_XX_,0)*= 1/(1+denominador);
199 qsi(
_XY_,0)*= 1/(1+denominador);
200 qsi(
_XZ_,0)*= 1/(1+denominador);
201 qsi(
_YY_,0)*= 1/(1+denominador);
202 qsi(
_YZ_,0)*= 1/(1+denominador);
203 qsi(
_ZZ_,0)*= 1/(1+denominador);
205 Stress(0,0) += qsi(
_XX_,0);
206 Stress(1,1) += qsi(
_YY_,0);
207 Stress(2,2) += qsi(
_ZZ_,0);
208 Stress(0,1) += qsi(
_XY_,0);
209 Stress(0,2) += qsi(
_XZ_,0);
210 Stress(1,0) += qsi(
_XY_,0);
211 Stress(1,2) += qsi(
_YZ_,0);
212 Stress(2,0) += qsi(
_XZ_,0);
213 Stress(2,1) += qsi(
_YZ_,0);
218 int numbersol = data.
sol.
size();
219 if (numbersol != 1) {
225 for(i = 0; i < 3; i++){
258 int64_t numiterations = 1000;
263 for (
int i=0; i<3; i++) {
267 if (result ==
false){
268 PZError << __PRETTY_FUNCTION__ <<
" - ERROR! - result = false - numiterations = " << numiterations <<
" - tol = " << tol << std::endl;
277 Solout[0] = Stress(0,0);
283 Solout[0] = Stress(1,1);
289 Solout[0] = Stress(2,2);
virtual bool SolveEigenvaluesJacobi(int64_t &numiterations, REAL &tol, TPZVec< TVar > *Sort=0)
Transforms this matrix in a diagonal matrix, where the diagonal values are its eigenvalues. This method is efficient only for small matrices.
virtual void ComputeStressTensor(TPZFMatrix< STATE > &Stress, TPZMaterialData &data) const override
This class implements a 3D isotropic elasticity material.
TPZGradSolVec dsol
vector of the derivatives of the solution at the integration point
void Write(TPZStream &buf, int withclassid) const override
Saves the element data to a stream.
REAL val(STATE &number)
Returns value of the variable.
Implements an abstract class implementing the memory features.
TPZFNMatrix< 220, REAL > phi
vector of shapefunctions (format is dependent on the value of shapetype)
void Read(TPZStream &buf, void *context) override
Reads the element data from a stream.
TPZFNMatrix< 660, REAL > dphix
values of the derivative of the shape functions
int64_t size() const
Returns the number of elements of the vector.
bool fUpdateMem
Flag to indicate whether the memory data are to be updated in an assemble loop.
void SetForce(TPZVec< STATE > force)
virtual void Write(const bool val)
virtual void FillDataRequirements(TPZMaterialData &data)
Fill material data parameter with necessary requirements for the.
#define DebugStop()
Returns a message to user put a breakpoint in.
int64_t Rows() const
Returns number of rows.
int NStateVariables() const override
Number of state variables.
int intGlobPtIndex
global point index
Full matrix class. Matrix.
int Redim(const int64_t newRows, const int64_t newCols) override
Redimension a matrix and ZERO your elements.
int32_t Hash(std::string str)
void ComputeStrainTensor(TPZFMatrix< STATE > &Strain, TPZFMatrix< STATE > &DSol) const
int ClassId() const override
Define the class id associated with the class.
void SetMaterialDataHook(REAL Ela, REAL poisson)
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.
Contains the TPZViscoelastic class which implements an isotropic viscoelasticity material.
STATE fLambdaV
viscoelasticity coeficients
void UpdateQsi(TPZMaterialData &data)
Defines the interface for saving and reading data. Persistency.
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)
virtual TPZFMatrix< STATE > & MemItem(const int i) const
TPZSolVec sol
vector of the solutions at the integration point
void SetMaterialDataHooke(STATE ElaE, STATE poissonE, STATE ElaV, STATE poissonV, STATE alpha, STATE deltaT, TPZVec< STATE > &force)
Set material Data with hooke constants.
Implements an interface to register a class id and a restore function. Persistence.
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.
#define PZError
Defines the output device to error messages and the DebugStop() function.
virtual void Read(bool &val)