-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathparams.h
More file actions
133 lines (123 loc) · 3.69 KB
/
Copy pathparams.h
File metadata and controls
133 lines (123 loc) · 3.69 KB
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
// for 3D simulation of isolated vortex with a hump
#ifndef PARAMS_H
#define PARAMS_H
#include "CAD2D/BLAirfoil.h"
#include "CAD2D/BLEllipse.h"
#include "CAD2D/BLFlatPlate.h"
#include <map>
#include <string>
BLMeshModuleShPtr BLModel;
double ChordLen = 1.0;
void DefineBLParams(std::map<std::string, double> &p,
std::map<std::string, int> &q) {
double AoA = 0. / 180. * M_PI;
p["AoA"] = AoA;
double Thickness = 0.12;
p["Thickness"] = Thickness;
p["ChordLen"] = ChordLen;
p["TEThickness"] = 0.00252;
// outside
double hFirstLayer = 0.0025;
p["hFirstLayer"] = hFirstLayer;
double progress = 1.2;
p["progress"] = progress;
double upperBL0 = 0.02;
p["upperBL0"] = upperBL0;
double upperBL1 = 0.02;
p["upperBL1"] = upperBL1;
double upperBL2 = 0.02;
p["upperBL2"] = upperBL2;
double upperBL3 = 0.02;
p["upperBL3"] = upperBL3;
double upperBL4 = 0.02;
p["upperBL4"] = upperBL4;
double upperBL5 = 0.01;
p["upperBL5"] = upperBL5;
double lowerBL0 = 0.02;
p["lowerBL0"] = lowerBL0;
double lowerBL1 = 0.02;
p["lowerBL1"] = lowerBL1;
double lowerBL2 = 0.02;
p["lowerBL2"] = lowerBL2;
double lowerBL3 = 0.02;
p["lowerBL3"] = lowerBL3;
double lowerBL4 = 0.02;
p["lowerBL4"] = lowerBL4;
double lowerBL5 = 0.01;
p["lowerBL5"] = lowerBL5;
double maxLayerh = 0.035;
p["maxLayerh"] = maxLayerh;
double upperx1 = 0.1;
p["upperx1"] = upperx1;
double upperx2 = ChordLen * 0.5;
p["upperx2"] = upperx2;
double upperx3 = ChordLen - 0.1;
p["upperx3"] = upperx3;
double lowerx1 = 0.1;
p["lowerx1"] = lowerx1;
double lowerx2 = ChordLen * 0.5;
p["lowerx2"] = lowerx2;
double lowerx3 = ChordLen - 0.1;
p["lowerx3"] = lowerx3;
// number starts from leading to trailing
int nUp0 = std::max(int(0.5 * upperBL0 * M_PI / maxLayerh + 0.5), 6);
q["nUp0"] = nUp0;
int nUp1 = (upperx1) / maxLayerh + 8;
q["nUp1"] = nUp1;
int nUp2 = (upperx2 - upperx1) / maxLayerh + 4;
q["nUp2"] = nUp2;
int nUp3 = (upperx3 - upperx2) / maxLayerh + 4;
q["nUp3"] = nUp3;
int nUp4 = (ChordLen - upperx3) / maxLayerh + 8;
q["nUp4"] = nUp4;
double radiusTE = p["TEThickness"] * 0.5 + upperBL5;
int nUp5 =
std::min(10, std::max(int(0.5 * radiusTE * M_PI / maxLayerh + 0.5), 4));
q["nUp5"] = nUp5;
int nLow0 = std::max(int(0.5 * lowerBL0 * M_PI / maxLayerh + 0.5), 6);
q["nLow0"] = nLow0;
int nLow1 = (lowerx1) / maxLayerh + 8;
q["nLow1"] = nLow1;
int nLow2 = (lowerx2 - lowerx1) / maxLayerh + 4;
q["nLow2"] = nLow2;
int nLow3 = (lowerx3 - lowerx2) / maxLayerh + 4;
q["nLow3"] = nLow3;
int nLow4 = (ChordLen - lowerx3) / maxLayerh + 8;
q["nLow4"] = nLow4;
radiusTE = p["TEThickness"] * 0.5 + lowerBL5;
int nLow5 =
std::min(30, std::max(int(0.5 * radiusTE * M_PI / maxLayerh + 0.5), 4));
q["nLow5"] = nLow5;
int curvedpts = 6;
q["curvedpts"] = curvedpts;
q["NACAFOIL"] = 1;
q["CutFore"] = 1;
BLModel = std::make_shared<BLAirfoil>(p, q);
BLModel->Initialise();
}
double nearmaxLayerh = 0.05;
double nearBoxLeft = -0.3;
double nearBoxRight = ChordLen + 0.2;
double nearBoxDown = -0.3;
double nearBoxUp = 0.3;
double nearAoA = 0.;
double neargap = nearmaxLayerh;
double maxLayerhWake = 0.08;
double farWakeAoA = 0.;
double wakeDiffuseAngle = 10. / 180. * M_PI;
double wakedist = maxLayerhWake;
double farWakeCx = nearBoxRight + wakedist * cos(farWakeAoA);
double farWakeCy = wakedist * sin(farWakeAoA);
double farWakeHeight = 1.6;
double farWakeLength = 6.;
int nFarWakey = farWakeHeight / maxLayerhWake + 0.5;
int nFarWakex = farWakeLength / maxLayerhWake / 1.5;
double xBoxLeft = -24.;
double xBoxRight = 36.;
double yBoxUp = 24.;
double yBoxDown = -24.;
int nBoxLeft = 10;
int nBoxRight = 10;
int nBoxUp = 10;
int nBoxDown = 10;
#endif