Implementation of an extremum seeking controller for ... · seeking controller for vortex shedding...

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): Prof. O.M. Aamo, NTNU Trondheim Supervisor: Prof. H. Nijmeijer Technische Universiteit Eindhoven Department Mechanical Engineering Dynamics and Control Group Eindhoven, January, 2008

Transcript of Implementation of an extremum seeking controller for ... · seeking controller for vortex shedding...

Page 1: Implementation of an extremum seeking controller for ... · seeking controller for vortex shedding ... The dynamics of vortex shedding ... 2.1 General aspects of flow past cylinder

Implementation of an extremumseeking controller for vortexshedding attenuation in a 2D

CFD codeP.G.M. Hoeijmakers

DCT 2008.09

Traineeship report

Coach(es): Prof. O.M. Aamo, NTNU Trondheim

Supervisor: Prof. H. Nijmeijer

Technische Universiteit EindhovenDepartment Mechanical EngineeringDynamics and Control Group

Eindhoven, January, 2008

Page 2: Implementation of an extremum seeking controller for ... · seeking controller for vortex shedding ... The dynamics of vortex shedding ... 2.1 General aspects of flow past cylinder

Abstract

The dynamics of vortex shedding has been an interesting research subject for many years. In thelast years the number of publications related to flow control techniques has steadily increased. Theinterest herein can be easily explained. The various dynamical forces acting on cylinders (andother bluff bodies) in a flow, and particularly those resulting from the periodic vortex sheddingbehaviour, impose structural engineering challenges; fatigue in an oil drill pipe in the ocean is onlyone of numerous examples. Advances in computer technology make it possible to solve the Navier-Stokes equations, and to easily experiment with a range of control techniques. In this work it isvalidated that the VISTA-FlowControl CFD code, developed specifically for the purpose of flowcontrol applications, is suitable for CFD simulations containing flow control. The velocity feedbackcontrol method is successfully applied in this code. Pressure feedback has also been tried but provedunsuccessful, possibly due to specific solver problems. The velocity feedback control is slightly alteredby adding a time delay to the controller. This allows a phase shift which can not only attenuatebut also amplify the vortex shedding. Furthermore, the extremum seeking control technique, suitedparticularly for difficult to model non-linear systems, proved successful in finding an optimum valueof the time delay which minimizes the shedding amplitude. The advantage of this approach is thatthe controller will try to keep the shedding amplitude to a minimum even if the flow conditionschange.

Page 3: Implementation of an extremum seeking controller for ... · seeking controller for vortex shedding ... The dynamics of vortex shedding ... 2.1 General aspects of flow past cylinder

Contents

1 Introduction 21.1 Motivation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21.2 Literature review . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21.3 Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31.4 Outline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

2 The system 42.1 General aspects of flow past cylinder . . . . . . . . . . . . . . . . . . . . . . . . . . . 42.2 CFD solver, mesh and data extraction . . . . . . . . . . . . . . . . . . . . . . . . . . 5

3 Feedback control of vortex shedding. 103.1 General description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103.2 The actuation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113.3 Velocity feedback . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

3.3.1 Feedback without delay . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123.3.2 Feedback with delay . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

3.4 Pressure feedback . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

4 Real time optimization 214.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214.2 The basic scheme . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214.3 The cost function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 224.4 Selection of filter parameters and perturbation function . . . . . . . . . . . . . . . . 234.5 Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

5 Conclusions, recommendations and reflection 285.1 Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285.2 Recommendations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285.3 Reflection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

Nomenclature 32

Appendix A: Short description of DVD contents 34

Appendix C: List of VISTA bugs 35

Appendix D: Solved VISTA problems. 36

1

Page 4: Implementation of an extremum seeking controller for ... · seeking controller for vortex shedding ... The dynamics of vortex shedding ... 2.1 General aspects of flow past cylinder

Chapter 1

Introduction

1.1 MotivationFlow 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 fewexamples. Due to the dynamical and vibrational nature of these flows, which often produce acharacteristic sound, these mechanical objects are loaded with oscillating forces, which in turn mayintroduce fatigue problems. On the other hand, one might want to amplify the vortex sheddingas to enhance the mixing behind an object. This means that the subject is not only interestingin a fundamental physical way, but also from a practical engineering point of view. It should beclear to the reader that the suppression of these oscillations may introduce significant advantages orpossibilities. Presently, this is often done by passive devices which disturb or alter the flow somehow,i.e. a spiral around a factory exhaust pipe.Thanks to the significant progress in control and computer technology, it became possible to solve thegoverning equations of fluid flow numerically in 2 and 3D simulations. These two combined make upan interesting new research area: flow control. In this work a computational fluid dynamics (CFD)solver called VISTA-FlowControl is used to test various control strategies which suppress the charac-teristic vortex shedding from a cylinder. VISTA was initially developed at NTNU1 in collaborationwith SINTEF2 Applied Mathematics for the purpose of solving a large range of computational me-chanics problems. The flow solver module inside VISTA is an object-oriented Navier-Stokes solverfor incompressible flows, specifically optimized to run on large parallel computer systems. VISTAmakes extensive use of the DIFFPACK package, which is a general object-oriented developmentframework for the solution of partial-differential equations.

1.2 Literature reviewThe steady and dynamical flow around a cylinder has intrigued many researchers during the lastdecades and is still a subject of great interest. It provides a good base to study the transition fromlaminar to turbulent flows and thus is of great physical importance. Almost all founders of fluidmechanics investigated the subject, notably von Karman [22]. The first systematic experiments aredone by Roshko[18]. Research in [9] shows that at Re = 47 a supercritical Hopf bifurcation occurs.

1Norges Teknisk-Naturvitenskapelige Universitet2SINTEF is an institute comparable to the dutch TNO

2

Page 5: Implementation of an extremum seeking controller for ... · seeking controller for vortex shedding ... The dynamics of vortex shedding ... 2.1 General aspects of flow past cylinder

CHAPTER 1. INTRODUCTION 3

The existence of 3D effects is investigated in [17]. More recently it became possible to do experimentswhich closely approximate the 2D case using thin oil films [23]. These results are particularly usefulfor comparison with 2D CFD calculations. From the beginning efforts have been made to suppressvortex 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 activeforcing/control of vortex shedding. In [15] the periodic forcing of two jets placed at ±80[deg] fromthe stagnation point is used to control both the near and far wake. Another article treats the optimallocation of the jets in such a setup [5], although at higher Reynolds numbers than covered in thisreport. In [16] the velocity feedback method is pioneered by using two jet actuation slots resulting inthe attenuation of the vortex shedding up to Re = 60. In [19] successful experiments are conductedwith feedback control, using actuation from a speaker based on the velocity phase information ata point in the near wake. Most of these control methods are based on physical insight rather thanmathematical models of the flow. Efforts to accurately model and explore the dynamics of the bluffbody wake are done in, [4],[10] and [6]. In [7] diffusive van der Pol oscillators are used to modelthe near-wake dynamics. Currently however, the spatially varying Ginzburg-Landau model is themost promising, as presented in [6], and further investigated in [4]. A more model-based suboptimalfeedback control method, which is able to suppress the drag/lift fluctuation up to Re = 160, issuccessfully tried in [14]. The nonlinear modeling of vortex shedding including control based on theGinzburg-Landau equation is treated in [20]. Other efforts in this direction are made in [1] where abackstepping controller based on the Ginzburg-Landau model is tried, but never verified with realCFD experiments. An extensive treatment on extremum seeking control including practical casescan be found in [11] and [13].

1.3 ObjectivesThis research suits three main goals. The Department of Engineering Cybernetics at NTNU haspreviously been working on model-based flow controllers but no suitable CFD code has been availableto actually verify these (complex) controllers. SINTEF got the task of developing a module for theirVISTA CFD package which allows flow control applications. This VISTA-FlowControl module didn’tundergo any real practical testing by the time this work started. Getting VISTA-FlowControl upand running, debugging and verifying that all needed functionality is there is the first objective. Thesecond task is to implement an actual pressure or velocity feedback scheme for the attenuation ofthe vortex shedding behaviour around a cylinder. If this would prove successful, the implementationof an extremum seeking controller, which acts on a parameter of the feedback controller, would bethe third objective.

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

Page 6: Implementation of an extremum seeking controller for ... · seeking controller for vortex shedding ... The dynamics of vortex shedding ... 2.1 General aspects of flow past cylinder

Chapter 2

The system

2.1 General aspects of flow past cylinderThe dynamics of the cylinder wake are usually quantified as the Strouhal number St = fd/U∞, asa function of the Reynolds number,Re = U∞d/ν. Here f is the vortex shedding frequency, ν thekinematic 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 horizontaland vertical symmetry of the flow (streamlines) can be observed. At Reynolds numbers greaterthan Re = 4 two attached eddies appear behind the cylinder and elongate downstream at increasingReynolds number, see also figure 2.1. The flow is still horizontally symmetrical. When Re = 46 themain dynamical instability occurs, which can be classified as a Hopf bifurcation [9]. This instabilitypresents itself as the von Karman vortex street. In the 3D case a subcritical instability occurs atRe = 180 − 194 and a supercritical instability at Re = 230 − 250. For Re < 200 the wake vorticesare 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 flow over a circular cylinder. [12]

4

Page 7: Implementation of an extremum seeking controller for ... · seeking controller for vortex shedding ... The dynamics of vortex shedding ... 2.1 General aspects of flow past cylinder

CHAPTER 2. THE SYSTEM 5

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

2.2 CFD solver, mesh and data extractionAdvances in computer technology in the last decades have made it possible to perform increasinglydetailed simulations of the vortex shedding behaviour. The solver used in this work, VISTA, solvesthe Navier-Stokes equations;

ρ∂u

∂t+ ρ(u · ∇u) +∇p− µ∇u = f

∇ · u = 0(2.1)

where ρ is the density of the fluid, u = (u, v) is the velocity vector with (u, v) the velocities in x- andy-direction, p is the pressure, µ the dynamic viscosity and f an external body force. Furthermore,the assumption of free stream flow is made, and the flow at the boundaries is not affected by thecylinder. The following boundary conditions are used;

σ · n = 0 on Γ1 (2.2)u · n = 0 on Γ2 ∪ Γ4 (2.3)τ · σ · n = 0 on Γ2 ∪ Γ4 (2.4)u = uin on Γ3 (2.5)u = uc(t) on Γ5 (2.6)

(2.7)

where the boundaries are denoted by Γi, also depicted in figure 2.2. Furthermore uin is the inletvelocity vector at Γ3 and uc(t) is the velocity vector on the cylinder boundary Γ5 due to controlactuation. Besides, n and τ are the unit outer normal and tangent vectors, while σ is the stresstensor given by:

σ = −pI + µ∇u (2.8)

A lot of comparison data is available to verify VISTA’s performance but the results from the ex-periments with ultra thin soap films in [23] are of particular interest. These experiments can beseen as the first real 2D experiments. The results summarized in [23] are thus very well suited as abenchmark for VISTA. To extract the relevant data the VISTA code was changed to store a range ofsignals in output files1. These output files are then loaded in Matlab to gather the needed data. TheStrouhal number is determined from the frequency spectrum of the pressure signal on ±45 degreesfrom the stagnation point. An example of the spectrum at Re = 100 is shown in figure 2.3.Verifying the VISTA code is done by using three different meshes of 11200, 13300 and 32000 elements.Only the first and second one are used in the remainder of the work, since the performance of thethird one is not significantly better than of the second one. This is because the extra elements ofthe second mesh are mainly located in the boundary layer around the cylinder, while the third onehas an overall finer mesh. All elements used are first order, four node 2D elements.

1For details see appendix A

Page 8: Implementation of an extremum seeking controller for ... · seeking controller for vortex shedding ... The dynamics of vortex shedding ... 2.1 General aspects of flow past cylinder

CHAPTER 2. THE SYSTEM 6

Figure 2.2: The basic domain with the boundaries

The default coarse mesh of 11200 elements is shown in figure 2.4. The refinement of the second mesharound the boundary layer is shown in figure 2.5.Figure 2.6 shows the results from Vista calculations after using different solver settings. The solidand 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, fits well to 2D oil filmexperiments. This means that VISTA should, at the right solver settings, be able to reproduce pointson the Henderson curve. The Roshko curve is a fit on 3D experimental data and is only depictedas a reference. Table 2.1 shows the details of the data points in figure 2.6. It is clear that smallertime-steps and mesh size significantly improve the accuracy of the code, although this also increasescalculation time.

Re Elem [nr] dT [s] Stexp Stsim Abs(Error) % Tcalc,100s [s] Figure symbol47 11200 .025 .117 .138 17.9 1:00 �100 11200 .025 .167 .167 0 1:00 �200 11200 .025 .197 .186 5.6 1:00 �400 11200 .025 .220 .200 9.0 1:00 �400 32000 .010 .220 .214 2.7 ? ◦400 13300 .005 .220 .214 2.7 8:30 ·400 13300 .001 .220 .220 0 35:00 ?600 11200 .025 .229 .205 10.5 1:00 �600 32000 .010 .229 .220 4.0 ? ◦600 13300 .005 .229 .226 1.4 8:30 ·

Table 2.1: Solver settings and errors at different Reynolds numbers

In CFD codes it is customary to use a parameter which measures how well conditioned the mesh-sizeand time-step size are for the actual flow conditions at hand. This is the Courant, Freidricks andLevy number, and has a general form defined as: CFL = ∆t ∗ u/∆x. Usually the goal in CFD is tokeep CFL < 1. In the case the solver uses a variable time-step, the size of the time-step is scaledaccording to this condition. In the setup used in this research the most critical part of the meshis around the jets. This effect can also be seen well in figure 2.7a and 2.7b, where a correlation

Page 9: Implementation of an extremum seeking controller for ... · seeking controller for vortex shedding ... The dynamics of vortex shedding ... 2.1 General aspects of flow past cylinder

CHAPTER 2. THE SYSTEM 7

0 0.1 0.2 0.3 0.4 0.50

0.5

1

1.5

2

Frequency (Hz)

|ps1

(f)|

0 10 20 30 40 50 60 70 80 90−4

−2

0

2

4

Time [s]

ps1

[Pa]

Figure 2.3: Time plot and frequency spectrum of ps1 at Re = 600, where s1 is a measuring pointlocated 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.

Page 10: Implementation of an extremum seeking controller for ... · seeking controller for vortex shedding ... The dynamics of vortex shedding ... 2.1 General aspects of flow past cylinder

CHAPTER 2. THE SYSTEM 8

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

0 200 400 600 800 10000.12

0.14

0.16

0.18

0.2

0.22

0.24

Reynolds number

Str

ou

hal

nu

mb

er

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

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

Page 11: Implementation of an extremum seeking controller for ... · seeking controller for vortex shedding ... The dynamics of vortex shedding ... 2.1 General aspects of flow past cylinder

CHAPTER 2. THE SYSTEM 9

400 420 440 460 480 5000

0.05

0.1

0.15

0.2

0.25

0.3

0.35

Time [s]

|Um

ax,je

t|

(a) Actuation

400 420 440 460 480 5001.08

1.09

1.1

1.11

1.12

1.13

1.14

1.15

1.16

Time [s]

CF

L

(b) CFL number

Figure 2.7: The relationship between CFL number and actuation velocity. Figures made from thevelocity feedback case.

between the magnitude of the actuation and the CFL number is to be observed. In general, onehas to make sure that a sufficient small time-step is chosen to allow for the wanted mesh-size andvelocities. From a pure accuracy point of view, it can be concluded that for all further experimentsdone in this work, all at Re = 60, the coarse mesh using a time step of 0.025 [s] will be sufficient.

Page 12: Implementation of an extremum seeking controller for ... · seeking controller for vortex shedding ... The dynamics of vortex shedding ... 2.1 General aspects of flow past cylinder

Chapter 3

Feedback control of vortex shedding.

3.1 General descriptionThe attenuation of vortex shedding by feedback control is an idea that has been in existence formany years, and in general two approaches can be taken with actuation on the cylinder boundary,both illustrated in figure 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. Thismeans that measurement and actuation are located closely together on the same boundary. Inthe 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 thissignal is fed back to i.e. jets at ±110[deg] In the remainder of the report this is being referredto 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 sheddingcompletely at Re = 60. The co-located setup, containing pressure measurements, would be easier to

10

Page 13: Implementation of an extremum seeking controller for ... · seeking controller for vortex shedding ... The dynamics of vortex shedding ... 2.1 General aspects of flow past cylinder

CHAPTER 3. FEEDBACK CONTROL OF VORTEX SHEDDING. 11

realize in practice, but the actual attenuation behaviour is apparently harder to achieve. This setupis 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 issuitable for control at all, a simple feedback control setup is tried analogously to what is done in[16].

3.2 The actuationThe actuation is done by using blowing and suction slots at ±110[deg] from the stagnation pointwith a span of 15[deg]. The location of the jets is in the optimal zone which is confirmed by [5].The physical explanation lies in the fact that around ±125[deg] the boundary layer separates, andtherefore it is probable that around this point the vortex shedding can be influenced the most. Thejets are working in opposite phase to ’pull’ and ’push’ against the natural vortex shedding. Theadvantage of this is that the actuation has a zero net mass flux into and out of the domain andby that is likely to keep the solver stable. In a practical situation this could also be beneficial; thepush-pull movement can be created by a vibrating membrane analogous to the speaker-actuatedcase in [19]. No internal fluid supply lines would be necessary in this situation The velocity profileof the jet is set according to:

uc(α, t) · n = Umax,jetsin(π

αspan(αNi

− αstart)). (3.1)

Where Umax,jet is the maximum velocity determined by the controller in the center of the jet. Thisis effectively providing a suitable control parameter for the jet. Besides, αNi

is the angle of theactual node in the mesh, while αstart,end are the start and end angles of the jet, clarified further infigure 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 approxi-mately one natural vortex shedding period (@Re = 60, Tfadein = 6[s]).

Page 14: Implementation of an extremum seeking controller for ... · seeking controller for vortex shedding ... The dynamics of vortex shedding ... 2.1 General aspects of flow past cylinder

CHAPTER 3. FEEDBACK CONTROL OF VORTEX SHEDDING. 12

3.3 Velocity feedback

3.3.1 Feedback without delayIn this section the non co-located setup described in [16] is imitated. This method uses the y-velocitysignal measured somewhere in the wake, as the controller input signal. The basic setup is shown infigure 3.1 where in this case only the red signal path is used. In practice this configuration would bemore difficult to realize because of the accurate mid-stream measurements needed. Since this solveris specifically designed for flow-control, the value of v(x, y, t) at any location in the domain can beextracted 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 wasperformed at Re = 60, and like in [16], (xs, ys) = (2.75, 0) is used as the sensor location. Because thevortex shedding has to be fully developed to display the effect of control the clearest, the control wasturned 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 varioussignals in figures 3.3a-3.3f, and especially figure 3.4. The drag reduction is in the order of 5%, as canbe seen in Cd graph1. The 3D plot in figure 3.5a shows the pressure distribution over the cylinderduring the simulation. Like in figure 3.3b the pressure variations are clearly visible, the resultinglift fluctuation would in a practical situation lead to (structural) vibrations. To clarify the pressurevariations, the static pressure on the cylinder (pstatic) is subtracted, which results in the figures3.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 figure 3.6a leads to the conclusion that the actuation indeed runs in anti-phase withthe local pressure variations. It is interesting to note that the pressure and especially the phase ofit, between −80 < θ < +80 [deg] (the inner-part of the graph), is hardly affected by the actuation.In figure 3.6b the graph is turned upside down. From this one can say that the actuation is exactlylocated around the point where the magnitude of the pressure variation is the highest. Snapshotsmade with GLVIEW2 of the u and ωz fields are shown in figure 3.5, the attenuation of the sheddingamplitude is clearly visible.

3.3.2 Feedback with delayThe final goal of this work is to implement an extremum seeking controller, hence some parameterhas to be chosen for the extremum seeking to act on. The variation of this parameter should influencea certain cost function of the system, which in this case is easily chosen as the absolute value ofv(xs, ys, t)3 eventually smoothed by a low-pass filter. Suppose a delay is introduced in the feedbackcontroller 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 theshedding dynamics on the cylinder, and thus is able to attenuate or promote vortex shedding.

1Since some bug in the code prevented the extraction of the skin friction, the calculated drag and lift coefficientscontain the pressure contribution only. However, the qualitative behaviour is likely to be the same. This also explainswhy the absolute values are not in accordance with i.e. [16]

2The visualization program used in this work3See section 3.4 for more information

Page 15: Implementation of an extremum seeking controller for ... · seeking controller for vortex shedding ... The dynamics of vortex shedding ... 2.1 General aspects of flow past cylinder

CHAPTER 3. FEEDBACK CONTROL OF VORTEX SHEDDING. 13

400 450 500 550 600−0.4

−0.3

−0.2

−0.1

0

0.1

0.2

0.3

0.4

Time [s]

v(x

s,ys)

[m/s

]

(a) v(2.75, 0, t)

400 450 500 550 600−0.08

−0.06

−0.04

−0.02

0

0.02

0.04

0.06

0.08

0.1

Time [s]

∆ P

[Pa]

(b) ∆P (t)

400 450 500 550 600−0.4

−0.3

−0.2

−0.1

0

0.1

0.2

0.3

Time [s]

Um

ax,je

t [m/s

]

(c) Umax,jet(t)

400 450 500 550 600−0.15

−0.1

−0.05

0

0.05

0.1

0.15

0.2

Time [s]

Cl

(d) Lift coefficient, Cl(t)

400 450 500 550 600

1.13

1.14

1.15

1.16

1.17

1.18

1.19

Time [s]

Cd

(e) Drag coefficient, Cd(t)

400 450 500 550 6001.08

1.09

1.1

1.11

1.12

1.13

1.14

1.15

1.16

Time [s]

CF

L

(f) CFL(t)

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

Page 16: Implementation of an extremum seeking controller for ... · seeking controller for vortex shedding ... The dynamics of vortex shedding ... 2.1 General aspects of flow past cylinder

CHAPTER 3. FEEDBACK CONTROL OF VORTEX SHEDDING. 14

400 420 440 460 480 500 520 540 560 580 60010

−10

10−8

10−6

10−4

10−2

100

Time [s]

|v [m

/s]|

Fine mesh, ∆ t=.005, CFL≈.0.3

Coarse mesh, ∆ t=.025, CFL≈1.14

Figure 3.4: Semilog plot of the absolute value of v(2.75, 0, t) for both the fine and coarse meshes.

Page 17: Implementation of an extremum seeking controller for ... · seeking controller for vortex shedding ... The dynamics of vortex shedding ... 2.1 General aspects of flow past cylinder

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]

Page 18: Implementation of an extremum seeking controller for ... · seeking controller for vortex shedding ... The dynamics of vortex shedding ... 2.1 General aspects of flow past cylinder

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 figure 3.5b upside down.

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

Page 19: Implementation of an extremum seeking controller for ... · seeking controller for vortex shedding ... The dynamics of vortex shedding ... 2.1 General aspects of flow past cylinder

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 different times in the simulation, with control started att = 425s.

Page 20: Implementation of an extremum seeking controller for ... · seeking controller for vortex shedding ... The dynamics of vortex shedding ... 2.1 General aspects of flow past cylinder

CHAPTER 3. FEEDBACK CONTROL OF VORTEX SHEDDING. 18

0.5 1 1.5 2 2.5−0.4

−0.3

−0.2

−0.1

0

0.1

0.2

0.3

0.4

v [m

/s],

Tim

e=40

1.5[

s]

x [m]

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

400 410 420 430 440 450−0.4

−0.3

−0.2

−0.1

0

0.1

0.2

0.3

0.4

Time [s]

v(x

s,ys)

[m/s

]

v(2.75.7,0,t)v(1.7,0,t−2)*1.6v(1.7,0,t)

(b) Shift of v(1.7, 0, t) to v(2.75, 0, t), control activatedat 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 figure 3.8a, where the y-velocities of a range of points, on the x-axis behindthe 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 Matlabthe signal from the sensor at (xs, ys, t) = (1.7, 0, t) is fitted to the signal at (xs, ys, t) = (2.75, 0, t).This process is depicted in figure 3.8b, as can be seen in the figure τ = 2 and k = 1.6 give an almostexact 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 shownin figure 3.9. Comparison with figure 3.3 reveals little to no differences. In chapter 4 the extremumseeking controller is applied to the variable τ , admittedly the optimum for attenuation is knownalready as τ = 2[sec].

3.4 Pressure feedbackThe 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 (3.4)

∆P = p(xs2, ys2, (t− τ))− p(xs1, ys1, (t− τ)) (3.5)

where P (xs1,s2, ys1,s2, t) are the pressures at two different sensor locations, s1, s2, on the cylinderboundary, preferably symmetrically placed with respect to the x-axis. This situation is also drawnin as the black signal path in figure 3.1. In this way the static part of the pressure signal is notpresent, and only the variations in the pressure are left. Since this pressure signal is not expectedto have the correct phase needed for attenuation, a delay time τ is added which shifts the signalto the needed phase. The correct delay and gain are determined after comparing the un-delayedpressure signal at free vortex shedding with the v(2.75, 0, t) feedback signal. One would expect thatthe ∆P signal needs to be approximately in phase with this signal to promote the attenuation ofthe 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 figure 3.10a.The ∆P signal obviously shows a spiking behaviour. Since this spiking signal is fed back to the

Page 21: Implementation of an extremum seeking controller for ... · seeking controller for vortex shedding ... The dynamics of vortex shedding ... 2.1 General aspects of flow past cylinder

CHAPTER 3. FEEDBACK CONTROL OF VORTEX SHEDDING. 19

400 450 500 550 600−0.25

−0.2

−0.15

−0.1

−0.05

0

0.05

0.1

0.15

0.2

0.25

Time [s]

v(x

s,ys)

[m/s

]

(a) v(1.7, 0, t)

400 450 500 550 600−0.08

−0.06

−0.04

−0.02

0

0.02

0.04

0.06

0.08

Time [s]

∆ P

[Pa]

(b) ∆P (t)

400 450 500 550 600−0.4

−0.3

−0.2

−0.1

0

0.1

0.2

0.3

Time [s]

Um

ax,je

t [m/s

]

(c) Umax,jet

400 450 500 550 600−0.2

−0.15

−0.1

−0.05

0

0.05

0.1

0.15

Time [s]

Cl

(d) Lift coefficient, Cl

400 450 500 550 600

1.13

1.14

1.15

1.16

1.17

1.18

1.19

Time [s]

Cd

(e) Drag coefficient, Cd

400 450 500 550 6001.08

1.09

1.1

1.11

1.12

1.13

1.14

1.15

Time [s]

CF

L

(f) CFL number

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

Page 22: Implementation of an extremum seeking controller for ... · seeking controller for vortex shedding ... The dynamics of vortex shedding ... 2.1 General aspects of flow past cylinder

CHAPTER 3. FEEDBACK CONTROL OF VORTEX SHEDDING. 20

484.5 485 485.5 486 486.5

0.07

0.08

0.09

0.1

0.11

0.12

0.13

0.14

0.15

Time [s]

∆ P

[P

a]

(a) Frequently encountered example of the ∆Psignal

400 420 440 460 480 500−3

−2

−1

0

1

2

3

Time [s]

Um

ax,je

t [m/s

]

Umax,jet

in ∆ P feedback

Umax,jet

in v(xs,y

s) feedback

(b) Feedback using filtered ∆P signal

Figure 3.10: ∆P signal evaluation

jet actuation, the incompressibility causes a spike at the pressure sensor again, which leads to anavalanche effect until the solver is unable to handle it and diverges. It has to be remarked that theactual calculations sometimes continue regardless of pressure- and actuation-peaks up to 103[Pa].Naturally the results are of no physical value long before this point is reached. It was shortlythought that the spiking might be caused by the measuring on the boundary itself. Regrettablynew simulations where (xs, ys) was moved one mesh element radially outward, showed the sameproblems. After discussions with the developer it has been concluded that this spiking may be dueto one of the following reasons:

• The solver uses a continuous projection method, where the computation of the velocity andpressure are split. This means that the calculation of velocity and pressure is done by usingthe same element class. Thus, the order of the element support functions is the same, whichaccording to the developer, might lead to a correcting behaviour in some cases. The solutioncould then be to try different element classes for velocity and pressure, there was however notime to verify this4.

• Time step size and mesh size might be of importance since solver stability is, according to thedeveloper, partially dependent on the time step size. Selection of smaller time steps meansless stable behaviour5.

In an effort to solve this problem, the pressure signal is first passed through a suitable low pass filter.This approach is taken in the results shown in figure 3.10b. In this run the ∆P signal is first filteredby the low-pass filter using ωcutoff = 0.5 · 2π[rad/s] and then delayed and amplified6 to match itwith the feedback signal from the v(2.75, 0, t) feedback run. One would predict that this gives thebest conditions for attenuation behaviour but figure 3.10b shows that this is not the case. Althoughthe solver is much more stable (no small spiking) this actual setup causes the vortex shedding tobe amplified to the extreme. It has to be noticed that it is not really known if ∆P control actuallyworks, 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.

4See also appendix C5Contrary to what one would expect6τ = 4.8[sec],k = 5 The fact that the first order low pass filter cut off frequency is very close to ωRe60 and thus

introduces a phase shift too was also taken into account

Page 23: Implementation of an extremum seeking controller for ... · seeking controller for vortex shedding ... The dynamics of vortex shedding ... 2.1 General aspects of flow past cylinder

Chapter 4

Real time optimization

4.1 IntroductionEven though the controllers introduced in chapter 3 are able to attenuate the vortex sheddingcompletely, 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 flow conditions at hand or they may be continuously changing. Thevelocity feedback method which includes the delay makes it possible to easily adjust to new flowconditions. The value of τ determines wether the vortex shedding will be amplified or dampened.The only thing needed to attenuate the vortex shedding in new flow conditions is a new optimalvalue of τ . The introduction of an extremum seeking controller which acts on τ enables the controlstructure to optimize τ continuously.

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

21

Page 24: Implementation of an extremum seeking controller for ... · seeking controller for vortex shedding ... The dynamics of vortex shedding ... 2.1 General aspects of flow past cylinder

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 outputof the system has an unknown minimum or maximum at θ∗. An excellent explanation of the basicprinciple of the extremum seeking is given in [13],

A slow perturbation signal asin(ωt) is added to the signal θ̂ , the current best estimateof θ∗. If the perturbation is slow enough, the plant appears as a static map to the costfunction thus the dynamics do not interfere with the peak seeking scheme. If θ̂ is oneither side of θ∗, the perturbation asinωt will create a periodic response of y which iseither in or out of phase with asinωt. The high-pass filter s

s+ωheliminates the "DC

component" of y. Thus, asinωt and ss+ω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" whichis extracted by the low-pass filter ωl

s+ωl. The "DC component" ξ can be argued to

be approximately the sensitivity (a2/2)(h · l)′(ω̂). Then the integrator θ̂ = (k/s)ξ isapproximately the gradient update law ˙̂

θ = k(a2/2)(h · l)′(ω̂) driven by the sensitivityfunction which tunes θ̂ to θ∗.

In the context of vortex shedding one could easily define θ = τ . The choice of a suitable cost functionis treated in the next section.

4.3 The cost functionThe 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 ispicked as the basic signal and manipulated according to the scheme in figure 4.2.

1In case of a maximum2Note 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.

Page 25: Implementation of an extremum seeking controller for ... · seeking controller for vortex shedding ... The dynamics of vortex shedding ... 2.1 General aspects of flow past cylinder

CHAPTER 4. REAL TIME OPTIMIZATION 23

−1 0 1 2 3 4 50

0.05

0.1

0.15

0.2

0.25

0.3

0.35

τ [s] A

v(1,

0,10

0) [m

/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 simulationsare ran with τ static in the range τ = [0 .5 1 1.5 2 2.5 3.0 3.5 4.0]. The simulations are ran for100[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, theresult can be seen in figure 4.3. To check that the whole setup actually is able to find a minima of thecost function using a continuous varying delay, another simulation is performed with τ continuouslyvariative between zero and four seconds. This transient behaviour is shown in figure 4.4, where onecan clearly see that the cost function is indeed more sensitive for all τ > 2.5 [s] in comparison toall τ < 2 [s]. This also means that the extremum seeking does not necessarily converge to τ = 2but to a lower value like τ = 1.5, provided that the perturbation function lies somewhere in thestrongly attenuating region around τ = 2. From these results it is reasonable to expect that a wellchosen continuous perturbation function acting on τ will indeed promote convergence to a completelyattenuated vortex shedding state.

4.4 Selection of filter parameters and perturbation functionThe choice of the filter cut-off frequencies is partially done using experience gained from the variousprevious simulation runs. Different choices can be made according to the specific demands of aparticular run. A combination of high perturbation frequency and amplitude will lead to a relativelyfast convergence, but at the risk of overshooting the closest optimum. Furthermore, a too highamplitude might not allow the vortex shedding to disappear completely.Based on figures 4.3 and 4.4, some general observations can be made concerning the order of asuitable amplitude and frequency for the perturbation signal.

Perturbation function

From looking at figure 3.3 one can see that within 30 [s] the signal is at less then 5% of its originallevel. This justifies the assumption that a perturbation frequency of ωper = 0.008 · 2π is sufficiently

Page 26: Implementation of an extremum seeking controller for ... · seeking controller for vortex shedding ... The dynamics of vortex shedding ... 2.1 General aspects of flow past cylinder

CHAPTER 4. REAL TIME OPTIMIZATION 24

400 450 500 550 600 650 700 750 800−0.8

−0.6

−0.4

−0.2

0

0.2

0.4

0.6

0.8

Time [s]

v(x

s,ys)

[m/s

]

(a) v(2.75, 0, t)

400 450 500 550 600 650 700 750 8000

0.05

0.1

0.15

0.2

0.25

0.3

0.35

Time [s]

Co

st

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

400 450 500 550 600 650 700 750 8000

0.5

1

1.5

2

2.5

3

3.5

4

Time [s]

τ [s

]

(c) The delaytime τ

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

Page 27: Implementation of an extremum seeking controller for ... · seeking controller for vortex shedding ... The dynamics of vortex shedding ... 2.1 General aspects of flow past cylinder

CHAPTER 4. REAL TIME OPTIMIZATION 25

slow. From the graph of the cost function 4.3 and figure 4.4 it is concluded that an amplitude of 0.5allows the extremum seeking to converge, while the vortex shedding will still be fully attenuated.

Low-pass filter in cost function

Since ωper must be in the pass band of the low-pass filter 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 istoo ωper the smoother the cost function will be, due to the first order nature of the filters a ωlp,cost

too close to ωper will cause the filter to attenuate the perturbation frequency, something which isnot 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 filter

Taking under consideration that the job of the high pass filter is to filter out the ’DC component’of the cost function, while preserving the perturbation, ωper = 0.008 · 2π should be in the pass bandof the filter. This means that ωhp = 0.003 ∗ 2π is a suitable choice.

Low-pass filter

The only task of the low-pass filter is to smoothen the signal after the multiplication in the extremumseeking scheme. However, a very low ωlp would lead to slow convergence if the gain in the integratorwill 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 rateof the scheme. Here the conservative value of k = 3 is used.

4.5 ResultsThe results of the extremum seeking can be observed in figure 4.5. Here the initial time delay wasset 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 different as explainedin section 4.3. From the graph it should be clear that this simulation was not without difficulties.The algorithm first goes in the wrong direction and arrives at τ < 0, which is obviously not possibleand the feedback loop is broken3. Consequently, the vortex shedding becomes stronger again andthe scheme searches in the other direction arriving at τ ≈ 1.7 [s]. The convergence of τ and the costfunction can be observed in figure 4.64. Apparently, this value is optimal enough to attenuate theshedding completely. The presence of the pressure spike around t = 470 [s] is due to the suddenreturn of the actuation.

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

Page 28: Implementation of an extremum seeking controller for ... · seeking controller for vortex shedding ... The dynamics of vortex shedding ... 2.1 General aspects of flow past cylinder

CHAPTER 4. REAL TIME OPTIMIZATION 26

400 500 600 700 800 900 1000−0.2

−0.15

−0.1

−0.05

0

0.05

0.1

0.15

0.2

Time [s]

v(x

s,ys)

[m/s

]

(a) v(1.7, 0, t)

400 500 600 700 800 900 1000−0.5

−0.4

−0.3

−0.2

−0.1

0

0.1

0.2

Time [s]

∆ P

[Pa]

(b) ∆P (t)

400 500 600 700 800 900 1000−0.4

−0.3

−0.2

−0.1

0

0.1

0.2

0.3

Time [s]

Um

ax,je

t [m/s

]

(c) Umax,jet(t)

400 500 600 700 800 900 1000−2

−1.5

−1

−0.5

0

0.5

Time [s]

Cl

(d) Lift coefficient, Cl(t)

400 500 600 700 800 900 1000

1.13

1.14

1.15

1.16

1.17

1.18

1.19

Time [s]

Cd

(e) Drag coefficient, Cd(t)

400 500 600 700 800 900 10001.08

1.09

1.1

1.11

1.12

1.13

1.14

1.15

1.16

1.17

1.18

Time [s]

CF

L

(f) CFL(t)

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

Page 29: Implementation of an extremum seeking controller for ... · seeking controller for vortex shedding ... The dynamics of vortex shedding ... 2.1 General aspects of flow past cylinder

CHAPTER 4. REAL TIME OPTIMIZATION 27

400 500 600 700 800 900 1000−0.5

0

0.5

1

1.5

2

2.5

Time [s]

τ [s

]

(a) The delay time τ

400 600 800 1000 1200 1400−0.06

−0.04

−0.02

0

0.02

0.04

0.06

0.08

Time [s]

Cos

t

(b) Cost function

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

Page 30: Implementation of an extremum seeking controller for ... · seeking controller for vortex shedding ... The dynamics of vortex shedding ... 2.1 General aspects of flow past cylinder

Chapter 5

Conclusions, recommendations andreflection

5.1 ConclusionsThis is the first real work done using the VISTA-FlowControl CFD package. The code is up andrunning, debugged and all needed functionality is present. To correct the bugs the developer hasbeen contacted regularly during the work. In general these flaws1 were taken care of in less thenone week. All the functionality not mentioned in appendices B and C like data extraction, controlscheme, filters and actuation are not the responsibility of the developer. Most of the time was spenton adding these things. Verification of the calculations is done using Reynolds-Strouhal relationship’sresulting from previous work. When using the correct solver settings, VISTA is able to give highlyaccurate results. The jet actuation on the cylinder boundaries at ±110 [deg], is programmed in thecode. Two basic control methods are tried out, where of only velocity feedback is successful. Thefeedback of a pressure signal, also known as the co-located case, seems troublesome and needs furtherinvestigation. The problems are either caused by the solver or the method itself. The adjustmentof a time delay added to the velocity feedback controller, allows either amplification or attenuationof the vortex shedding. Following, an extremum seeking scheme is able to search for an optimum ofthe time delay to attenuate the vortex shedding. In this way the control structure is more flexibleand (theoretically) able to adapt to different flow conditions.

5.2 RecommendationsThe recommendations are mainly in the area of the actual solver code, since the controllers triedin this research were mainly a good test case for the code. Previous work at the NTNU treatedthe 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 oscilla-tions 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. Therecommendations regarding further use of the code are:

1See appendix B for a list of developer related fixes

28

Page 31: Implementation of an extremum seeking controller for ... · seeking controller for vortex shedding ... The dynamics of vortex shedding ... 2.1 General aspects of flow past cylinder

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 themoment it could use only one processor. The development of a parallel version is currentlybeing looked into. The developer should be contacted about the status of this version.

• Extraction of the stress vectors (σ,στ ,σn) didn’t work last time it was tried, the developerwould look into this. This is also the reason why the Cd, l in this report contain only thepressure contribution.

• A slightly better mesh especially around the jet actuation can probably be generated. A finermesh seems logical, however this is not trivial because a fine mesh around the jets wouldprobably need smaller time steps to keep the CFL number in a reasonable range. This in turnwould increase computation time. The parallel version could introduce major improvementsin this area.

If more work on the extremum seeking will be done, the first task would be to optimize thecut-off frequencies of the filters and perturbation function, besides trying another cost function.For better performance second order filters could be implemented.

5.3 Reflection

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

Page 32: Implementation of an extremum seeking controller for ... · seeking controller for vortex shedding ... The dynamics of vortex shedding ... 2.1 General aspects of flow past cylinder

Bibliography

[1] OM. Aamo and M. Krstic. Backstepping design for a semi-discretized Ginzburg-Landaumodel of vortex shedding. Proceedings of the American Control Conference, 4:3196–3201,2003.

[2] OM. Aamo, M. Krstic, A. Smyshlyaev, and B.A. Foss. Output feedback boundary controlof a Ginzburg-Landau model of vortex shedding. IEEE transactions on automatic control,52(4):742–748, 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):1953–1971, 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:744–756, April 1992.

[5] P. Catalano, M. Wang, G. Iaccarino, I.F. Sbalzarini, and P. Koumoutsakos. Optimizationof cylinder flow control via zero net mass flux actuators.

[6] J. M. Chomaz, P. Huerre, and L. G. Redekopp. Bifurcations to local and global modes inspatially developing flows. Phys. Rev. Lett., 60(1):25–28, Jan 1988.

[7] M.L. Facchinetti, E. Langre, and Biolley F. Vortex shedding modeling using diffusive vander Pol oscillators. Comptes Rendus Mecanique,, 330:451–456, 2002.

[8] M.D. Gunzburger and H.C. Lee. Feedback control of Karman vortex shedding. Transac-tion of the ASME, 93:828–835, 1996.

[9] C. P. Jackson. A finite-element study of the onset of vortex shedding in flow past variouslyshaped bodies. Journal of Fluid Mechanics, 182:23–45, September 1987.

[10] M. König, B. R. Noack, and H. Eckelmann. Discrete shedding modes in the von Karmanvortex street. Physics of Fluids, 5:1846–1848, 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 nonlineardynamic systems. Automatica, 36:595–601(7), April 2000.

[14] C. Min and H. Choi. Suboptimal feedback control of vortex shedding at low Reynoldsnumbers. Journal of Fluid Mechanics, 401:123–156, 1999.

[15] Inoue O. Numerical simulation of forced wakes around a cylinder. International Journalof Heat and Fluid Flow, 16:327–332(6), October 1995.

30

Page 33: Implementation of an extremum seeking controller for ... · seeking controller for vortex shedding ... The dynamics of vortex shedding ... 2.1 General aspects of flow past cylinder

BIBLIOGRAPHY 31

[16] D.S. Park, D.M. Ladd, and E.W. Hendricks. Feedback control of von karman vortexshedding 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 andforced regimes. Journal of Fluid Mechanics, 182:1–22, 1987.

[18] A. Roshko. On the development of turbulent wakes from vortex streets. NACA Report1191, 1954.

[19] K. Roussopoulos. Feedback control of vortex shedding at low Reynolds numbers. Journalof Fluid Mechanics, 248:267, 1993.

[20] K. Roussopoulos and P.A. Monkewitz. Nonlinear modelling of vortex shedding control incylinder wakes. Phys. D, 97(1-3):264–273, 1996.

[21] PJ. Strykowski and KR. Sreenivasan. On the formation and suppresion of vortex ’shed-ding’ at low Reynolds numbers. Journal of Fluid Mechanics, 218:71, 1990.

[22] Th. von Kármán. Über den Mechanismus des Widerstandes, den ein bewegter Körper ineiner Flussigkeit erzeugt. Nacht. Wiss. Ges. Göttingen. Math Phys Klasse 509, 1911.

[23] C.-Y. Wen and C.-Y. Lin. Two-dimensional vortex shedding of a circular cylinder. Physicsof Fluids, 13:557–560, March 2001.

Page 34: Implementation of an extremum seeking controller for ... · seeking controller for vortex shedding ... The dynamics of vortex shedding ... 2.1 General aspects of flow past cylinder

Nomenclature

Re Reynolds number

u = (u, v, w) Velocity vector, consisting of the velocities in x-,y- and z-direction[m/s]

uin Inlet velocity vector set in the code, equal to U∞ [m/s]

uc Velocity vector set by controller on Γ5 [m/s]

u Velocity in x-direction [m/s]

v Velocity in y-direction [m/s]

w Velocity in z-direction [m/s]

Γi Boundary indicator with index i

p Pressure [Pa]

pΓiPressure on boundary Γi [Pa]

pstatic The static pressure on Γ5 during vortex shedding [Pa]

Cl Drag coefficient

St Strouhal number

Cd Lift coefficient

σ Stress tensor [Pa]

CFL CFL number

α Angle on cylinder as measured in the classic unit circle [deg]

αstart/end Start and end angle of jets [deg]

αNiThe angle of a grid point Ni on the cylinder boundary Γ5 [deg]

Tfadein Fade in period of the control actuation [s]

(xs, ys) Position of the sensor location in cartesian coordinate system [m]

k Feedback gain

τ Delay time [s]

U∞ Free stream velocity [m/s]

32

Page 35: Implementation of an extremum seeking controller for ... · seeking controller for vortex shedding ... The dynamics of vortex shedding ... 2.1 General aspects of flow past cylinder

BIBLIOGRAPHY 33

∆P Pressure difference between two points as defined in equation 3.5[Pa]

θ Parameter of system

θ∗ Optimum of parameter θ such that cost function y has maximum orminimum

ωl Cut-off frequency of low-pass filter in extremum seeking scheme[rad/s]

ωh Cut-off frequency of high-pass filter in extremum seeking scheme[rad/s]

ωlp,cost Cut-off frequency of low-pass filter in cost scheme [rad/s]

ωRe60 Natural vortex shedding frequency at Re = 60 [rad/s]

ωper Frequency of perturbation function in extremum seeking scheme

Umax,jet Maximum velocity (peak) of the jet velocity profile, set by the con-troller [m/s]

d Cylinder diameter [m]

f Shedding frequency [Hz]

ν Kinematic viscosity [m2/s]

µ Dynamic viscosity [Pa/s]

ρ Density [kg/m3]

Page 36: Implementation of an extremum seeking controller for ... · seeking controller for vortex shedding ... The dynamics of vortex shedding ... 2.1 General aspects of flow past cylinder

Appendix A: Short description ofDVD contents

On the CD all relevant C++ and Matlab files are present as well as a digital copy of thisreport.

– \Report\Report.pdf: This report

– \C++\FlowControl.cpp: The main file which was edited.

– \C++\FlowControl.h: The class definition some adjustments made here too.

– \Matlab\bnd_pres_plot.m: This file was used to sort the contents of the _bnd_pressure.txtfiles and plot them.

– \Matlab\filters.m: This file is used to generate the filterpar output file, in this file allfilters are defined using state space representation. The filterpar file is then loaded duringthe VISTA simulation.

– \Matlab\plotFunction.m: Once the *_output.txt file of a simulation is imported inMatlab this file is used to plot the signals.

– \Matlab\plotMovieU.m: This file is used to make a moving (movie) plot of the mag-nitude of the y-velocity. The _contr_point output file has to be loaded for this, in matrixform.

– \Matlab\freq.m: This file can be used to generate figure 2.6 in this report.

– \Matlab\SIMmonitor.m: This file can be used to monitor a simulation live. ProvidedSSH-client tunneled the FTP connection, and Netdrive is used to map it as a physicaldrive.

– \Simulations\: In this directory various simulation runs are stored, they can be openendin GLview, or the output files can be imported in Matlab. The basic filenames speak forthemselves.

– \VistaFlowControl\: Latest version of VISTA + manual.

34

Page 37: Implementation of an extremum seeking controller for ... · seeking controller for vortex shedding ... The dynamics of vortex shedding ... 2.1 General aspects of flow past cylinder

Appendix B: List of VISTAshortcomings cq. bugs

– The extraction of shear/normal stresses didn’t work last time it was tried. This is thereason 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

Page 38: Implementation of an extremum seeking controller for ... · seeking controller for vortex shedding ... The dynamics of vortex shedding ... 2.1 General aspects of flow past cylinder

Appendix C: Solved Vistaproblems

∗ Default code wasn’t able to run at all, due to an error in Database.cpp file.∗ Reloading of VTF files was only implemented for the 3D case, SIMRES file format

had to be used instead of it. This is extremely unhandy since SIMRES files cannotbe loaded into GLview. This was fixed and VTF files can be loaded regardless of 2Dor 3D cases. Furthermore, saving time intervals can be set independently for VTFand 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 first every time

step was written to the VTF file while only one in X time steps had actual data init, as defined in the cylinder2D.i file. This was solved in the second version were theonly 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 istwofold.

∗ Huge pressure spikes occurred (≤ 103) at the beginning of a simulation t = 02. Thiswas due the fact that the velocity was set from 0 to 1 in the first time-step. Incom-pressibility then caused the pressure spike. The functions which set the boundaryconditions were extended. Now two boundary conditions exist for Γ3, code 1 andcode 9 to be set in the cylinder2D_bc.dat file. Code 9 is the new function whichlinearly fades in the velocity in the interval 0 ≤ t ≤ 1 [s], thus whatever end velocityis set in the cylinder2D.i file will be present at the boundary at t = 1. Code 1 has tobe used if reloading a simulation.

∗ The possibility to extract the CFL number was not present in the beginning, now itis.

∗ The extraction of data from an arbitrary range of points in the mesh was not yetimplemented, around mid-november this was finalized and successfully tested. Thepoints accessible inside the code can be defined in controllerpoints.dat.

∗ After discussions with the developer regarding accuracy, another mesh was created.Refined in the boundary layer. The block structure of the mesh is created in such away that the mesh can be further refined in the boundary layer independently fromthe rest of the mesh. If needed this 13300 element mesh can be used to get highaccuracy results especially at higher Reynolds numbers.

2Independent from pressure spikes in the remaining of simulation

36

Page 39: Implementation of an extremum seeking controller for ... · seeking controller for vortex shedding ... The dynamics of vortex shedding ... 2.1 General aspects of flow past cylinder

Appendix 37

After getting the last version of VISTA-FlowControl

∗ Removed unnecessary warnings in the report file 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 muchbetter use of NJORD’s 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 ofelements for pressure and velocity) yourself, you only have to makethe 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 Griddlerinput file (cylinder2D.gri) and then generate a new mesh based on the modified input file.

2. Change the element type in the input file to Vista:

set velocity element = ElmB9n2Dset pressure element = ElmB9gn4bn2D

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