CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

How to calculate predominant shedding frequency in Strouhal Number

Register Blogs Community New Posts Updated Threads Search

Like Tree25Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 23, 2020, 19:56
Default How to calculate predominant shedding frequency in Strouhal Number
  #1
Member
 
Chris Harding
Join Date: Dec 2016
Posts: 76
Rep Power: 9
HappyS5 is on a distinguished road
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 = \frac{fD}{V}. 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.
HappyS5 is offline   Reply With Quote

Old   November 24, 2020, 10:34
Default
  #2
Senior Member
 
Domenico Lahaye
Join Date: Dec 2013
Posts: 722
Blog Entries: 1
Rep Power: 17
dlahaye is on a distinguished road
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.
dlahaye is offline   Reply With Quote

Old   November 24, 2020, 20:53
Default When I take MIT OCW Linear Algebra
  #3
Member
 
Chris Harding
Join Date: Dec 2016
Posts: 76
Rep Power: 9
HappyS5 is on a distinguished road
Quote:
Originally Posted by dlahaye View Post
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.
dlahaye likes this.
HappyS5 is offline   Reply With Quote

Old   November 25, 2020, 02:07
Default
  #4
Senior Member
 
Domenico Lahaye
Join Date: Dec 2013
Posts: 722
Blog Entries: 1
Rep Power: 17
dlahaye is on a distinguished road
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.
dlahaye is offline   Reply With Quote

Old   November 25, 2020, 18:58
Default FFT method found equal to the method I described.
  #5
Member
 
Chris Harding
Join Date: Dec 2016
Posts: 76
Rep Power: 9
HappyS5 is on a distinguished road
Quote:
Originally Posted by dlahaye View Post
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
dlahaye and welorfi like this.

Last edited by HappyS5; November 30, 2020 at 18:44. Reason: Change FFT method link
HappyS5 is offline   Reply With Quote

Old   November 26, 2020, 02:48
Default
  #6
Senior Member
 
Domenico Lahaye
Join Date: Dec 2013
Posts: 722
Blog Entries: 1
Rep Power: 17
dlahaye is on a distinguished road
Correct.

In cases in which the time-data is not sinusoidal, FFT is more versatile.
HappyS5 likes this.
dlahaye is offline   Reply With Quote

Old   November 26, 2020, 03:54
Default
  #7
Member
 
Join Date: Sep 2010
Location: Leipzig, Germany
Posts: 93
Rep Power: 15
oswald is on a distinguished road
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.
oswald is offline   Reply With Quote

Old   December 1, 2020, 13:58
Default Is there a steady state solution?
  #8
Member
 
Chris Harding
Join Date: Dec 2016
Posts: 76
Rep Power: 9
HappyS5 is on a distinguished road
Quote:
Originally Posted by dlahaye View Post
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
HappyS5 is offline   Reply With Quote

Old   December 2, 2020, 01:55
Default
  #9
Senior Member
 
Troy Snyder
Join Date: Jul 2009
Location: Akron, OH
Posts: 219
Rep Power: 18
tas38 is on a distinguished road
Quote:
Originally Posted by HappyS5 View Post
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.
HappyS5 and welorfi like this.
tas38 is offline   Reply With Quote

Old   December 2, 2020, 16:53
Default
  #10
Member
 
Chris Harding
Join Date: Dec 2016
Posts: 76
Rep Power: 9
HappyS5 is on a distinguished road
Quote:
Originally Posted by dlahaye View Post
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.
HappyS5 is offline   Reply With Quote

Old   December 3, 2020, 02:59
Default
  #11
Senior Member
 
Domenico Lahaye
Join Date: Dec 2013
Posts: 722
Blog Entries: 1
Rep Power: 17
dlahaye is on a distinguished road
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.
dlahaye is offline   Reply With Quote

Old   December 4, 2020, 17:18
Default Dominating Frequency?
  #12
Member
 
Chris Harding
Join Date: Dec 2016
Posts: 76
Rep Power: 9
HappyS5 is on a distinguished road
Quote:
Originally Posted by dlahaye View Post
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?
openfoam_aero likes this.
HappyS5 is offline   Reply With Quote

Old   December 5, 2020, 10:44
Default Need help with FFT in Python
  #13
Member
 
Chris Harding
Join Date: Dec 2016
Posts: 76
Rep Power: 9
HappyS5 is on a distinguished road
Hello,

I can't figure out my needed FFT Python code as I have never used it. Any help? dlahaye
HappyS5 is offline   Reply With Quote

Old   December 5, 2020, 11:17
Default
  #14
Senior Member
 
Domenico Lahaye
Join Date: Dec 2013
Posts: 722
Blog Entries: 1
Rep Power: 17
dlahaye is on a distinguished road
look at examples, and try to adapt those.

Do you see examples?
dlahaye is offline   Reply With Quote

Old   December 5, 2020, 17:18
Default
  #15
Member
 
Chris Harding
Join Date: Dec 2016
Posts: 76
Rep Power: 9
HappyS5 is on a distinguished road
Quote:
Originally Posted by dlahaye View Post
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.
HappyS5 is offline   Reply With Quote

Old   December 6, 2020, 03:24
Default
  #16
Senior Member
 
Domenico Lahaye
Join Date: Dec 2013
Posts: 722
Blog Entries: 1
Rep Power: 17
dlahaye is on a distinguished road
You should be okay following the first link that you shared.

Good luck. Domenico.
HappyS5 likes this.
dlahaye is offline   Reply With Quote

Old   December 6, 2020, 03:38
Default
  #17
Senior Member
 
Michael Alletto
Join Date: Jun 2018
Location: Bremen
Posts: 615
Rep Power: 15
mAlletto will become famous soon enough
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.
mAlletto is offline   Reply With Quote

Old   December 6, 2020, 12:23
Default
  #18
Member
 
Chris Harding
Join Date: Dec 2016
Posts: 76
Rep Power: 9
HappyS5 is on a distinguished road
Quote:
Originally Posted by dlahaye View Post
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.
dlahaye likes this.

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

Old   December 6, 2020, 12:56
Default
  #19
Senior Member
 
Domenico Lahaye
Join Date: Dec 2013
Posts: 722
Blog Entries: 1
Rep Power: 17
dlahaye is on a distinguished road
Wonderful to hear.

Other examples are here: https://docs.scipy.org/doc/scipy/ref...orial/fft.html
HappyS5 and Znoel_7520 like this.
dlahaye is offline   Reply With Quote

Old   December 7, 2020, 17:32
Default
  #20
Member
 
Chris Harding
Join Date: Dec 2016
Posts: 76
Rep Power: 9
HappyS5 is on a distinguished road
Quote:
Originally Posted by mAlletto View Post
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.
HappyS5 is offline   Reply With Quote

Reply

Tags
frequency, strouhal number


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
decomposePar no field transfert Jeanp OpenFOAM Pre-Processing 3 June 18, 2022 12:01
how to calculate vortex shedding frequency mohammad FLUENT 1 December 1, 2020 18:05
decomposePar -allRegions stru OpenFOAM Pre-Processing 2 August 25, 2015 03:58
Cluster ID's not contiguous in compute-nodes domain. ??? Shogan FLUENT 1 May 28, 2014 15:03
AMI interDyMFoam for mixer danny123 OpenFOAM Running, Solving & CFD 4 June 19, 2013 04:49


All times are GMT -4. The time now is 08:32.