You are on page 1of 39

Implementation of an extremum seeking controller for vortex shedding attenuation in a 2D CFD code

P.G.M. Hoeijmakers DCT 2008.09

Traineeship report Coach(es): Supervisor: Prof. O.M. Aamo, NTNU Trondheim Prof. H. Nijmeijer

Technische Universiteit Eindhoven Department Mechanical Engineering Dynamics and Control Group Eindhoven, January, 2008

Abstract The dynamics of vortex shedding has been an interesting research subject for many years. In the last years the number of publications related to ow control techniques has steadily increased. The interest herein can be easily explained. The various dynamical forces acting on cylinders (and other blu bodies) in a ow, and particularly those resulting from the periodic vortex shedding behaviour, impose structural engineering challenges; fatigue in an oil drill pipe in the ocean is only one of numerous examples. Advances in computer technology make it possible to solve the NavierStokes equations, and to easily experiment with a range of control techniques. In this work it is validated that the VISTA-FlowControl CFD code, developed specically for the purpose of ow control applications, is suitable for CFD simulations containing ow control. The velocity feedback control method is successfully applied in this code. Pressure feedback has also been tried but proved unsuccessful, possibly due to specic solver problems. The velocity feedback control is slightly altered by adding a time delay to the controller. This allows a phase shift which can not only attenuate but also amplify the vortex shedding. Furthermore, the extremum seeking control technique, suited particularly for dicult to model non-linear systems, proved successful in nding an optimum value of the time delay which minimizes the shedding amplitude. The advantage of this approach is that the controller will try to keep the shedding amplitude to a minimum even if the ow conditions change.

Contents
1 Introduction 1.1 Motivation . . . 1.2 Literature review 1.3 Objectives . . . . 1.4 Outline . . . . . 2 2 2 3 3 4 4 5 10 10 11 12 12 12 18 21 21 21 22 23 25 28 28 28 29 32 34 35 36

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

2 The system 2.1 General aspects of ow past cylinder . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2 CFD solver, mesh and data extraction . . . . . . . . . . . . . . . . . . . . . . . . . . 3 Feedback control of vortex shedding. 3.1 General description . . . . . . . . . . 3.2 The actuation . . . . . . . . . . . . . 3.3 Velocity feedback . . . . . . . . . . . 3.3.1 Feedback without delay . . . 3.3.2 Feedback with delay . . . . . 3.4 Pressure feedback . . . . . . . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

4 Real time optimization 4.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 4.2 The basic scheme . . . . . . . . . . . . . . . . . . . . . . 4.3 The cost function . . . . . . . . . . . . . . . . . . . . . . 4.4 Selection of lter parameters and perturbation function 4.5 Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 Conclusions, recommendations 5.1 Conclusions . . . . . . . . . . 5.2 Recommendations . . . . . . 5.3 Reection . . . . . . . . . . . Nomenclature Appendix A: Short description of DVD contents Appendix C: List of VISTA bugs Appendix D: Solved VISTA problems. and . . . . . . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

reection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Chapter 1

Introduction
1.1 Motivation

Flow around more or less cylindrical bodies can be found in many places in nature and engineering; bridge pillars, factory exhaust pipes, suspended cables and underwater drill pipes are only a few examples. Due to the dynamical and vibrational nature of these ows, which often produce a characteristic sound, these mechanical objects are loaded with oscillating forces, which in turn may introduce fatigue problems. On the other hand, one might want to amplify the vortex shedding as to enhance the mixing behind an object. This means that the subject is not only interesting in a fundamental physical way, but also from a practical engineering point of view. It should be clear to the reader that the suppression of these oscillations may introduce signicant advantages or possibilities. Presently, this is often done by passive devices which disturb or alter the ow somehow, i.e. a spiral around a factory exhaust pipe. Thanks to the signicant progress in control and computer technology, it became possible to solve the governing equations of uid ow numerically in 2 and 3D simulations. These two combined make up an interesting new research area: ow control. In this work a computational uid dynamics (CFD) solver called VISTA-FlowControl is used to test various control strategies which suppress the characteristic vortex shedding from a cylinder. VISTA was initially developed at NTNU1 in collaboration with SINTEF2 Applied Mathematics for the purpose of solving a large range of computational mechanics problems. The ow solver module inside VISTA is an object-oriented Navier-Stokes solver for incompressible ows, specically optimized to run on large parallel computer systems. VISTA makes extensive use of the DIFFPACK package, which is a general object-oriented development framework for the solution of partial-dierential equations.

1.2

Literature review

The steady and dynamical ow around a cylinder has intrigued many researchers during the last decades and is still a subject of great interest. It provides a good base to study the transition from laminar to turbulent ows and thus is of great physical importance. Almost all founders of uid mechanics investigated the subject, notably von Karman [22]. The rst systematic experiments are done by Roshko[18]. Research in [9] shows that at Re = 47 a supercritical Hopf bifurcation occurs.
1 Norges 2 SINTEF

Teknisk-Naturvitenskapelige Universitet is an institute comparable to the dutch TNO

CHAPTER 1. INTRODUCTION

The existence of 3D eects is investigated in [17]. More recently it became possible to do experiments which closely approximate the 2D case using thin oil lms [23]. These results are particularly useful for comparison with 2D CFD calculations. From the beginning eorts have been made to suppress vortex shedding, actively or passively. Among tried methods, are the placement of a splitter plate [18] and the placement of a small secondary cylinder [21]. A wealth of articles treats the active forcing/control of vortex shedding. In [15] the periodic forcing of two jets placed at 80[deg] from the stagnation point is used to control both the near and far wake. Another article treats the optimal location of the jets in such a setup [5], although at higher Reynolds numbers than covered in this report. In [16] the velocity feedback method is pioneered by using two jet actuation slots resulting in the attenuation of the vortex shedding up to Re = 60. In [19] successful experiments are conducted with feedback control, using actuation from a speaker based on the velocity phase information at a point in the near wake. Most of these control methods are based on physical insight rather than mathematical models of the ow. Eorts to accurately model and explore the dynamics of the blu body wake are done in, [4],[10] and [6]. In [7] diusive van der Pol oscillators are used to model the near-wake dynamics. Currently however, the spatially varying Ginzburg-Landau model is the most promising, as presented in [6], and further investigated in [4]. A more model-based suboptimal feedback control method, which is able to suppress the drag/lift uctuation up to Re = 160, is successfully tried in [14]. The nonlinear modeling of vortex shedding including control based on the Ginzburg-Landau equation is treated in [20]. Other eorts in this direction are made in [1] where a backstepping controller based on the Ginzburg-Landau model is tried, but never veried with real CFD experiments. An extensive treatment on extremum seeking control including practical cases can be found in [11] and [13].

1.3

Objectives

This research suits three main goals. The Department of Engineering Cybernetics at NTNU has previously been working on model-based ow controllers but no suitable CFD code has been available to actually verify these (complex) controllers. SINTEF got the task of developing a module for their VISTA CFD package which allows ow control applications. This VISTA-FlowControl module didnt undergo any real practical testing by the time this work started. Getting VISTA-FlowControl up and running, debugging and verifying that all needed functionality is there is the rst objective. The second task is to implement an actual pressure or velocity feedback scheme for the attenuation of the vortex shedding behaviour around a cylinder. If this would prove successful, the implementation of an extremum seeking controller, which acts on a parameter of the feedback controller, would be the third objective.

1.4

Outline

The report is set up as follows; Chapter 2 treats the general aspects of ow around a cylinder including typical considerations when working with a CFD code. Furthermore, some verication of VISTA performance is done. Chapter 3 introduces two basic methods of feedback control along with the actuation on the cylinder boundary. The adjusted controller form (including a variable delay) used in the extremum seeking control scheme, is also presented in this chapter. Chapter 4 then treats the application of extremum seeking control to this case and discusses the results. In the last chapter the conclusions and recommendations for further research are presented.

Chapter 2

The system
2.1 General aspects of ow past cylinder

The dynamics of the cylinder wake are usually quantied as the Strouhal number St = f d/U , as a function of the Reynolds number,Re = U d/. Here f is the vortex shedding frequency, the kinematic viscosity, d the cylinder diameter and U the free stream velocity. As a function of the Reynolds number one can qualify the following regimes; For Re < 4 horizontal and vertical symmetry of the ow (streamlines) can be observed. At Reynolds numbers greater than Re = 4 two attached eddies appear behind the cylinder and elongate downstream at increasing Reynolds number, see also gure 2.1. The ow is still horizontally symmetrical. When Re = 46 the main dynamical instability occurs, which can be classied as a Hopf bifurcation [9]. This instability presents itself as the von Karman vortex street. In the 3D case a subcritical instability occurs at Re = 180 194 and a supercritical instability at Re = 230 250. For Re < 200 the wake vortices are completely laminar, for Re > 200 they become more chaotic and increasingly turbulent. Finally, at Reynolds number higher than Re = 3 105 the boundary layer undergoes transition to turbulence. [12]

Figure 2.1: Some regimes of ow over a circular cylinder. [12]

CHAPTER 2. THE SYSTEM

In this work the only interest is in the vortex shedding region, Re 46, and the attenuation of this vortex shedding using feedback control implemented in a CFD code named VISTA-FlowControl.

2.2

CFD solver, mesh and data extraction

Advances in computer technology in the last decades have made it possible to perform increasingly detailed simulations of the vortex shedding behaviour. The solver used in this work, VISTA, solves the Navier-Stokes equations; u + (u t

u) +

p u=f u=0

(2.1)

where is the density of the uid, u = (u, v) is the velocity vector with (u, v) the velocities in x- and y-direction, p is the pressure, the dynamic viscosity and f an external body force. Furthermore, the assumption of free stream ow is made, and the ow at the boundaries is not aected by the cylinder. The following boundary conditions are used; n=0 un=0 n=0 u = uin u = uc (t)

on 1 on 2 4 on 2 4 on 3 on 5

(2.2) (2.3) (2.4) (2.5) (2.6) (2.7)

where the boundaries are denoted by i , also depicted in gure 2.2. Furthermore uin is the inlet velocity vector at 3 and uc (t) is the velocity vector on the cylinder boundary 5 due to control actuation. Besides, n and are the unit outer normal and tangent vectors, while is the stress tensor given by: = pI + u (2.8) A lot of comparison data is available to verify VISTAs performance but the results from the experiments with ultra thin soap lms in [23] are of particular interest. These experiments can be seen as the rst real 2D experiments. The results summarized in [23] are thus very well suited as a benchmark for VISTA. To extract the relevant data the VISTA code was changed to store a range of signals in output les1 . These output les are then loaded in Matlab to gather the needed data. The Strouhal number is determined from the frequency spectrum of the pressure signal on 45 degrees from the stagnation point. An example of the spectrum at Re = 100 is shown in gure 2.3. Verifying the VISTA code is done by using three dierent meshes of 11200, 13300 and 32000 elements. Only the rst and second one are used in the remainder of the work, since the performance of the third one is not signicantly better than of the second one. This is because the extra elements of the second mesh are mainly located in the boundary layer around the cylinder, while the third one has an overall ner mesh. All elements used are rst order, four node 2D elements.
1 For

details see appendix A

CHAPTER 2. THE SYSTEM

Figure 2.2: The basic domain with the boundaries The default coarse mesh of 11200 elements is shown in gure 2.4. The renement of the second mesh around the boundary layer is shown in gure 2.5. Figure 2.6 shows the results from Vista calculations after using dierent solver settings. The solid and dotted lines are respectively the Henderson (2D) [23] and the Roshko (3D) [18] curves. In [23] it is shown that the Henderson curve, based on 2D CFD computations, ts well to 2D oil lm experiments. This means that VISTA should, at the right solver settings, be able to reproduce points on the Henderson curve. The Roshko curve is a t on 3D experimental data and is only depicted as a reference. Table 2.1 shows the details of the data points in gure 2.6. It is clear that smaller time-steps and mesh size signicantly improve the accuracy of the code, although this also increases calculation time. Re 47 100 200 400 400 400 400 600 600 600 Elem [nr] 11200 11200 11200 11200 32000 13300 13300 11200 32000 13300 dT [s] .025 .025 .025 .025 .010 .005 .001 .025 .010 .005 Stexp .117 .167 .197 .220 .220 .220 .220 .229 .229 .229 Stsim .138 .167 .186 .200 .214 .214 .220 .205 .220 .226 Abs(Error) % 17.9 0 5.6 9.0 2.7 2.7 0 10.5 4.0 1.4 Tcalc,100s [s] 1:00 1:00 1:00 1:00 ? 8:30 35:00 1:00 ? 8:30 Figure symbol

Table 2.1: Solver settings and errors at dierent Reynolds numbers In CFD codes it is customary to use a parameter which measures how well conditioned the mesh-size and time-step size are for the actual ow conditions at hand. This is the Courant, Freidricks and Levy number, and has a general form dened as: CF L = t u/x. Usually the goal in CFD is to keep CF L < 1. In the case the solver uses a variable time-step, the size of the time-step is scaled according to this condition. In the setup used in this research the most critical part of the mesh is around the jets. This eect can also be seen well in gure 2.7a and 2.7b, where a correlation

CHAPTER 2. THE SYSTEM

2 |ps1(f)| 1.5 1 0.5 0 0 0.1 0.2 0.3 Frequency (Hz) 0.4 0.5

4 2 ps1 [Pa] 0 2 4

10

20

30

40 50 Time [s]

60

70

80

90

Figure 2.3: Time plot and frequency spectrum of ps1 at Re = 600, where s1 is a measuring point located at 45[deg] from the stagnation point. The time signal is windowed by a Hanning window.

Figure 2.4: The coarse mesh consisting of 11200 elements.

CHAPTER 2. THE SYSTEM

Figure 2.5: Close up of the 13300 element mesh around the cylinder, note the renement of the mesh in the boundary layer.

0.24

0.22

Strouhal number

0.2

0.18

Henderson curve (2D) Roshko curve (3D)

0.16

0.14

0.12 0 200 400 600 800 1000

Reynolds number
Figure 2.6: St vs. Re number relationship and data from benchmark runs. See table 2.1 for details on the plotted data points and solver settings.

CHAPTER 2. THE SYSTEM

0.35

1.16 1.15 1.14

0.3

0.25

|Umax,jet|

0.2

CFL
420 440 460 480 500

1.13 1.12

0.15 1.11 0.1 1.1 1.09 1.08 400

0.05

0 400

420

440

460

480

500

Time [s]

Time [s]

(a) Actuation

(b) CFL number

Figure 2.7: The relationship between CFL number and actuation velocity. Figures made from the velocity feedback case. between the magnitude of the actuation and the CFL number is to be observed. In general, one has to make sure that a sucient small time-step is chosen to allow for the wanted mesh-size and velocities. From a pure accuracy point of view, it can be concluded that for all further experiments done in this work, all at Re = 60, the coarse mesh using a time step of 0.025 [s] will be sucient.

Chapter 3

Feedback control of vortex shedding.


3.1 General description

The attenuation of vortex shedding by feedback control is an idea that has been in existence for many years, and in general two approaches can be taken with actuation on the cylinder boundary, both illustrated in gure 3.1. Co-located case: The control actuation can be with jets at 110[deg] from the stagnation point. While the measurement of i.e. the pressure is on 45[deg] from the stagnation point. This means that measurement and actuation are located closely together on the same boundary. In the remainder of the report this is being referred to as "pressure feedback". Non co-located case: The measurement of i.e. v is done downstream the cylinder and this signal is fed back to i.e. jets at 110[deg] In the remainder of the report this is being referred to as "velocity feedback".

Figure 3.1: The two basic feedback methods The non co-located case, pioneered in [16], proved successful in attenuating the vortex shedding completely at Re = 60. The co-located setup, containing pressure measurements, would be easier to

10

CHAPTER 3. FEEDBACK CONTROL OF VORTEX SHEDDING.

11

realize in practice, but the actual attenuation behaviour is apparently harder to achieve. This setup is only successful (in simulations) when a third actuation slot was added [8]. Since VISTA-FlowControl is still under development, and it is not completely certain the code is suitable for control at all, a simple feedback control setup is tried analogously to what is done in [16].

3.2

The actuation

The actuation is done by using blowing and suction slots at 110[deg] from the stagnation point with a span of 15[deg]. The location of the jets is in the optimal zone which is conrmed by [5]. The physical explanation lies in the fact that around 125[deg] the boundary layer separates, and therefore it is probable that around this point the vortex shedding can be inuenced the most. The jets are working in opposite phase to pull and push against the natural vortex shedding. The advantage of this is that the actuation has a zero net mass ux into and out of the domain and by that is likely to keep the solver stable. In a practical situation this could also be benecial; the push-pull movement can be created by a vibrating membrane analogous to the speaker-actuated case in [19]. No internal uid supply lines would be necessary in this situation The velocity prole of the jet is set according to: uc (, t) n = Umax,jet sin( (Ni start )). span (3.1)

Where Umax,jet is the maximum velocity determined by the controller in the center of the jet. This is eectively providing a suitable control parameter for the jet. Besides, Ni is the angle of the actual node in the mesh, while start,end are the start and end angles of the jet, claried further in gure 3.2.

Figure 3.2: The jet actuation on a discrete mesh. For the purpose of solver stability, the actuation in all simulations is faded-in linearly in approximately one natural vortex shedding period (@Re = 60, Tf adein = 6[s]).

CHAPTER 3. FEEDBACK CONTROL OF VORTEX SHEDDING.

12

3.3
3.3.1

Velocity feedback
Feedback without delay

In this section the non co-located setup described in [16] is imitated. This method uses the y-velocity signal measured somewhere in the wake, as the controller input signal. The basic setup is shown in gure 3.1 where in this case only the red signal path is used. In practice this conguration would be more dicult to realize because of the accurate mid-stream measurements needed. Since this solver is specically designed for ow-control, the value of v(x, y, t) at any location in the domain can be extracted easily. The controller has the simple form; Umax,jet = k v(xs , ys , t) (3.2)

where the gain k and the feedback sensor location (xs , ys ) can be freely chosen. The control was performed at Re = 60, and like in [16], (xs , ys ) = (2.75, 0) is used as the sensor location. Because the vortex shedding has to be fully developed to display the eect of control the clearest, the control was turned on at t = 420[s], which is more than 320 seconds after the developing of the vortex shedding. The attenuation of the shedding behaviour is nearly exponential as one can observe from the various signals in gures 3.3a-3.3f, and especially gure 3.4. The drag reduction is in the order of 5%, as can be seen in Cd graph1 . The 3D plot in gure 3.5a shows the pressure distribution over the cylinder during the simulation. Like in gure 3.3b the pressure variations are clearly visible, the resulting lift uctuation would in a practical situation lead to (structural) vibrations. To clarify the pressure variations, the static pressure on the cylinder (pstatic ) is subtracted, which results in the gures 3.5b,3.6a and 3.6b. The sharp pressure peaks are due to the start of the control action at t = 425[s]. Observation of gure 3.6a leads to the conclusion that the actuation indeed runs in anti-phase with the local pressure variations. It is interesting to note that the pressure and especially the phase of it, between 80 < < +80 [deg] (the inner-part of the graph), is hardly aected by the actuation. In gure 3.6b the graph is turned upside down. From this one can say that the actuation is exactly located around the point where the magnitude of the pressure variation is the highest. Snapshots made with GLVIEW2 of the u and z elds are shown in gure 3.5, the attenuation of the shedding amplitude is clearly visible.

3.3.2

Feedback with delay

The nal goal of this work is to implement an extremum seeking controller, hence some parameter has to be chosen for the extremum seeking to act on. The variation of this parameter should inuence a certain cost function of the system, which in this case is easily chosen as the absolute value of v(xs , ys , t)3 eventually smoothed by a low-pass lter. Suppose a delay is introduced in the feedback controller with delay time . The controller then takes the form: Umax,jet = k v(xs , ys , (t )) (3.3)

The parameter can now be used to shift the feedback signal more in or out of phase with the shedding dynamics on the cylinder, and thus is able to attenuate or promote vortex shedding.
1 Since some bug in the code prevented the extraction of the skin friction, the calculated drag and lift coecients contain the pressure contribution only. However, the qualitative behaviour is likely to be the same. This also explains why the absolute values are not in accordance with i.e. [16] 2 The visualization program used in this work 3 See section 3.4 for more information

CHAPTER 3. FEEDBACK CONTROL OF VORTEX SHEDDING.

13

0.4 0.3 0.2

0.1 0.08 0.06 0.04

v(xs,ys) [m/s]

0.1

P [Pa]
450 500 550 600

0.02 0 0.02

0 0.1 0.2 0.3 0.4 400

0.04 0.06 0.08 400

450

500

550

600

Time [s]

Time [s]

(a) v(2.75, 0, t)
0.3 0.2

(b) P (t)

0.2

0.15

0.1

0.1

Umax,jet [m/s]

0.05

0.1

Cl
0 0.2 0.05 0.3 0.1 0.4 400 450 500 550 600 0.15 400

450

500

550

600

Time [s]

Time [s]

(c) Umax,jet (t)


1.19 1.16 1.15 1.14 1.13

(d) Lift coecient, Cl (t)

1.18

1.17

CFL
450 500 550 600

1.16

Cd

1.12 1.11

1.15

1.14

1.1 1.09 1.08 400

1.13

400

450

500

550

600

Time [s]

Time [s]

(e) Drag coecient, Cd (t)

(f) CFL(t)

Figure 3.3: v(2.75, 0, t) feedback

CHAPTER 3. FEEDBACK CONTROL OF VORTEX SHEDDING.

14

10

Fine mesh, t=.005, CFL.0.3 Coarse mesh, t=.025, CFL1.14 10


2

|v [m/s]|

10

10

10

10

10

400

420

440

460

480

500

520

540

560

580

600

Time [s]
Figure 3.4: Semilog plot of the absolute value of v(2.75, 0, t) for both the ne and coarse meshes.

CHAPTER 3. FEEDBACK CONTROL OF VORTEX SHEDDING.

15

(a) 3D plot of p(5 , t)

(b) 3D plot p(5 , t) pstatic

Figure 3.5: 3D Plots of the pressure distribution over the cylinder boundary [1/2]

CHAPTER 3. FEEDBACK CONTROL OF VORTEX SHEDDING.

16

(a) 3D plot of p(5 , t) pstatic from above.

(b) 3D plot of 1 (p(5 , t) pstatic ), equal to gure 3.5b upside down.

Figure 3.6: 3D Plots of the pressure distribution over the cylinder boundary [2/2]

CHAPTER 3. FEEDBACK CONTROL OF VORTEX SHEDDING.

17

(a) Plot of x-velocity (u) at t = 425s.

(b) Plot of vorticity (z ) at t = 425s.

(c) Plot of x-velocity (u) at t = 450s.

(d) Plot of vorticity (z ) at t = 450s.

(e) Plot of x-velocity (u) at t = 500s.

(f) Plot of vorticity (z ) at t = 500s.

Figure 3.7: Snapshots of v and wz at three dierent times in the simulation, with control started at t = 425s.

CHAPTER 3. FEEDBACK CONTROL OF VORTEX SHEDDING.

18

0.4 0.4 0.3 0.3 0.2 0.2 0.1 0 0.1 0.2 0.3 0.4 0.5

v [m/s], Time=401.5[s]

v(2.75.7,0,t) v(1.7,0,t2)*1.6 v(1.7,0,t)

v(xs,ys) [m/s]
1 1.5 2 2.5

0.1 0 0.1 0.2 0.3 0.4 400

410

420

430

440

450

x [m]

Time [s]

(a) Velocity, v(x, 0, t), of points on x-axis downstream from cylinder

(b) Shift of v(1.7, 0, t) to v(2.75, 0, t), control activated at t = 425

Figure 3.8: v signal and phase shift. Physically, adding delay is approximately analogous to shifting the sensor location more downstream. This can also be seen from gure 3.8a, where the y-velocities of a range of points, on the x-axis behind the cylinder, are plotted. It has to be noted that the amplitudes are not the same. The sensor location is shifted upstream from (xs , ys ) = (2.75, 0) to (xs , ys ) = (1.7, 0) , in Matlab the signal from the sensor at (xs , ys , t) = (1.7, 0, t) is tted to the signal at (xs , ys , t) = (2.75, 0, t). This process is depicted in gure 3.8b, as can be seen in the gure = 2 and k = 1.6 give an almost exact copy of the sensor signal at (xs , ys , t) = (2.75, 0, t). The simulation using the aforementioned settings is indeed successful, the various signals are shown in gure 3.9. Comparison with gure 3.3 reveals little to no dierences. In chapter 4 the extremum seeking controller is applied to the variable , admittedly the optimum for attenuation is known already as = 2[sec].

3.4

Pressure feedback

The initial idea was to use pressure feedback since it would be preferable in a real life situation, however this proved to be more troublesome then expected. The equation for the used controller is: Umax,jet = k P P = p(xs2 , ys2 , (t )) p(xs1 , ys1 , (t )) (3.4) (3.5)

where P (xs1,s2 , ys1,s2 , t) are the pressures at two dierent sensor locations, s1, s2, on the cylinder boundary, preferably symmetrically placed with respect to the x-axis. This situation is also drawn in as the black signal path in gure 3.1. In this way the static part of the pressure signal is not present, and only the variations in the pressure are left. Since this pressure signal is not expected to have the correct phase needed for attenuation, a delay time is added which shifts the signal to the needed phase. The correct delay and gain are determined after comparing the un-delayed pressure signal at free vortex shedding with the v(2.75, 0, t) feedback signal. One would expect that the P signal needs to be approximately in phase with this signal to promote the attenuation of the shedding. However, simulations with this setup are showing some serious problems. One of the problems is that the P signal is not smooth, an illustration is given in gure 3.10a. The P signal obviously shows a spiking behaviour. Since this spiking signal is fed back to the

CHAPTER 3. FEEDBACK CONTROL OF VORTEX SHEDDING.

19

0.25 0.2 0.15

0.08 0.06 0.04

0.1

v(xs,ys) [m/s]

0 0.05 0.1

P [Pa]
450 500 550 600

0.05

0.02 0 0.02 0.04

0.15 0.2 0.25 400 0.06 0.08 400

450

500

550

600

Time [s]

Time [s]

(a) v(1.7, 0, t)
0.3 0.15

(b) P (t)

0.2

0.1

0.1

0.05

Umax,jet [m/s]

0.1

Cl
0.05 0.2 0.1 0.3 0.15 0.4 400 450 500 550 600 0.2 400

450

500

550

600

Time [s]

Time [s]

(c) Umax,jet
1.19 1.15

(d) Lift coecient, Cl

1.18

1.14

1.17

1.13

1.15

CFL
450 500 550 600

1.16

1.12

Cd

1.11

1.14

1.1

1.13

1.09

400

1.08 400

450

500

550

600

Time [s]

Time [s]

(e) Drag coecient, Cd

(f) CFL number

Figure 3.9: v(1.7, 0, t ) k feedback

CHAPTER 3. FEEDBACK CONTROL OF VORTEX SHEDDING.

20

3 0.15 0.14 0.13 2

Umax,jet in P feedback Umax,jet in v(xs,ys) feedback

P [Pa]

0.12 0.11 0.1 0.09 0.08 0.07 484.5 485 485.5 486 486.5

max,jet

[m/s] U

3 400

420

440

460

480

500

Time [s]

Time [s]

(a) Frequently encountered example of the P signal

(b) Feedback using ltered P signal

Figure 3.10: P signal evaluation jet actuation, the incompressibility causes a spike at the pressure sensor again, which leads to an avalanche eect until the solver is unable to handle it and diverges. It has to be remarked that the actual calculations sometimes continue regardless of pressure- and actuation-peaks up to 103 [P a]. Naturally the results are of no physical value long before this point is reached. It was shortly thought that the spiking might be caused by the measuring on the boundary itself. Regrettably new simulations where (xs , ys ) was moved one mesh element radially outward, showed the same problems. After discussions with the developer it has been concluded that this spiking may be due to one of the following reasons: The solver uses a continuous projection method, where the computation of the velocity and pressure are split. This means that the calculation of velocity and pressure is done by using the same element class. Thus, the order of the element support functions is the same, which according to the developer, might lead to a correcting behaviour in some cases. The solution could then be to try dierent element classes for velocity and pressure, there was however no time to verify this4 . Time step size and mesh size might be of importance since solver stability is, according to the developer, partially dependent on the time step size. Selection of smaller time steps means less stable behaviour5 . In an eort to solve this problem, the pressure signal is rst passed through a suitable low pass lter. This approach is taken in the results shown in gure 3.10b. In this run the P signal is rst ltered by the low-pass lter using cutof f = 0.5 2[rad/s] and then delayed and amplied6 to match it with the feedback signal from the v(2.75, 0, t) feedback run. One would predict that this gives the best conditions for attenuation behaviour but gure 3.10b shows that this is not the case. Although the solver is much more stable (no small spiking) this actual setup causes the vortex shedding to be amplied to the extreme. It has to be noticed that it is not really known if P control actually works, the problem could be badly posed, i.e. the sensor locations are too close to the actuation. Some rigorous mathematical analysis would be required to check this.
also appendix C to what one would expect 6 = 4.8[sec],k = 5 The fact that the rst order low pass lter cut o frequency is very close to Re60 and thus introduces a phase shift too was also taken into account
5 Contrary 4 See

Chapter 4

Real time optimization


4.1 Introduction

Even though the controllers introduced in chapter 3 are able to attenuate the vortex shedding completely, they are not adaptive. This means that the the time delay and feedback gain k are (theoretically) only optimal for one value of the Reynolds number. In a practical situation though, one may not know the exact ow conditions at hand or they may be continuously changing. The velocity feedback method which includes the delay makes it possible to easily adjust to new ow conditions. The value of determines wether the vortex shedding will be amplied or dampened. The only thing needed to attenuate the vortex shedding in new ow conditions is a new optimal value of . The introduction of an extremum seeking controller which acts on enables the control structure to optimize continuously.

4.2

The basic scheme

Extremum seeking control is an online optimization technique which makes it possible to search for an extreme value in the cost function of a dynamic (nonlinear) system. The cost function should be a function of a certain parameter of the system. The extremum seeking should then act on this parameter. Extremum seeking is dierent from classical adaptive control in the way that it does not stabilize to a given setpoint but can be used in search for the setpoint. Furthermore, it is not model based, which makes it suitable for complex systems where no reliable model is available to capture all the important dynamics. The technique makes it possible to achieve convergence to an optimum in approximately the same timescale as the plant dynamics. Therefore is has a distinct advantage over optimization techniques which need to wait for the plant transients to settle to the new parameters. Figure 4.1 presents the basic scheme that turns into a minimum seeking scheme after changing y to y.

21

CHAPTER 4. REAL TIME OPTIMIZATION

22

Figure 4.1: Basic form of the extremum seeking scheme. [11] Consider a system with an output y which is a function of some parameter . Assume the output of the system has an unknown minimum or maximum at . An excellent explanation of the basic principle of the extremum seeking is given in [13], A slow perturbation signal asin(t) is added to the signal , the current best estimate of . If the perturbation is slow enough, the plant appears as a static map to the cost function thus the dynamics do not interfere with the peak seeking scheme. If is on either side of , the perturbation asint will create a periodic response of y which is s either in or out of phase with asint. The high-pass lter s+h eliminates the "DC s component" of y. Thus, asint and s+h will be two sinusoids which are1 in phase for < out of phase for > In either case, the product of the two sinusoids will have a "DC component" which l is extracted by the low-pass lter s+l . The "DC component" can be argued to 2 be approximately the sensitivity (a /2)(h l) ( ). Then the integrator = (k/s) is 2 approximately the gradient update law = k(a /2)(h l) ( ) driven by the sensitivity function which tunes to . In the context of vortex shedding one could easily dene = . The choice of a suitable cost function is treated in the next section.

4.3

The cost function

The choice of the cost function is not very critical, as long as it is dependent on the input variable ( ), however some signals are better suited as a cost function than others. In this case v(1.0,0,t)2 is picked as the basic signal and manipulated according to the scheme in gure 4.2.
case of a maximum that in the complete scheme two input signals are used, the feedback signal v(1.7, 0, t) and v(1.0, 0, t) to derive the cost function. To avoid lag, the cost function signal is chosen as the measurement closest to the cylinder.
2 Note 1 In

CHAPTER 4. REAL TIME OPTIMIZATION

23

0.35

0.3

0.25

Av(1,0,100) [m/s]

0.2

0.15

0.1

0.05

0 1

[s]

Figure 4.3: Static map of the system, here A denotes the shedding amplitude

Figure 4.2: Scheme to extract the cost function y. To verify that the actual static map of the system is suitable for extremum seeking, nine simulations are ran with static in the range = [0 .5 1 1.5 2 2.5 3.0 3.5 4.0]. The simulations are ran for 100[sec], long enough for the vortex shedding to settle on a new amplitude. Next, max(v(1.0, 0, t)) at the end of each simulation was plotted against to get an approximation of the static map, the result can be seen in gure 4.3. To check that the whole setup actually is able to nd a minima of the cost function using a continuous varying delay, another simulation is performed with continuously variative between zero and four seconds. This transient behaviour is shown in gure 4.4, where one can clearly see that the cost function is indeed more sensitive for all > 2.5 [s] in comparison to all < 2 [s]. This also means that the extremum seeking does not necessarily converge to = 2 but to a lower value like = 1.5, provided that the perturbation function lies somewhere in the strongly attenuating region around = 2. From these results it is reasonable to expect that a well chosen continuous perturbation function acting on will indeed promote convergence to a completely attenuated vortex shedding state.

4.4

Selection of lter parameters and perturbation function

The choice of the lter cut-o frequencies is partially done using experience gained from the various previous simulation runs. Dierent choices can be made according to the specic demands of a particular run. A combination of high perturbation frequency and amplitude will lead to a relatively fast convergence, but at the risk of overshooting the closest optimum. Furthermore, a too high amplitude might not allow the vortex shedding to disappear completely. Based on gures 4.3 and 4.4, some general observations can be made concerning the order of a suitable amplitude and frequency for the perturbation signal. Perturbation function From looking at gure 3.3 one can see that within 30 [s] the signal is at less then 5% of its original level. This justies the assumption that a perturbation frequency of per = 0.008 2 is suciently

CHAPTER 4. REAL TIME OPTIMIZATION

24

0.8 0.6 0.4

0.35

0.3

0.25

v(xs,ys) [m/s]

0.2 0 0.2 0.4 0.6 0.8 400 0.1

Cost
450 500 550 600 650 700 750 800

0.2

0.15

0.05

0 400

450

500

550

600

650

700

750

800

Time [s]

Time [s]

(a) v(2.75, 0, t)
4 3.5 3 2.5

(b) Cost: Low pass ltered |v(1.0, 0, t)| signal

[s]

1.5 1 0.5 0 400

450

500

550

600

650

700

750

800

Time [s]

(c) The delaytime

Figure 4.4: Examination of the cost function in transient regime.

CHAPTER 4. REAL TIME OPTIMIZATION

25

slow. From the graph of the cost function 4.3 and gure 4.4 it is concluded that an amplitude of 0.5 allows the extremum seeking to converge, while the vortex shedding will still be fully attenuated. Low-pass lter in cost function Since per must be in the pass band of the low-pass lter in the cost function, the bounds of lp,cost are given as: per lp,cost Re60 and thus as 0.008 2 lp,cost 0.13 2. The closer it is too per the smoother the cost function will be, due to the rst order nature of the lters a lp,cost too close to per will cause the lter to attenuate the perturbation frequency, something which is not wanted for convergence rate. All in all the selection is a compromise and simulations show that lp,cost = 0.02 2 usually yields satisfactorily results. High-pass lter Taking under consideration that the job of the high pass lter is to lter out the DC component of the cost function, while preserving the perturbation, per = 0.008 2 should be in the pass band of the lter. This means that hp = 0.003 2 is a suitable choice. Low-pass lter The only task of the low-pass lter is to smoothen the signal after the multiplication in the extremum seeking scheme. However, a very low lp would lead to slow convergence if the gain in the integrator will not be adjusted. The value set at lp = 0.003 2 showed the desired behaviour. Integrator gain The gain of the integrator serves the purpose of increasing the sensitivity and thus convergence rate of the scheme. Here the conservative value of k = 3 is used.

4.5

Results

The results of the extremum seeking can be observed in gure 4.5. Here the initial time delay was set to 0.5[s], and theoretically the extremum seeking scheme should converge to a total delay of 2[s]. One has to keep in mind though that in transients the behaviour is somewhat dierent as explained in section 4.3. From the graph it should be clear that this simulation was not without diculties. The algorithm rst goes in the wrong direction and arrives at < 0, which is obviously not possible and the feedback loop is broken3 . Consequently, the vortex shedding becomes stronger again and the scheme searches in the other direction arriving at 1.7 [s]. The convergence of and the cost function can be observed in gure 4.64 . Apparently, this value is optimal enough to attenuate the shedding completely. The presence of the pressure spike around t = 470 [s] is due to the sudden return of the actuation.

3 This 4 The

is purely a consequence of the form of the integrated delay, see also appendix A. fact that the cost function starts below zero is because of an error in the initial condition of the lter.

CHAPTER 4. REAL TIME OPTIMIZATION

26

0.2 0.15 0.1

0.2

0.1

v(xs,ys) [m/s]

P [Pa]
500 600 700 800 900 1000

0.05 0 0.05 0.1 0.15 0.2 400

0.1

0.2

0.3

0.4

0.5 400

500

600

700

800

900

1000

Time [s]

Time [s]

(a) v(1.7, 0, t)
0.3 0.5

(b) P (t)

0.2 0 0.1

Umax,jet [m/s]

0.5

0.1

Cl
1 0.2 1.5 0.3 0.4 400 500 600 700 800 900 1000 2 400

500

600

700

800

900

1000

Time [s]

Time [s]

(c) Umax,jet (t)


1.19 1.18 1.17 1.18 1.16 1.17 1.15 1.14

(d) Lift coecient, Cl (t)

CFL
500 600 700 800 900 1000

1.16

Cd

1.13 1.12 1.11 1.1

1.15

1.14

1.13 1.09 400 1.08 400 500 600 700 800 900 1000

Time [s]

Time [s]

(e) Drag coecient, Cd (t)

(f) CFL(t)

Figure 4.5: Results of the extremum seeking [1/2], note the short stop in the actuation.

CHAPTER 4. REAL TIME OPTIMIZATION

27

0.08 2.5 0.06 2 0.04 1.5

[s]

Cost

0.02

0.5

0.02

0.04

0.5 400

500

600

700

800

900

1000

0.06 400

600

800

1000

1200

1400

Time [s]

Time [s]

(a) The delay time

(b) Cost function

Figure 4.6: Results of the extremum seeking [2/2], note the short crossing of 0 delay

Chapter 5

Conclusions, recommendations and reection


5.1 Conclusions

This is the rst real work done using the VISTA-FlowControl CFD package. The code is up and running, debugged and all needed functionality is present. To correct the bugs the developer has been contacted regularly during the work. In general these aws1 were taken care of in less then one week. All the functionality not mentioned in appendices B and C like data extraction, control scheme, lters and actuation are not the responsibility of the developer. Most of the time was spent on adding these things. Verication of the calculations is done using Reynolds-Strouhal relationships resulting from previous work. When using the correct solver settings, VISTA is able to give highly accurate results. The jet actuation on the cylinder boundaries at 110 [deg], is programmed in the code. Two basic control methods are tried out, where of only velocity feedback is successful. The feedback of a pressure signal, also known as the co-located case, seems troublesome and needs further investigation. The problems are either caused by the solver or the method itself. The adjustment of a time delay added to the velocity feedback controller, allows either amplication or attenuation of the vortex shedding. Following, an extremum seeking scheme is able to search for an optimum of the time delay to attenuate the vortex shedding. In this way the control structure is more exible and (theoretically) able to adapt to dierent ow conditions.

5.2

Recommendations

The recommendations are mainly in the area of the actual solver code, since the controllers tried in this research were mainly a good test case for the code. Previous work at the NTNU treated the systematic design of a back-stepping controller based on the Ginzburg-Landau model [2],[3]. This control technique has a sound theoretical foundation with regards to attenuation of oscillations in the Ginzburg-Landau model, but has never been tested in a full Navier-Stokes simulation. The implementation of this controller in the VISTA-FlowControl code will be the next task. The recommendations regarding further use of the code are:
1 See

appendix B for a list of developer related xes

28

CHAPTER 5. CONCLUSIONS, RECOMMENDATIONS AND REFLECTION

29

Pressure spiking; Discussions with the code developer revealed possible causes of this problem. The suggestions made in section 3.4 should be looked into. Since the solver is not making use of the full capabilities of the NJORD supercomputer, at the moment it could use only one processor. The development of a parallel version is currently being looked into. The developer should be contacted about the status of this version. Extraction of the stress vectors (, ,n ) didnt work last time it was tried, the developer would look into this. This is also the reason why the Cd , l in this report contain only the pressure contribution. A slightly better mesh especially around the jet actuation can probably be generated. A ner mesh seems logical, however this is not trivial because a ne mesh around the jets would probably need smaller time steps to keep the CFL number in a reasonable range. This in turn would increase computation time. The parallel version could introduce major improvements in this area. If more work on the extremum seeking will be done, the rst task would be to optimize the cut-o frequencies of the lters and perturbation function, besides trying another cost function. For better performance second order lters could be implemented.

5.3

Reection

It has to be noted that it was not a trivial task to get everything to work as expected, constantly running into small bugs or missing functionality. A list of xes is given in appendix C. Remaining bugs are listed in appendix B. Finding out how to program the actuation, extracting the correct signals, setting the correct solver settings and implementing the correct control structure in a commercial C++ code, without any previous C++ programming knowledge, certainly posed some major challenges. Since everything was done in a super-computing environment, one was dependent on the amount of users and the load of the system. On busy days waiting for more then eight hours before the job was actually running was no exception and thus debugging could become a time consuming task in this setting. In total almost 500 CPU hours are used in the development. All in all a lot was learned from this traineeship.

Bibliography
[1] OM. Aamo and M. Krstic. Backstepping design for a semi-discretized Ginzburg-Landau model of vortex shedding. Proceedings of the American Control Conference, 4:31963201, 2003. [2] OM. Aamo, M. Krstic, A. Smyshlyaev, and B.A. Foss. Output feedback boundary control of a Ginzburg-Landau model of vortex shedding. IEEE transactions on automatic control, 52(4):742748, 2007. [3] O.M. Aamo, A. Smyshlyaev, and M. Krstic. Boundary control of the linearized ginzburg landau model of vortex shedding. SIAM J. Control Optim., 43(6):19531971, 2005. [4] P. Albarede and P. A. Monkewitz. A model for the formation of oblique shedding and chevron patterns in cylinder wakes. Physics of Fluids, 4:744756, April 1992. [5] P. Catalano, M. Wang, G. Iaccarino, I.F. Sbalzarini, and P. Koumoutsakos. Optimization of cylinder ow control via zero net mass ux actuators. [6] J. M. Chomaz, P. Huerre, and L. G. Redekopp. Bifurcations to local and global modes in spatially developing ows. Phys. Rev. Lett., 60(1):2528, Jan 1988. [7] M.L. Facchinetti, E. Langre, and Biolley F. Vortex shedding modeling using diusive van der Pol oscillators. Comptes Rendus Mecanique,, 330:451456, 2002. [8] M.D. Gunzburger and H.C. Lee. Feedback control of Karman vortex shedding. Transaction of the ASME, 93:828835, 1996. [9] C. P. Jackson. A nite-element study of the onset of vortex shedding in ow past variously shaped bodies. Journal of Fluid Mechanics, 182:2345, September 1987. [10] M. Knig, B. R. Noack, and H. Eckelmann. Discrete shedding modes in the von Karman vortex street. Physics of Fluids, 5:18461848, July 1993. [11] M. Krstic and K.B Ariyur. Real-Time Optimization by Extremum-Seeking Control. Wiley, 2003. [12] P.K. Kundu and I.M Cohen. Fluid Mechanics. Elsevier, 2004. [13] Krstic M. and Wang H.-H. Stability of extremum seeking feedback for general nonlinear dynamic systems. Automatica, 36:595601(7), April 2000. [14] C. Min and H. Choi. Suboptimal feedback control of vortex shedding at low Reynolds numbers. Journal of Fluid Mechanics, 401:123156, 1999. [15] Inoue O. Numerical simulation of forced wakes around a cylinder. International Journal of Heat and Fluid Flow, 16:327332(6), October 1995.

30

BIBLIOGRAPHY

31

[16] D.S. Park, D.M. Ladd, and E.W. Hendricks. Feedback control of von karman vortex shedding behind a circular cylinder at low reynolds numbers. Physics of Fluids, 6(7):2390 2405, 1993. [17] M. Provansal, C. Mathis, and L. Boyer. Benard-von Karman instability: transient and forced regimes. Journal of Fluid Mechanics, 182:122, 1987. [18] A. Roshko. On the development of turbulent wakes from vortex streets. NACA Report 1191, 1954. [19] K. Roussopoulos. Feedback control of vortex shedding at low Reynolds numbers. Journal of Fluid Mechanics, 248:267, 1993. [20] K. Roussopoulos and P.A. Monkewitz. Nonlinear modelling of vortex shedding control in cylinder wakes. Phys. D, 97(1-3):264273, 1996. [21] PJ. Strykowski and KR. Sreenivasan. On the formation and suppresion of vortex shedding at low Reynolds numbers. Journal of Fluid Mechanics, 218:71, 1990. [22] Th. von Krmn. ber den Mechanismus des Widerstandes, den ein bewegter Krper in einer Flussigkeit erzeugt. Nacht. Wiss. Ges. Gttingen. Math Phys Klasse 509, 1911. [23] C.-Y. Wen and C.-Y. Lin. Two-dimensional vortex shedding of a circular cylinder. Physics of Fluids, 13:557560, March 2001.

Nomenclature
Re u = (u, v, w) uin uc u v w i p p i pstatic Cl St Cd CF L start/end Ni Tf adein (xs , ys ) k U Reynolds number Velocity vector, consisting of the velocities in x-,y- and z-direction [m/s] Inlet velocity vector set in the code, equal to U [m/s] Velocity vector set by controller on 5 [m/s] Velocity in x-direction [m/s] Velocity in y-direction [m/s] Velocity in z-direction [m/s] Boundary indicator with index i Pressure [P a] Pressure on boundary i [P a] The static pressure on 5 during vortex shedding [P a] Drag coecient Strouhal number Lift coecient Stress tensor [P a] CFL number Angle on cylinder as measured in the classic unit circle [deg] Start and end angle of jets [deg] The angle of a grid point Ni on the cylinder boundary 5 [deg] Fade in period of the control actuation [s] Position of the sensor location in cartesian coordinate system [m] Feedback gain Delay time [s] Free stream velocity [m/s] 32

BIBLIOGRAPHY

33

P l h lp,cost Re60 per Umax,jet d f

Pressure dierence between two points as dened in equation 3.5 [P a] Parameter of system Optimum of parameter such that cost function y has maximum or minimum Cut-o frequency of low-pass lter in extremum seeking scheme [rad/s] Cut-o frequency of high-pass lter in extremum seeking scheme [rad/s] Cut-o frequency of low-pass lter in cost scheme [rad/s] Natural vortex shedding frequency at Re = 60 [rad/s] Frequency of perturbation function in extremum seeking scheme Maximum velocity (peak) of the jet velocity prole, set by the controller [m/s] Cylinder diameter [m] Shedding frequency [Hz] Kinematic viscosity [m2 /s] Dynamic viscosity [P a/s] Density [kg/m3 ]

Appendix A: Short description of DVD contents


On the CD all relevant C++ and Matlab les are present as well as a digital copy of this report. \Report\Report.pdf: This report \C++\FlowControl.cpp: The main le which was edited. \C++\FlowControl.h: The class denition some adjustments made here too. \Matlab\bnd_pres_plot.m: This le was used to sort the contents of the _bnd_pressure.txt les and plot them. \Matlab\lters.m: This le is used to generate the lterpar output le, in this le all lters are dened using state space representation. The lterpar le is then loaded during the VISTA simulation. \Matlab\plotFunction.m: Once the *_output.txt le of a simulation is imported in Matlab this le is used to plot the signals. \Matlab\plotMovieU.m: This le is used to make a moving (movie) plot of the magnitude of the y-velocity. The _contr_point output le has to be loaded for this, in matrix form. \Matlab\freq.m: This le can be used to generate gure 2.6 in this report. \Matlab\SIMmonitor.m: This le can be used to monitor a simulation live. Provided SSH-client tunneled the FTP connection, and Netdrive is used to map it as a physical drive. \Simulations\: In this directory various simulation runs are stored, they can be openend in GLview, or the output les can be imported in Matlab. The basic lenames speak for themselves. \VistaFlowControl\: Latest version of VISTA + manual.

34

Appendix B: List of VISTA shortcomings cq. bugs


The extraction of shear/normal stresses didnt work last time it was tried. This is the reason only the pressure contribution is contained in the Cd , l values used in this report. In GLview it is impossible to make streamline plots, or particle traces. Pressure spiking, although not necessarily a bug.

35

Appendix C: Solved Vista problems


Default code wasnt able to run at all, due to an error in Database.cpp le. Reloading of VTF les was only implemented for the 3D case, SIMRES le format had to be used instead of it. This is extremely unhandy since SIMRES les cannot be loaded into GLview. This was xed and VTF les can be loaded regardless of 2D or 3D cases. Furthermore, saving time intervals can be set independently for VTF and SIMRES formats. Vorticity extraction was not present in the code, it was implemented. The saving of data in VTF format was not without its problems. At rst every time step was written to the VTF le while only one in X time steps had actual data in it, as dened in the cylinder2D.i le. This was solved in the second version were the only the time-steps containing data were saved to the VTF. An inquiry was made about the units the results of the code were in. The answer is twofold. Huge pressure spikes occurred ( 103 ) at the beginning of a simulation t = 02 . This was due the fact that the velocity was set from 0 to 1 in the rst time-step. Incompressibility then caused the pressure spike. The functions which set the boundary conditions were extended. Now two boundary conditions exist for 3 , code 1 and code 9 to be set in the cylinder2D_bc.dat le. Code 9 is the new function which linearly fades in the velocity in the interval 0 t 1 [s], thus whatever end velocity is set in the cylinder2D.i le will be present at the boundary at t = 1. Code 1 has to be used if reloading a simulation. The possibility to extract the CFL number was not present in the beginning, now it is. The extraction of data from an arbitrary range of points in the mesh was not yet implemented, around mid-november this was nalized and successfully tested. The points accessible inside the code can be dened in controllerpoints.dat. After discussions with the developer regarding accuracy, another mesh was created. Rened in the boundary layer. The block structure of the mesh is created in such a way that the mesh can be further rened in the boundary layer independently from the rest of the mesh. If needed this 13300 element mesh can be used to get high accuracy results especially at higher Reynolds numbers.
2 Independent

from pressure spikes in the remaining of simulation

36

Appendix

37

After getting the last version of VISTA-FlowControl Removed unnecessary warnings in the report le at the beginning of simulations, which caused the solver to stop because of too many self generated warnings!! Better estimate of the CFL number. Since simulations with small time steps last extremely long, it was advised that a parallel version of the code should be developed. This version would also make much better use of NJORDs capabilities but it is still under development. The last suggestions from the developer concerning pressure spiking: If you want to test with mixed elements (different order of elements for pressure and velocity) yourself, you only have to make the following modifications

1. Generate a new mesh in Griddler with second order elements (9 node elements): You only have to change the element type q4 to q9 at the end of the Griddler input file (cylinder2D.gri) and then generate a new mesh based on the modified inp 2. Change the element type in the input file to Vista: set velocity element = ElmB9n2D set pressure element = ElmB9gn4bn2D

You could also check if the pressure peaks disappear if you either increase the times or refine the mesh. This should also stabilize the splitting scheme we use to solve t incompressible Navier-Stokes equations.

You might also like