# How to calculate predominant shedding frequency in Strouhal Number

 Register Blogs Members List Search Today's Posts Mark Forums Read

 November 23, 2020, 19:56 How to calculate predominant shedding frequency in Strouhal Number #1 Member   Chris Harding Join Date: Dec 2016 Posts: 76 Rep Power: 9 Hello, I have heard, in a tutorial, that the period between max coefficient of drag values can be used to calculate the predominant shedding frequency in Strouhal Number = St = . I have also tried the period of two steady-state maximums in Coefficient of Lift data. The Coefficient of Lift gave me a circular cylinder Re=250 value of St = 0.2 while the Coefficient of Drag method gave me a consistent St = 0.40 value. St = 0.2 is common for circular cylinder, and St = 0.4 is out of range. I want to make sure I get it right, and I don't think I am now. How does one estimate the predominant shedding frequency for a circular cylinder? Last edited by HappyS5; December 20, 2020 at 23:48.

 November 24, 2020, 10:34 #2 Senior Member   Domenico Lahaye Join Date: Dec 2013 Posts: 749 Blog Entries: 1 Rep Power: 17 Having reached convergence with the steady state solver, switch to transient solver (pimpleFoam) and run solver for a number of periods of the shedding. In post-processing, compute lift for various time steps to obtain a sampling of lift vs. time. Apply FFT to the sampled data to obtain dominant frequency. I am keen to see how it works out. Good luck. HappyS5 likes this.

November 24, 2020, 20:53
When I take MIT OCW Linear Algebra
#3
Member

Chris Harding
Join Date: Dec 2016
Posts: 76
Rep Power: 9
Quote:
 Originally Posted by dlahaye Having reached convergence with the steady state solver, switch to transient solver (pimpleFoam) and run solver for a number of periods of the shedding. In post-processing, compute lift for various time steps to obtain a sampling of lift vs. time. Apply FFT to the sampled data to obtain dominant frequency. I am keen to see how it works out. Good luck.
Hello,

Thanks for the advice and challenge. Unfortunately, I have never used FFT, and there is not a lot on FFT in Python, MATLAB, OCTAVE GNU, etc. So, I will remember to try it when I learn about it in Linear Algebra from MIT OCW.

 November 25, 2020, 02:07 #4 Senior Member   Domenico Lahaye Join Date: Dec 2013 Posts: 749 Blog Entries: 1 Rep Power: 17 No worries. Basic FFT in Python, Matlab or Octave largely suffice. All these environments have examples that you can easily modify to your needs. Alternatively, contact me again once you have the data in time domain. HappyS5 likes this.

November 25, 2020, 18:58
FFT method found equal to the method I described.
#5
Member

Chris Harding
Join Date: Dec 2016
Posts: 76
Rep Power: 9
Quote:
 Originally Posted by dlahaye No worries. Basic FFT in Python, Matlab or Octave largely suffice. All these environments have examples that you can easily modify to your needs. Alternatively, contact me again once you have the data in time domain.
I am working on it a little at a time. I learned how to simply find the FFT by Python:https://dsp.stackexchange.com/questi...z-signal/22924 . I also found this:

'The Strouhal number, St, the inverse value of the non-dimensional time-mean shedding period, was detected by FFT of the time history of the lift coefficient. Since the force coefficients behave sinusoidally for 2-D cases, the corresponding frequency was also calculated directly from the time series of lift coefficients by detecting peak values and/or zero-crossing values. Both procedures gave the same results, within ± 0.1%.'[1]

References:

[1] Qu, L. ; Norberg, C. ; Davidson, L. (2013) "Quantitative numerical analysis of flow past a circular cylinder at Reynolds number between 50 and 200". Journal of Fluids and Structures,vol. 39 pp. 347-370: URL: http://www.tfd.chalmers.se/~lada/pos..._paper_CPL.pdf

Last edited by HappyS5; November 30, 2020 at 18:44. Reason: Change FFT method link

 November 26, 2020, 02:48 #6 Senior Member   Domenico Lahaye Join Date: Dec 2013 Posts: 749 Blog Entries: 1 Rep Power: 17 Correct. In cases in which the time-data is not sinusoidal, FFT is more versatile. HappyS5 likes this.

 November 26, 2020, 03:54 #7 Member   Join Date: Sep 2010 Location: Leipzig, Germany Posts: 93 Rep Power: 15 Hi Chris, it might not be the most sophisticated method, but putting a probe location in a mid-plane point of the vortex street and having a look at the velocity there (in transient flow, of course) should also do the trick. Just plot velocity over time and you should be able to get an approximate period time. HappyS5 and samik108 like this.

December 1, 2020, 13:58
Is there a steady state solution?
#8
Member

Chris Harding
Join Date: Dec 2016
Posts: 76
Rep Power: 9
Quote:
 Originally Posted by dlahaye Having reached convergence with the steady state solver,

Is there really a steady state solution? I was bothered by this question, and a recent search found: Steady state flow over cylinder

In that thread, a super moderator said transient should be used, and the physics of a steady state solver will be inaccurate. My steady state is not converging to picked convergence criteria. Also, the coefficient of drag and Strouhal number are quite off for the convergence I achieved. My icoFoam result gave much better results. Still, I will try simpleFoam final results as 0 for pimpleFoam in the next simulation.

Last edited by HappyS5; December 2, 2020 at 16:30. Reason: Final sentence needed clarification

December 2, 2020, 01:55
#9
Senior Member

Troy Snyder
Join Date: Jul 2009
Location: Akron, OH
Posts: 219
Rep Power: 18
Quote:
 Originally Posted by HappyS5 Is there really a steady state solution? I was bothered by this question, and a recent search found: Steady state flow over cylinder In that thread, a super moderator said transient should be used, and the physics of a steady state solver will be inaccurate. My steady state is not converging to picked convergence criteria. Also, the coefficient of drag and Strouhal number are quite off for the convergence I achieved. My icoFoam result gave much better results. Still, I will try pimpleFoam next.

Yes, you should be using a transient solver, e.g. icoFoam or pimpleFoam. If using pimpleFoam, I suggest running in PISO mode (nOuterCorrectors = 1) and use a "small" time step (e.g. 1/100 or 1/1000 of D / V). Running pimpleFoam in PISO mode should get you results closest to icoFoam.

December 2, 2020, 16:53
#10
Member

Chris Harding
Join Date: Dec 2016
Posts: 76
Rep Power: 9
Quote:
 Originally Posted by dlahaye Having reached convergence with the steady state solver, switch to transient solver (pimpleFoam) and run solver for a number of periods of the shedding. In post-processing, compute lift for various time steps to obtain a sampling of lift vs. time.
I have completed all the above steps, and will now concentrate on the FFT data and dominant frequency extraction from the FFT data. I am interested to see the results.

I have new and better preliminary results, from steady-state to transient suggestion by dlahaye, that more closely match literature that I have seen published. My Coefficient of Lift = 1.27 which approximates the trend for data that covers Re=50 to Re=200. That data had a slight downward trend and the Coefficient of Lift for Re = 200 was 1.30-1.34. My estimated Strouhal number (St) = 0.156 and about 0.02 off from calculated value. Literature also shows that the St number should be near 0.2 and greater than 0.195. I will have a better estimate after I perform FFT. The article linked in the above post suggests that Strouhal Number should be near ST = 0.2 which I get from IcoFoam. Note, the calculated Strouhal number is 0.18 at Re=250.

IcoFoam gave me results of 1.356 Coefficient of Drag, and a Strouhal number = St = 0.2.

Last edited by HappyS5; December 3, 2020 at 10:50. Reason: Fix an error about St number.

 December 3, 2020, 02:59 #11 Senior Member   Domenico Lahaye Join Date: Dec 2013 Posts: 749 Blog Entries: 1 Rep Power: 17 Very happy to read about the progress you are making. I am slightly confused about the following two issues. Issue 1: my (always limited) understanding is that the oscillation of lift vs. time (and thus the Strouhal number) should be *independent* of the initial guess for the transient solver that you impose. That is, the initial guess only affects the value for the lift in the initial stages of the solver output. After some time, the curve of output (lift) vs. time is independent of the initial guess that you impose. It is true that initial transients disappear slower or faster depending on the initial guess imposed. After sufficiently long time however, the initial guess is completely removed from the simulation results. Issue 2: I am unfamiliar with the differences between icoFoam and pimpleFoam. I am thus wondering whether the differences you observe are due to solver settings (mesh, outer correction, relative residuals, etc) I am keen to see your FFT results. Cheers. HappyS5 likes this.

December 4, 2020, 17:18
Dominating Frequency?
#12
Member

Chris Harding
Join Date: Dec 2016
Posts: 76
Rep Power: 9
Quote:
 Originally Posted by dlahaye Apply FFT to the sampled data to obtain dominant frequency.
In 2-D, the Coefficient of Lift data looks sinusoidal. It has minimum and maximum peeks during vortex shedding. The distance, in seconds, from one maximum peak to the neighbor is the period. frequency = 1/T. So, I need the period (T) that happens the most often, which would be the dominating period, and dominating frequency. Is this what the FFT will eventually give me?

 December 5, 2020, 10:44 Need help with FFT in Python #13 Member   Chris Harding Join Date: Dec 2016 Posts: 76 Rep Power: 9 Hello, I can't figure out my needed FFT Python code as I have never used it. Any help? dlahaye

 December 5, 2020, 11:17 #14 Senior Member   Domenico Lahaye Join Date: Dec 2013 Posts: 749 Blog Entries: 1 Rep Power: 17 look at examples, and try to adapt those. Do you see examples?

December 5, 2020, 17:18
#15
Member

Chris Harding
Join Date: Dec 2016
Posts: 76
Rep Power: 9
Quote:
 Originally Posted by dlahaye look at examples, and try to adapt those. Do you see examples?
Professor (assumption), I am not you, but I will try a suggestion from LinkedIn: https://www.cbcity.de/die-fft-mit-py...nfach-erklaert

I am currently ill, and will be at it again on Tuesday. A member at Beginning OpenFOAM at Facebook also mentioned welch method. I have looked into welch and think it might be appropriate if I have a lot of noise.

 December 6, 2020, 03:24 #16 Senior Member   Domenico Lahaye Join Date: Dec 2013 Posts: 749 Blog Entries: 1 Rep Power: 17 You should be okay following the first link that you shared. Good luck. Domenico. HappyS5 likes this.

 December 6, 2020, 03:38 #17 Senior Member   Michael Alletto Join Date: Jun 2018 Location: Bremen Posts: 615 Rep Power: 15 you find in this tutorial also a python script which makes a fft of the force signal to calculate the St number https://wiki.openfoam.com/Vortex_ind...ichael_Alletto dlahaye, HappyS5 and welorfi like this.

December 6, 2020, 12:23
#18
Member

Chris Harding
Join Date: Dec 2016
Posts: 76
Rep Power: 9
Quote:
 Originally Posted by dlahaye You should be okay following the first link that you shared. Good luck. Domenico.

I tried the code from the first link. Easy to just copy the code. Problem is that I got values that made no sense. When I took the problem to Stacks Exchange, because I don't know Python, I was told I found the maximum indices value that is needed in frequency array to find the frequency. When I use that value, I get an out of range error.

The tutorial link has similar code, as compared to what I used from first link, but I get an out of range. At least I am on the right track.

Last edited by HappyS5; December 6, 2020 at 13:04. Reason: Clarify that I did not use the tutorial link.

 December 6, 2020, 12:56 #19 Senior Member   Domenico Lahaye Join Date: Dec 2013 Posts: 749 Blog Entries: 1 Rep Power: 17 Wonderful to hear. Other examples are here: https://docs.scipy.org/doc/scipy/ref...orial/fft.html HappyS5 and Znoel_7520 like this.

December 7, 2020, 17:32
#20
Member

Chris Harding
Join Date: Dec 2016
Posts: 76
Rep Power: 9
Quote:
 Originally Posted by mAlletto you find in this tutorial also a python script which makes a fft of the force signal to calculate the St number https://wiki.openfoam.com/Vortex_ind...ichael_Alletto

Michael,

Thanks for the excellent contribution. It has helped me progress.

Where did you get the 2500 for N? What is N? What is Nev?

Last edited by HappyS5; December 7, 2020 at 19:42.

 Tags frequency, strouhal number