|
[Sponsors] |
How to plot the energy spectrum of a simulation by using energySpectrum function |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
January 27, 2022, 16:20 |
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 |
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 |
|
February 6, 2022, 13:19 |
|
#2 |
Senior Member
Josh Williams
Join Date: Feb 2021
Location: Scotland
Posts: 113
Rep Power: 5 |
In the past, I have used the application "calcEk" from this repository (https://github.com/xuhanwustl/WrayAg...ilities/calcEk).
|
|
February 6, 2022, 19:37 |
|
#3 | |
New Member
Elena Espana
Join Date: Aug 2021
Location: Texas
Posts: 19
Rep Power: 5 |
Quote:
Could you please explain to me how this app works? I'd appreciate it a lot!
__________________
University of Texas |
||
February 8, 2022, 04:38 |
|
#4 | |
Senior Member
Josh Williams
Join Date: Feb 2021
Location: Scotland
Posts: 113
Rep Power: 5 |
Quote:
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]. |
||
February 8, 2022, 15:31 |
|
#5 |
New Member
Elena Espana
Join Date: Aug 2021
Location: Texas
Posts: 19
Rep Power: 5 |
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 |
|
February 8, 2022, 15:35 |
|
#6 | |
Senior Member
Josh Williams
Join Date: Feb 2021
Location: Scotland
Posts: 113
Rep Power: 5 |
Quote:
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. |
||
March 30, 2022, 17:45 |
|
#7 | |
Senior Member
Farzad Faraji
Join Date: Nov 2019
Posts: 206
Rep Power: 7 |
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:
|
||
March 31, 2022, 03:23 |
|
#8 | |
Senior Member
Josh Williams
Join Date: Feb 2021
Location: Scotland
Posts: 113
Rep Power: 5 |
Quote:
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... |
||
|
|
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 |