-
Notifications
You must be signed in to change notification settings - Fork 7
/
units.h
55 lines (50 loc) · 1.16 KB
/
units.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
#ifndef UNITS_2D_H
#define UNITS_2D_H
struct Units
{
/// physical units corresponding to one LB unit
double dx;
double dt;
double dm;
double rho;
double vis;
double u;
/// LB parameters
double omega;
double tau;
double nu;
double Re;
double u_lb;
public:
//creators
Units();
Units(const double dx_, const double tau_, const double rho_, const double vis_, const double u_);
Units& operator=(Units& rhs){
if (this != &rhs){
dx = rhs.dx;
dt = rhs.dt;
dm = rhs.dm;
rho = rhs.rho;
vis = rhs.vis;
u = rhs.u;
omega = rhs.omega;
tau = rhs.tau;
nu = rhs.nu;
Re = rhs.Re;
u_lb = rhs.u_lb;
}
return *this;
}
//manipulators
void setParameters(const std::string filename);
void calculateLBPara();
//void setStokesLBPara(double u_lb);
//accessors
inline const double getdX(){return dx;}
inline const double getdM(){return dm;}
inline const double getdT(){return dt;}
inline const double getRe(){return Re;}
inline const double getUlb(){return u_lb;}
inline const double getdRho(){return rho;}
};
#endif