-
Notifications
You must be signed in to change notification settings - Fork 0
/
LatticeSite.h
57 lines (50 loc) · 1.4 KB
/
LatticeSite.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#ifndef LATTICE_SITE_H
#define LATTICE_SITE_H
class LatticeSite
{
public:
enum SiteType {Fluid = 'f', Solid = 'b', Null = 'n'};
double f[9];
protected:
int q;
double force;
SiteType type;
double coef_force;
public:
LatticeSite();
virtual double fEq(int k, double rho, double u[2]) = 0;
virtual void computeRhoAndU(double& rho, double u[2]) = 0;
virtual void collide(double& rho, double& T, double u[2], double omega) = 0;
virtual void init(SiteType, double, double*, double) = 0;
bool isSolid();
bool isFluid();
void setType(SiteType t);
};
class VelSite : public LatticeSite
{
public:
static const int e[9][2];
private:
static const double w[9];
static const double pterm[9];
static const double lbda, gma, sigma;
double T0, g, beta;
public:
VelSite();
virtual void init(SiteType, double, double*, double);
virtual double fEq(int k, double rho, double u[2]);
virtual void computeRhoAndU(double& rho, double u[2]);
virtual void collide(double& rho, double& T, double u[2], double omega);
};
class ThermalSite : public LatticeSite
{
public:
static const int c[4][2];
ThermalSite();
virtual void init(SiteType, double, double*, double);
virtual double fEq(int k, double rho, double u[2]);
virtual void computeRhoAndU(double&, double u[2]);
virtual void computeRhoAndU(double& T);
virtual void collide(double &rho, double &T, double u[2], double omega);
};
#endif