Bidimensional Laminar Ow Around A Circular Cylinder: 3.1 Description of The Case
Bidimensional Laminar Ow Around A Circular Cylinder: 3.1 Description of The Case
Bidimensional Laminar Ow Around A Circular Cylinder: 3.1 Description of The Case
3.2 Hypotheses
• Incompressible flow
• Laminar flow
• Newtonian flow
∂
• Bidimensional flow ( ∂z = 0)
∂U 1 µ
+ U · ∇U = − ∇p + ∇2 U (3.2)
∂t ρ ρ
wD
St = (3.4)
2π|U|
FD
CD = (3.5)
1
ρ|U|2 S
2
The behaviour of the flow around a circular cylinder is very complex and highly de-
pendent on the Reynolds number. The boundary layer in laminar regimes detaches
at an angle of θ = 82o as a consequence of the existence of an adverse pressure
gradient. Furthermore, due to the symmetry of the cylinder, a curious phenomenon
appears named von Kármán street, consisting of alternate vortices emitted by the
cylinder. The vortices are detached periodically and their frequence is directly re-
lated to the Strouhal number.
For external flow, the transition from laminar regime to turbulent regime occurs at
Re ≈ 3 × 105 . However, the very complex structure of vortex shedding deserves
special mention; the relation between the behaviour of the flow and the Reynolds
number is shown at Figure 3.2:
Figure 3.2: Flow structure depending on the Reynolds number, extracted from [2]
As the simulation is going to be run with laminar flow, the Reynolds number is not
going to be set higher than 195. This will allow to observe the von Kármán street
and its transition while guaranteeing that the whole fluid domain remains laminar.
Additionally, another simulation with Re = 30 will be run to check if the results of
the CFD simulation adapt to the scheme shown at Figure 3.2.
The drag coefficient is a function of the Reynolds number and decreases when the
regime turns to turbulent. It can be seen at Figure 3.3.
The mesh for the study of the cylinder is not going to be uniform. Some areas of
the domain need to contain a higher cell density (mainly the walls of the cylinder
and its prolongation). Consequently, it is necessary to divide the domain in different
blocks as Figure 3.4 shows.
Figure 3.4: Half of the scheme used for the creation of the mesh, extracted from [1]
In Figure 3.4 there is only half of the mesh, which is contained between z = −0.05
m and z = 0.05 m. The numbers indicate the numbering used for the vertices and
the blocks in the blockMeshDict file.
In the bidimensional cylinder case, constant/blockMeshDict must contain the follow-
ing instructions:
1 /∗−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−∗− C++ −∗−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−∗\
2 | ========= | |
3 | \\ / F ield | OpenFOAM: The Open S o u r c e CFD Toolbox |
4 | \\ / O peration | Version : 2.2.1 |
5 | \\ / A nd | Web : www.OpenFOAM. o r g |
6 | \\/ M anipulation | |
7 \∗−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−∗/
8 FoamFile
9 {
10 version 2.0;
11 format ascii ;
12 class dictionary ;
13 object bl ock M e sh Dic t ;
14 }
15 // ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ //
16
17 convertToMeters 0 . 1 ;
18
19 vertices
20 (
21 ( 0 . 5 0 −0.5)
22 ( 1 0 −0.5)
23 ( 1 0 0 −0.5)
24 ( 1 0 0 . 7 0 7 1 0 7 −0.5)
25 ( 0 . 7 0 7 1 0 7 0 . 7 0 7 1 0 7 −0.5)
26 ( 0 . 3 5 3 5 5 3 0 . 3 5 3 5 5 3 −0.5)
27 ( 1 0 2 −0.5)
28 ( 0 . 7 0 7 1 0 7 2 −0.5)
29 ( 0 2 −0.5)
30 ( 0 1 −0.5)
31 ( 0 0 . 5 −0.5)
32
33 ( −0.5 0 −0.5)
34 (−1 0 −0.5)
35 (−2 0 −0.5)
36 (−2 0 . 7 0 7 1 0 7 −0.5)
37 ( −0.707107 0 . 7 0 7 1 0 7 −0.5)
38 ( −0.353553 0 . 3 5 3 5 5 3 −0.5)
39 (−2 2 −0.5)
40 ( −0.707107 2 −0.5)
41
42 (0.5 0 0.5)
43 (1 0 0 . 5 )
44 (10 0 0 . 5 )
45 (10 0.707107 0 . 5 )
46 (0.707107 0.707107 0.5)
47 (0.353553 0.353553 0.5)
48 (10 2 0 . 5 )
49 (0.707107 2 0.5)
50 (0 2 0 . 5 )
51 (0 1 0 . 5 )
52 (0 0.5 0 . 5 )
53
54 ( −0.5 0 0 . 5 )
55 (−1 0 0 . 5 )
56 (−2 0 0 . 5 )
57 (−2 0 . 7 0 7 1 0 7 0 . 5 )
58 ( −0.707107 0 . 7 0 7 1 0 7 0 . 5 )
59 ( −0.353553 0 . 3 5 3 5 5 3 0 . 5 )
60 (−2 2 0 . 5 )
61 ( −0.707107 2 0 . 5 )
62
63
64 ( 1 0 −0.707107 −0.5)
65 ( 0 . 7 0 7 1 0 7 −0.707107 −0.5)
66 ( 0 . 3 5 3 5 5 3 −0.353553 −0.5)
67 ( 1 0 −2 −0.5)
68 ( 0 . 7 0 7 1 0 7 −2 −0.5)
69 ( 0 −2 −0.5)
70 ( 0 −1 −0.5)
71 ( 0 −0.5 −0.5)
72
73 (−2 −0.707107 −0.5)
74 ( −0.707107 −0.707107 −0.5)
75 ( −0.353553 −0.353553 −0.5)
76 (−2 −2 −0.5)
77 ( −0.707107 −2 −0.5)
78
79 ( 1 0 −0.707107 0 . 5 )
80 ( 0 . 7 0 7 1 0 7 −0.707107 0 . 5 )
81 ( 0 . 3 5 3 5 5 3 −0.353553 0 . 5 )
82 ( 1 0 −2 0 . 5 )
83 ( 0 . 7 0 7 1 0 7 −2 0 . 5 )
84 ( 0 −2 0 . 5 )
85 ( 0 −1 0 . 5 )
86 ( 0 −0.5 0 . 5 )
87
88 (−2 −0.707107 0 . 5 )
89 ( −0.707107 −0.707107 0 . 5 )
90 ( −0.353553 −0.353553 0 . 5 )
91 (−2 −2 0 . 5 )
92 ( −0.707107 −2 0 . 5 )
93 );
94
95 blocks
96 (
97 hex ( 5 4 9 10 24 23 28 2 9 ) ( 8 0 20 1 ) s i m p l e G r a d i n g ( 1 0 1 1 )
98 hex ( 0 1 4 5 19 20 23 2 4 ) ( 8 0 20 1 ) s i m p l e G r a d i n g ( 1 0 1 1 )
99 hex ( 1 2 3 4 20 21 22 2 3 ) ( 2 0 0 20 1 ) s i m p l e G r a d i n g ( 1 1 1 )
100 hex ( 4 3 6 7 23 22 25 2 6 ) ( 2 0 0 40 1 ) s i m p l e G r a d i n g ( 1 1 1 )
101 hex ( 9 4 7 8 28 23 26 2 7 ) ( 2 0 40 1 ) s i m p l e G r a d i n g ( 1 1 1 )
102 hex ( 1 6 10 9 15 35 29 28 3 4 ) ( 2 0 80 1 ) s i m p l e G r a d i n g ( 1 10 1 )
103 hex ( 1 1 16 15 12 30 35 34 3 1 ) ( 2 0 80 1 ) s i m p l e G r a d i n g ( 1 10 1 )
104 hex ( 1 2 15 14 13 31 34 33 3 2 ) ( 2 0 20 1 ) s i m p l e G r a d i n g ( 1 1 1 )
105 hex ( 1 5 18 17 14 34 37 36 3 3 ) ( 4 0 20 1 ) s i m p l e G r a d i n g ( 1 1 1 )
106 hex ( 9 8 18 15 28 27 37 3 4 ) ( 4 0 20 1 ) s i m p l e G r a d i n g ( 1 1 1 )
107
108
109 hex ( 4 0 45 44 39 53 58 57 5 2 ) ( 2 0 80 1 ) s i m p l e G r a d i n g ( 1 10 1 )
110 hex ( 0 40 39 1 19 53 52 2 0 ) ( 2 0 80 1 ) s i m p l e G r a d i n g ( 1 10 1 )
111 hex ( 1 39 38 2 20 52 51 2 1 ) ( 2 0 200 1 ) s i m p l e G r a d i n g ( 1 1 1 )
112 hex ( 3 9 42 41 38 52 55 54 5 1 ) ( 4 0 200 1 ) s i m p l e G r a d i n g ( 1 1 1 )
113 hex ( 4 4 43 42 39 57 56 55 5 2 ) ( 4 0 20 1 ) s i m p l e G r a d i n g ( 1 1 1 )
114 hex ( 4 8 47 44 45 61 60 57 5 8 ) ( 8 0 20 1 ) s i m p l e G r a d i n g ( 1 0 1 1 )
115 hex ( 1 1 12 47 48 30 31 60 6 1 ) ( 8 0 20 1 ) s i m p l e G r a d i n g ( 1 0 1 1 )
116 hex ( 1 2 13 46 47 31 32 59 6 0 ) ( 2 0 20 1 ) s i m p l e G r a d i n g ( 1 1 1 )
117 hex ( 4 7 46 49 50 60 59 62 6 3 ) ( 2 0 40 1 ) s i m p l e G r a d i n g ( 1 1 1 )
118 hex ( 4 4 47 50 43 57 60 63 5 6 ) ( 2 0 40 1 ) s i m p l e G r a d i n g ( 1 1 1 )
119 );
120
121 edges
122 (
123 arc 0 5 ( 0 . 4 6 9 8 4 6 0 . 1 7 1 0 1 −0.5)
124 arc 5 10 ( 0 . 1 7 1 0 1 0 . 4 6 9 8 4 6 −0.5)
125 arc 1 4 ( 0 . 9 3 9 6 9 3 0 . 3 4 2 0 2 −0.5)
126 arc 4 9 ( 0 . 3 4 2 0 2 0 . 9 3 9 6 9 3 −0.5)
127 arc 19 24 ( 0 . 4 6 9 8 4 6 0 . 1 7 1 0 1 0 . 5 )
128 arc 24 29 ( 0 . 1 7 1 0 1 0 . 4 6 9 8 4 6 0 . 5 )
129 arc 20 23 ( 0 . 9 3 9 6 9 3 0 . 3 4 2 0 2 0 . 5 )
130 arc 23 28 ( 0 . 3 4 2 0 2 0 . 9 3 9 6 9 3 0 . 5 )
131 arc 11 16 ( −0.469846 0 . 1 7 1 0 1 −0.5)
132 arc 16 10 ( −0.17101 0 . 4 6 9 8 4 6 −0.5)
133 arc 12 15 ( −0.939693 0 . 3 4 2 0 2 −0.5)
134 arc 15 9 ( −0.34202 0 . 9 3 9 6 9 3 −0.5)
135 arc 30 35 ( −0.469846 0 . 1 7 1 0 1 0 . 5 )
136 arc 35 29 ( −0.17101 0 . 4 6 9 8 4 6 0 . 5 )
137 arc 31 34 ( −0.939693 0 . 3 4 2 0 2 0 . 5 )
138 arc 34 28 ( −0.34202 0 . 9 3 9 6 9 3 0 . 5 )
139
140
141 a r c 0 40 ( 0 . 4 6 9 8 4 6 −0.17101 −0.5)
142 a r c 40 45 ( 0 . 1 7 1 0 1 −0.469846 −0.5)
143 a r c 1 39 ( 0 . 9 3 9 6 9 3 −0.34202 −0.5)
201 t y p e patch ;
202 faces
203 (
204 ( 2 3 22 2 1 )
205 ( 3 6 25 2 2 )
206
207 ( 3 8 51 21 2 )
208 ( 4 1 54 51 3 8 )
209 );
210 }
211
212 cylinder
213 {
214 type wall ;
215 faces
216 (
217 ( 1 0 5 24 2 9 )
218 ( 5 0 19 2 4 )
219 ( 1 6 10 29 3 5 )
220 ( 1 1 16 35 3 0 )
221
222 ( 4 8 11 30 6 1 )
223 ( 4 5 48 61 5 8 )
224 ( 4 0 45 58 5 3 )
225 ( 0 40 53 1 9 )
226 );
227 }
228
229 frontAndBack
230 {
231 t y p e empty ;
232 faces
233 (
234 ( 5 10 9 4 )
235 ( 2 4 23 28 2 9 )
236 (0 5 4 1)
237 ( 1 9 20 23 2 4 )
238 (1 4 3 2)
239 ( 2 0 21 22 2 3 )
240 (4 7 6 3)
241 ( 2 3 22 25 2 6 )
242 (4 9 8 7)
243 ( 2 8 23 26 2 7 )
244 ( 1 6 15 9 1 0 )
245 ( 3 5 29 28 3 4 )
246 ( 1 2 15 16 1 1 )
247 ( 3 1 30 35 3 4 )
248 ( 1 3 14 15 1 2 )
249 ( 3 2 31 34 3 3 )
250 ( 1 4 17 18 1 5 )
251 ( 3 3 34 37 3 6 )
252 ( 1 5 18 8 9 )
253 ( 3 4 28 27 3 7 )
254
255 ( 4 5 40 39 4 4 )
256 ( 5 8 57 52 5 3 )
257 (40 0 1 39)
258 (53 52 20 1 9 )
259 (39 1 2 38)
260 (52 51 21 2 0 )
261 (39 38 41 4 2 )
262 (52 55 54 5 1 )
263 (44 39 42 4 3 )
264 (57 56 55 5 2 )
265 (47 48 45 4 4 )
266 (60 57 58 6 1 )
267 (12 11 48 4 7 )
268 (31 60 61 3 0 )
269 (13 12 47 4 6 )
270 (32 59 60 3 1 )
271 (49 46 47 5 0 )
272 (62 63 60 5 9 )
273 (50 47 44 4 3 )
274 (63 56 57 6 0 )
275 );
276 }
277 );
278
279 mergePatchPairs
280 (
281 );
282
283 // ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ //
It can be seen that as the cylinder has curved edges, it is necessary to use the
arc instruction to obtain the circular geometry. This instruction must be followed
by the labels of the connected vertices and an interpolation point contained in the
trajectory of the arc.
In the current blockMeshDict there are four different types of patches: wall, empty ,
symmetryPlane and patch. All were used in the plane-parallel plates case except
symmetryPlane, which is used in the top and bottom patches of the current case to
indicate that there are no physical walls in the top and bottom borders; the flow
must behave as if the domain would extend infinitely in the y-direction.
After running blockMesh and checking the results with checkMesh it is possible to
observe the mesh with ParaView.
Caution:
It is necessary to have the majority of the required files for the simula-
tion within the case directory to create the mesh. Wait until the three
main directories (0 , constant and system) and their files are ready to
run blockMesh. Otherwise, it is also possible to use a solved case as a
dummy file to run blockMesh
Figure 3.7: Detail of the mesh gradation on the walls of the bidimensional cylinder
case
Advice:
The files (located in 0 ) containing the information related to the pressure and the
velocity fields are the following:
1 /∗−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−∗− C++ −∗−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−∗\
2 | ========= | |
3 | \\ / F ield | OpenFOAM: The Open S o u r c e CFD Toolbox |
4 | \\ / O peration | Version : 2.2.1 |
5 | \\ / A nd | Web : www.OpenFOAM. o r g |
6 | \\/ M anipulation | |
7 \∗−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−∗/
8 FoamFile
9 {
10 version 2.0;
11 format ascii ;
12 class volScalarField ;
13 object p;
14 }
15 // ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ //
16
17 dimensions [ 0 2 −2 0 0 0 0 ] ;
18
19 internalField uniform 0 ;
20
21 boundaryField
22 {
23 top
24 {
25 type symmetryPlane ;
26 }
27
28 bottom
29 {
30 type symmetryPlane ;
31 }
32
33 inlet
34 {
35 type freestreamPressure ;
36 }
37
38 outlet
39 {
40 type freestreamPressure ;
41 }
42
43 frontAndBack
44 {
45 type empty ;
46 }
47
48 cylinder
49 {
50 type zeroGradient ;
51 }
52 }
53
54 // ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ //
14 }
15 // ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ //
16
17 dimensions [ 0 1 −1 0 0 0 0 ] ;
18
19 internalField uniform (5 0 0) ;
20
21 boundaryField
22 {
23 top
24 {
25 type symmetryPlane ;
26 }
27
28 bottom
29 {
30 type symmetryPlane ;
31 }
32
33 inlet
34 {
35 type freestream ;
36 freestreamValue uniform (5 0 0) ;
37 }
38
39 outlet
40 {
41 type freestream ;
42 freestreamValue uniform (5 0 0) ;
43 }
44
45 cylinder
46 {
47 type fixedValue ;
48 value uniform (0 0 0) ;
49 }
50
51 frontAndBack
52 {
53 type empty ;
54 }
55 }
56
57 // ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ //
Within constant one finds the information related to the kinematic viscosity and the
RASProperties file to compute the wall shear stress or other utilities requesting the
RAS dictionary.
1 /∗−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−∗− C++ −∗−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−∗\
2 | ========= | |
3 | \\ / F ield | OpenFOAM: The Open S o u r c e CFD Toolbox |
4 | \\ / O peration | Version : 2.2.1 |
5 | \\ / A nd | Web : www.OpenFOAM. o r g |
6 | \\/ M anipulation | |
7 \∗−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−∗/
8 FoamFile
9 {
10 version 2.0;
11 format ascii ;
12 class dictionary ;
13 location ” constant ” ;
14 object transportProperties ;
15 }
16 // ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ //
17
18 transportModel Newtonian ;
19
20 nu nu [ 0 2 −1 0 0 0 0 ] 2 . 5 6 4 1 0 3 e −03;
21
22 // ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ //
3.4.4 Control
Advice:
The case reaches steady before t = 1.75 s. Despite it, endTime has been
set to 1.75 to widely appreciate the von Kármán street and its periodical
distribution. As the mesh is very refined and the solver is transitory, the
simulation may be very slow
48 snGradSchemes
49 {
50 default orthogonal ;
51 }
52
53 fluxRequired
54 {
55 default no ;
56 p ;
57 }
58
59 // ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ //
44
45 // ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ //
Advice:
As it can be seen, the instruction nNonOrthogonalCorrectors has been
set to 3 instead of 0 (as it was in the plane-parallel plates case). It is so
because when checking the mesh with checkMesh, it is possible to observe
that there are mesh non-orthogonalities. Although globally the mesh is
OK to be run, it helps in obtaining more physically accurate results
3.5 Post-processing
Figure 3.8: Velocity field around the bidimensional cylinder at t = 0.01 s (m/s)
Figure 3.9: Velocity field around the bidimensional cylinder at t = 0.6 s (m/s)
Figure 3.10: Velocity field around the bidimensional cylinder at t = 1.13 s (m/s)
Figure 3.11: Pressure field around the bidimensional cylinder at t = 0.01 s (m2 /s2 )
Figure 3.12: Pressure field around the bidimensional cylinder at t = 0.6 s (m2 /s2 )
Figure 3.13: Pressure field around the bidimensional cylinder at t = 1.13 s (m2 /s2 )
A detail of the vector field near the wall of the cylinder is shown to appreciate the
boundary layer detachment:
Figure 3.18: Velocity vectors around the bidimensional cylinder at t = 1.13 s (m/s)
Advice:
Additionally, the simulation has been done for another different Reynolds number
(Re = 30). The only instruction that needs to be changed in the OpenF OAM � R
Re = 30 Re = 195
t = 0.01 s
t = 0.4 s
t=1s
As it was shown in Section 3.3, for Re = 30 the alternate vortices are not detached.
3.6.1 Vorticity
As with the computation of the flow rate and the wall shear stress, it is also possible
to compute the vorticity in the fluid field by using OpenF OAM � R
utilities. The
vorticity is a pseudovector field that describes the local spinning motion of a fluid
near some point, as would be seen by an observer located at that point and traveling
along with the fluid. Mathematically, the vorticity is the curl of the velocity field:
� =∇×U
w
vorticity
Within the directories of each time step it has appeared a new file. Then, to ob-
serve the vorticity field, open ParaView and select it by clicking the vorticity box
contained within Volume Fields. For the cylinder195 case, the results are:
One of the main interests when studying external flows is the computation and
analysis of the aerodynamic forces that the fluid exerts to solid objects. The drag
is the force parallel to the flow velocity and the lift is the force perpendicular to the
flow velocity. The dimensionless drag force is presented in Equation 5.6 and for an
infinite circular cylinder its dependence on the Reynolds number is shown at Figure
3.3.
With OpenF OAM � R
, to compute the aerodynamic forces that a fluid exerts on
solid walls, add the following code after the last instruction of controlDict:
1 functions
2 (
3 forces
4 {
5 type f o r c e s ;
6 functionObjectLibs ( ” l i b f o r c e s . so ” ) ;
7 p a t c h e s ( c y l i n d e r ) ; // Patch where t h e f o r c e e x e r t e d by t h e f l u i d i s c a l c u l a t e d
8 pName p ;
9 UName U;
10 rhoName r h o I n f ;
11 r h o I n f 1 0 0 0 ; // R e f e r e n c e d e n s i t y o f t h e f l u i d
12 CofR ( 0 0 0 ) ; // O r i g i n f o r moment c a l c u l a t i o n s
13 o u t p u t C o n t r o l t i m e S t e p ; // Time c r i t e r i o n used t o p r i n t t h e r e s u l t s
14 o u t p u t I n t e r v a l 1 0 0 ; // How o f t e n ( a c c o r d i n g t o o u t p u t C o n t r o l ) t h e r e s u l t s a r e
printed
15 }
16 forceCoeffs
17 {
18 type f o r c e C o e f f s ;
19 functionObjectLibs ( ” l i b f o r c e s . so ” ) ;
20 p a t c h e s ( c y l i n d e r ) ; // Patch where t h e f o r c e e x e r t e d by t h e f l u i d i s c a l c u l a t e d
21 pName p ;
22 UName U;
23 rhoName r h o I n f ;
24 r h o I n f 1 0 0 0 ; // R e f e r e n c e d e n s i t y o f t h e f l u i d
25 CofR ( 0 0 0 ) ; // O r i g i n f o r moment c a l c u l a t i o n s
26 l i f t D i r (0 1 0) ;
27 dragDir (1 0 0) ;
28 pitchAxis (0 0 1) ;
29 magUInf 5 ; // F re e stream v e l o c i t y
30 l R e f 0 . 1 ; // R e f e r e n c e l e n g t h ( d i a m e t e r o f t h e c y l i n d e r )
31 A r e f 0 . 0 1 ; // R e f e r e n c e a r e a ( c r o s s s e c t i o n a l a r e a o f t h e c y l i n d e r )
32 o u t p u t C o n t r o l t i m e S t e p ; // Time c r i t e r i o n used t o p r i n t t h e r e s u l t s
33 o u t p u t I n t e r v a l 1 0 0 ; // How o f t e n ( a c c o r d i n g t o o u t p u t C o n t r o l ) t h e r e s u l t s a r e
printed
34 }
35 );
Advice:
For incompressible cases, the value of rhoInf is irrelevant for the compu-
tation of the dimensionless coefficients
Now, when the case is rerun, a new directory named postProcessing appears next
to 0 , constant and system. This directory contains two subdirectories with infor-
mation concerning the evolution of the aerodynamic forces and moments and their
dimensionless coefficients.
Once the aerodynamic forces have been computed with the instruction shown in
Section 3.6.2, it is useful to plot the results. Besides showing the behaviour of the
forces with time, it allows an understanding of the convergence (or divergence) of
the case. For the bidimensional cylinder case, it is possible to claim that if the drag
coefficient converges then the case converges too.
First of all the user has to have Gnuplot installed. It is a portable command-line
driven graphing utility for Linux, MS Windows, OSX and many other platforms.
It is widely used to plot data obtained with OpenF OAM � R
. First, access the file
containing the required data:
cd FoamCases/cylinder195/postProcessing/forceCoeffs/0
gnuplot
Finally plot the values of the drag coefficient (third column) in front of the time
(first column) by typing:
It is also possible to plot the values of the lift coefficient (fourth column) in front of
the time (first column) by typing:
Figure 3.21: Lift coefficient (ordinate axis) of the bidimensional cylinder at Re = 195
in front of time (abscissa axis)