|
[Sponsors] |
March 19, 2019, 13:40 |
Mean pressure in openfoam
|
#1 |
Senior Member
Peter Shi
Join Date: Feb 2017
Location: Davis
Posts: 102
Rep Power: 9 |
Dear Foamers,
I am doing large-eddy simulations (LES), and I am able to get mean pressure from OpenFOAM like this: p { mean on; prime2Mean on; base time; } I am just curious about how exactly OpenFOAM calculates the mean pressure? Thank you in advance. Best, Peter |
|
March 19, 2019, 15:50 |
|
#2 |
Member
Join Date: Jun 2011
Location: Germany
Posts: 59
Rep Power: 14 |
Hello,
look to https://github.com/OpenFOAM/OpenFOAM...fieldAverage.H mean: arithmetic mean .... { mean on; prime2Mean on; base time; // iteration window 200; // optional averaging window windowName w1; // optional window name (default = "") } .... |
|
March 19, 2019, 16:02 |
|
#3 | |
Senior Member
Peter Shi
Join Date: Feb 2017
Location: Davis
Posts: 102
Rep Power: 9 |
Quote:
Thank you for your response, and I read the code that you provided. Just want to double check: 1. In the sub-dictionary window, we assign the period of time over which the pressure is averaged? 2. What are available options for windowName? What does w1 mean? (I know what is the window and why we need to use it) Thank you! Best, Peter |
||
March 19, 2019, 16:11 |
|
#4 | |
Member
Join Date: Jun 2011
Location: Germany
Posts: 59
Rep Power: 14 |
Quote:
averages to perform, and can be updated during the calculation. The current options include: - \c mean: arithmetic mean - \c prime2Mean: prime-squared mean - \c base: average over 'time', or 'iteration' - \c window: optional averaging window, specified in 'base' units I'm not sure, but I think the windowName is for purpose only. Perhaps if you writing advanced code, it could be usefull for debuging case. |
||
March 19, 2019, 16:19 |
|
#5 | |
Senior Member
Peter Shi
Join Date: Feb 2017
Location: Davis
Posts: 102
Rep Power: 9 |
Quote:
I see. So we can either average over time or iterations. I do not think it is for debugging purpose only. I know there are a couple of window functions, like Hanning window, Flat Top window, etc. I feel like windowName should correspond to those functions. |
||
March 19, 2019, 16:37 |
|
#6 | |
Member
Join Date: Jun 2011
Location: Germany
Posts: 59
Rep Power: 14 |
Interessting
Quote:
|
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Residuals and forces spiraling out of control before failing | edomalley1 | OpenFOAM Running, Solving & CFD | 3 | September 7, 2018 10:42 |
question regarding LES of pipe flow - pimpleFoam | Dan1788 | OpenFOAM Running, Solving & CFD | 37 | December 26, 2017 14:42 |
interFoam (HELYX-OS) pressure boundary conditions | SFr | OpenFOAM Running, Solving & CFD | 8 | June 23, 2016 16:36 |
CFX Solver stopped with error when requested for backup during solver running | Mfaizan | CFX | 40 | May 13, 2016 06:50 |
New OpenFOAM Forum Structure | jola | OpenFOAM | 2 | October 19, 2011 06:55 |