NeoPZ
pzincnskeps.h
Go to the documentation of this file.
1 
6 #ifndef PZINCNSKEPS
7 #define PZINCNSKEPS
8 
9 #include "TPZMaterial.h"
10 
11 #include <iostream>
12 #include <string>
13 
14 #ifdef _AUTODIFF
15 #include "fadType.h"
16 #endif
17 
18 class TPZBndCond;
19 
36 
37 private:
38 
40 
42 
43  TPZVec<STATE> fBodyForce; //fc = {0,0,-fc}
44 
47 
49  STATE Dot(TPZVec<STATE> &A, TPZFMatrix<STATE> &B, int BRow);
50 
52  STATE Dot(TPZVec<STATE> &A, TPZVec<STATE> &B);
53 
54 public:
55 
57 
58  TPZIncNavierStokesKEps(int id, int dimension);
59 
60  void SetParameters(STATE MU, STATE RHO, STATE Cmu, STATE SigmaK, STATE SigmaEps, STATE Cepsilon1, STATE Cepsilon2, TPZVec<STATE> &BodyForce );
61 
62  void GetParameters(STATE &MU, STATE &RHO, STATE &Cmu, STATE &SigmaK, STATE &SigmaEps, STATE &Cepsilon1, STATE &Cepsilon2, TPZVec<STATE> &BodyForce );
63 
64  virtual ~TPZIncNavierStokesKEps();
65 
66  virtual int Dimension() const override;
67 
69  virtual int NStateVariables() const override;
70 
72  virtual void Print(std::ostream &out = std::cout) override;
73 
76  virtual int NSolutionVariables(int var) override;
77 
78 protected:
80  virtual void Solution(TPZVec<STATE> &Sol, TPZFMatrix<STATE> &DSol,
81  TPZFMatrix<REAL> &axes, int var, TPZVec<STATE> &Solout) override;
82 public:
84  virtual void Solution(TPZMaterialData &data, int var, TPZVec<STATE> &Solout) override
85  {
86  TPZMaterial::Solution(data,var,Solout);
87  }
88 
89 
91  virtual void Contribute(TPZMaterialData &data,
92  REAL weight,
94  TPZFMatrix<STATE> &ef) override;
95 
97  virtual void Contribute(TPZMaterialData &data,
98  REAL weight,
99  TPZFMatrix<STATE> &ef) override;
100 
101 
103  virtual void ContributeBC(TPZMaterialData &data,
104  REAL weight,
105  TPZFMatrix<STATE> &ek,
106  TPZFMatrix<STATE> &ef,
107  TPZBndCond &bc) override;
108 
110  virtual void ContributeBC(TPZMaterialData &data,
111  REAL weight,
112  TPZFMatrix<STATE> &ef,
113  TPZBndCond &bc) override
114  {
115  TPZMaterial::ContributeBC(data,weight,ef,bc);
116  }
117 
118 
123  virtual void Errors(TPZVec<REAL> &x, TPZVec<STATE> &sol, TPZFMatrix<STATE> &dsol,
124  TPZFMatrix<REAL> &axes, TPZVec<STATE> &flux,
125  TPZVec<STATE> &uexact, TPZFMatrix<STATE> &duexact,
126  TPZVec<REAL> &val) override {
127  PZError << __PRETTY_FUNCTION__ << std::endl;
128  PZError << "Method not implemented! Error comparison not available. Please, implement it." << std::endl;
129  }
130  public:
131 virtual int ClassId() const override;
132 
133 };
134 
135 
136 #endif
137 
virtual void Solution(TPZMaterialData &data, int var, TPZVec< STATE > &Solout)
Returns the solution associated with the var index based on the finite element approximation.
clarg::argBool bc("-bc", "binary checkpoints", false)
virtual int ClassId() const override
Define the class id associated with the class.
clarg::argInt dimension("-d", "Matrices dimension M x M", 1000)
TPZIncNavierStokesKEps(int id, int dimension)
Definition: pzincnskeps.cpp:8
virtual int NSolutionVariables(int var) override
Returns the number of variables associated with the variable indexed by var. var is obtained by cal...
Definition: pzincnskeps.cpp:50
REAL val(STATE &number)
Returns value of the variable.
Definition: pzartdiff.h:23
This abstract class defines the behaviour which each derived class needs to implement.
Definition: TPZMaterial.h:39
virtual void Solution(TPZVec< STATE > &Sol, TPZFMatrix< STATE > &DSol, TPZFMatrix< REAL > &axes, int var, TPZVec< STATE > &Solout) override
Returns the solution associated with the var index based on the finite element approximation.
Definition: pzincnskeps.cpp:57
void GetParameters(STATE &MU, STATE &RHO, STATE &Cmu, STATE &SigmaK, STATE &SigmaEps, STATE &Cepsilon1, STATE &Cepsilon2, TPZVec< STATE > &BodyForce)
Definition: pzincnskeps.cpp:27
virtual ~TPZIncNavierStokesKEps()
Definition: pzincnskeps.cpp:14
This class defines the boundary condition for TPZMaterial objects.
Definition: pzbndcond.h:29
virtual void Contribute(TPZMaterialData &data, REAL weight, TPZFMatrix< STATE > &ek, TPZFMatrix< STATE > &ef) override
Computes contribution to the tangent matrix and residual at an integration point. ...
Definition: pzincnskeps.cpp:87
virtual void ContributeBC(TPZMaterialData &data, REAL weight, TPZFMatrix< STATE > &ef, TPZBndCond &bc) override
Computes contribution to the stiffness matrix and right hand side at the integration point of a bound...
Definition: pzincnskeps.h:110
virtual void ContributeBC(TPZMaterialData &data, REAL weight, TPZFMatrix< STATE > &ek, TPZFMatrix< STATE > &ef, TPZBndCond &bc)=0
It computes a contribution to the stiffness matrix and load vector at one BC integration point...
virtual int NStateVariables() const override
Returns the number of state variables associated with the material.
Definition: pzincnskeps.cpp:42
virtual void ContributeBC(TPZMaterialData &data, REAL weight, TPZFMatrix< STATE > &ek, TPZFMatrix< STATE > &ef, TPZBndCond &bc) override
Computes contribution to the stiffness matrix and right hand side at the integration point of a bound...
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.
Definition: pzincnskeps.h:84
virtual void Errors(TPZVec< REAL > &x, TPZVec< STATE > &sol, TPZFMatrix< STATE > &dsol, TPZFMatrix< REAL > &axes, TPZVec< STATE > &flux, TPZVec< STATE > &uexact, TPZFMatrix< STATE > &duexact, TPZVec< REAL > &val) override
Computes the error due to the difference between the interpolated flux and the flux computed based o...
Definition: pzincnskeps.h:123
TPZVec< STATE > fBodyForce
Definition: pzincnskeps.h:43
void SetParameters(STATE MU, STATE RHO, STATE Cmu, STATE SigmaK, STATE SigmaEps, STATE Cepsilon1, STATE Cepsilon2, TPZVec< STATE > &BodyForce)
Definition: pzincnskeps.cpp:16
virtual int Dimension() const override
Returns the integrable dimension of the material.
Definition: pzincnskeps.cpp:38
This class implements an imcompressible Navier-Stokes formulation with modified KEpsilon turbulence m...
Definition: pzincnskeps.h:35
virtual void Print(std::ostream &out=std::cout) override
Print out the data associated with the material.
Definition: pzincnskeps.cpp:46
STATE Dot(TPZFMatrix< STATE > &A, TPZFMatrix< STATE > &B)
Dot for matrices with same dimensions. No consistence test is made.
#define PZError
Defines the output device to error messages and the DebugStop() function.
Definition: pzerror.h:15