-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathInputs.h
87 lines (70 loc) · 1.42 KB
/
Inputs.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
#ifndef __INPUTS_H__
#define __INPUTS_H__
#include <string>
struct Geometry
{
// 计算域X,Y,Z方向长度 (m)
double XLen;
double YLen;
double ZLen;
};
struct PhysicalPropterties
{
// Thermal Conductivity of the bar (W/mK)
double k;
// 密度 kg/m^3
double rho;
// 比热容 J/kg/k
double cp;
// 动力粘度 kg/(m.s)
double mu;
};
struct Boundary
{
// Temperature at the left boundary (deg C)
double T_left;
// Temperature at the right boundary (deg C)
double T_right;
// Temperature at the bottom boundary (deg C)
double T_bottom;
// Temperature at the top boundary (deg C)
double T_top;
// 左边界热流密度 (W/m^2)
double q_w;
double U_left;
double U_right;
double U_top;
double U_bottom;
double V_left;
double V_right;
double V_top;
double V_bottom;
double p_left;
double p_right;
double p_top;
double p_bottom;
};
struct Source
{
// Heat source per unit volume (W/m3)
double S_bar;
};
class Inputs
{
public:
// Number of cells in the mesh
int Nx, Ny, Nz;
Geometry geometry;
// 物性
PhysicalPropterties physcial_properties;
// 边界
Boundary boundary;
// 源项
Source source;
public:
// To do ...
// 读取Inputs.dat中数据,给Inputs中数据赋值
Inputs(const std::string& FileName);
void initInputs();
};
#endif