-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathVarBox.h
143 lines (101 loc) · 2.87 KB
/
VarBox.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
#ifndef VARBOX_H
#define VARBOX_H
#include "Grid.h"
#include "silo.h"
#include<string>
#include<random>
#include <sstream>
using namespace std;
class VarBox {
public:
VarBox(Grid& grid);
VarBox(const VarBox& orig);
virtual ~VarBox();
void SetLamda(const double& a );
void SetMu(const double& a );
void SetRho(const double& a );
void SetCp(const double& a );
void UpdateBoudaryInsulation(vector<vector<double>> & in);
void EvaluateResidual(vector<vector<double>> & in, double& out );
void InitUVField_LidDriven();
void GenerateVar();
void SUD(vector<vector<double>> & in );
void outputsilo(const int& step);
string d2string(const double a);
int SolveNtime=5;
double Dt=5E30;
int MaxTimeStep=1;
double EOTHER=2.0;
double EUV=2.0;
int EveryOutPut=25;
int BreakStep=122200;
double Ttol=1e-7;
double UVtol=1e-7;
double Mtol=1e-7;
double Gx=0.0;
double Gy=-9.8;
double Beta=0.0;
double Treference=0.0;
void Show(vector<vector<double>> & in);
private:
Grid& AGrid;
vector<vector<double>> ArowM;
vector<vector<double>> ArowP;
vector<vector<double>> AcolM;
vector<vector<double>> AcolP;
vector<vector<double>> Ap;
vector<vector<double>> Con;
vector<vector<double>> UArowM;
vector<vector<double>> UArowP;
vector<vector<double>> UAcolM;
vector<vector<double>> UAcolP;
vector<vector<double>> UAp;
vector<vector<double>> UCon;
vector<vector<double>> VArowM;
vector<vector<double>> VArowP;
vector<vector<double>> VAcolM;
vector<vector<double>> VAcolP;
vector<vector<double>> VAp;
vector<vector<double>> VCon;
vector<vector<double>> MIU; // from 1 to L1
vector<vector<double>> MIV;
vector<vector<double>> U;
vector<vector<double>> V;
vector<vector<double>> T;
vector<vector<double>> P;
vector<vector<double>> Pc;
vector<vector<double>> Uold1;
vector<vector<double>> Vold1;
vector<vector<double>> Told1;
vector<vector<double>> Rho;
vector<vector<double>> Rhoold1;
vector<vector<double>> Mu;
vector<vector<double>> Lamda;
vector<vector<double>> Cp;
vector<vector<double>> RhoCp;
vector<vector<double>> Uhat;
vector<vector<double>> Vhat;
vector<vector<double>> Du;
vector<vector<double>> Dv;
vector<vector<double>> Tu;
vector<vector<double>> Tv;
vector<vector<double>> Tc;
vector<double>UResVec;
vector<double>VResVec;
vector<double>MResVec;
vector<double>TResVec;
int NTIMES=3;
double Time=0.0;
double TResidual=0.0;
double CResidual=0.0;
double PhiResidual=0.0;
double UResidual=0.0;
double VResidual=0.0;
double MResidual=0.0;
friend class Temperature;
friend class Solver;
friend class U;
friend class V;
friend class Pressure;
};
#endif /* VARBOX_H */