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

How to plot the energy spectrum of a simulation by using energySpectrum function

Register Blogs Community New Posts Updated Threads Search

Like Tree4Likes
  • 1 Post By joshwilliams
  • 2 Post By joshwilliams
  • 1 Post By joshwilliams

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 27, 2022, 16:20
Default How to plot the energy spectrum of a simulation by using energySpectrum function
  #1
New Member
 
Elena Espana
Join Date: Aug 2021
Location: Texas
Posts: 19
Rep Power: 5
reespanau is on a distinguished road
Hello all!

I want to plot the energy spectrum for my simulation, should I use probes? What should be the right step by step way to plot this energy spectrum, can I use the following command:

postProcess -func energySpectrum


Thank you!
__________________
University of Texas
reespanau is offline   Reply With Quote

Old   February 6, 2022, 13:19
Default
  #2
Senior Member
 
Josh Williams
Join Date: Feb 2021
Location: Scotland
Posts: 113
Rep Power: 5
joshwilliams is on a distinguished road
In the past, I have used the application "calcEk" from this repository (https://github.com/xuhanwustl/WrayAg...ilities/calcEk).
reespanau likes this.
joshwilliams is offline   Reply With Quote

Old   February 6, 2022, 19:37
Default
  #3
New Member
 
Elena Espana
Join Date: Aug 2021
Location: Texas
Posts: 19
Rep Power: 5
reespanau is on a distinguished road
Quote:
Originally Posted by joshwilliams View Post
In the past, I have used the application "calcEk" from this repository (https://github.com/xuhanwustl/WrayAg...ilities/calcEk).


Could you please explain to me how this app works? I'd appreciate it a lot!
__________________
University of Texas
reespanau is offline   Reply With Quote

Old   February 8, 2022, 04:38
Default
  #4
Senior Member
 
Josh Williams
Join Date: Feb 2021
Location: Scotland
Posts: 113
Rep Power: 5
joshwilliams is on a distinguished road
Quote:
Originally Posted by reespanau View Post
Could you please explain to me how this app works? I'd appreciate it a lot!

It reads your velocity field "U", then calls OpenFOAM's calcEk library ($FOAM_SRC/randomProcesses/fft/calcEk.C), which uses a fft to convert spatial velocity fluctuations at some time point to a spectra of energy [m^3/s^2] vs wave number [1/m].
reespanau and zhangxin like this.
joshwilliams is offline   Reply With Quote

Old   February 8, 2022, 15:31
Default
  #5
New Member
 
Elena Espana
Join Date: Aug 2021
Location: Texas
Posts: 19
Rep Power: 5
reespanau is on a distinguished road
Do I need to compile this like a solver? with wmake

I have all my results for U already, I used pisoFoam. how do I run this library?
__________________
University of Texas
reespanau is offline   Reply With Quote

Old   February 8, 2022, 15:35
Default
  #6
Senior Member
 
Josh Williams
Join Date: Feb 2021
Location: Scotland
Posts: 113
Rep Power: 5
joshwilliams is on a distinguished road
Quote:
Originally Posted by reespanau View Post
Do I need to compile this like a solver? with wmake

I have all my results for U already, I used pisoFoam. how do I run this library?

Yes you need to compile it with wmake. This specific part is not a library, it is an application. Once you have compiled it you can run it with `calcEk' in the command line. It then takes your pre-computed results for U and converts it to a spectra for each saved timestep.
reespanau likes this.
joshwilliams is offline   Reply With Quote

Old   March 30, 2022, 17:45
Default
  #7
Senior Member
 
Farzad Faraji
Join Date: Nov 2019
Posts: 206
Rep Power: 7
farzadmech is on a distinguished road
Thanks for the link. Can I use Of6 to compile it or I should install OF5 and then I use it? I tried to compile it with OF6 but it gives me lots of warnings.

Also, could you take a look to my problem in this thread?

Forced synthetic homogeneous isotropic turbulence(HIT) in OpenFOAM)

Quote:
Originally Posted by joshwilliams View Post
Yes you need to compile it with wmake. This specific part is not a library, it is an application. Once you have compiled it you can run it with `calcEk' in the command line. It then takes your pre-computed results for U and converts it to a spectra for each saved timestep.
farzadmech is offline   Reply With Quote

Old   March 31, 2022, 03:23
Default
  #8
Senior Member
 
Josh Williams
Join Date: Feb 2021
Location: Scotland
Posts: 113
Rep Power: 5
joshwilliams is on a distinguished road
Quote:
Originally Posted by farzadmech View Post
Thanks for the link. Can I use Of6 to compile it or I should install OF5 and then I use it? I tried to compile it with OF6 but it gives me lots of warnings.

Also, could you take a look to my problem in this thread?

Forced synthetic homogeneous isotropic turbulence(HIT) in OpenFOAM)

Hi Farzad. I used it on OF6. I can't remember if I needed to modify it. Warnings are okay. If it gives some errors then of course something is wrong. I would say just try to run it then see if it works? It is the easiest way...
joshwilliams is offline   Reply With Quote

Reply


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
whats the cause of error? immortality OpenFOAM Running, Solving & CFD 13 March 24, 2021 07:15
Plot the Energy Spectrum Elyas_Mosibat OpenFOAM Post-Processing 14 June 3, 2019 13:46
[mesh manipulation] refineMesh Error mohsen.boojari OpenFOAM Meshing & Mesh Conversion 3 March 1, 2018 22:07
[blockMesh] error message with modeling a cube with a hold at the center hsingtzu OpenFOAM Meshing & Mesh Conversion 2 March 14, 2012 09:56
LES correlation and turbulent energy spectrum Fabian Main CFD Forum 4 October 18, 2005 02:04


All times are GMT -4. The time now is 01:20.