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

Mean pressure in openfoam

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 19, 2019, 13:40
Default Mean pressure in openfoam
  #1
Senior Member
 
Peter Shi
Join Date: Feb 2017
Location: Davis
Posts: 102
Rep Power: 9
PeterShi is on a distinguished road
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
PeterShi is offline   Reply With Quote

Old   March 19, 2019, 15:50
Default
  #2
Member
 
Join Date: Jun 2011
Location: Germany
Posts: 59
Rep Power: 14
Siassei is on a distinguished road
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 = "")
}
....
Siassei is offline   Reply With Quote

Old   March 19, 2019, 16:02
Default
  #3
Senior Member
 
Peter Shi
Join Date: Feb 2017
Location: Davis
Posts: 102
Rep Power: 9
PeterShi is on a distinguished road
Quote:
Originally Posted by Siassei View Post
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 = "")
}
....
Hi Siassei,

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
PeterShi is offline   Reply With Quote

Old   March 19, 2019, 16:11
Default
  #4
Member
 
Join Date: Jun 2011
Location: Germany
Posts: 59
Rep Power: 14
Siassei is on a distinguished road
Quote:
Originally Posted by PeterShi View Post
1. In the sub-dictionary window, we assign the period of time over which the pressure is averaged?
Fields are entered as a list of sub-dictionaries, which indicate the type of
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

Quote:
Originally Posted by PeterShi View Post
2. What are available options for windowName? What does w1 mean? (I know what is the window and why we need to use it)
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.
Siassei is offline   Reply With Quote

Old   March 19, 2019, 16:19
Default
  #5
Senior Member
 
Peter Shi
Join Date: Feb 2017
Location: Davis
Posts: 102
Rep Power: 9
PeterShi is on a distinguished road
Quote:
Originally Posted by Siassei View Post
Fields are entered as a list of sub-dictionaries, which indicate the type of
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.

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.
PeterShi is offline   Reply With Quote

Old   March 19, 2019, 16:37
Default
  #6
Member
 
Join Date: Jun 2011
Location: Germany
Posts: 59
Rep Power: 14
Siassei is on a distinguished road
Interessting

Quote:
The averaging window corresponds to the averaging interval (iters or time)
If not specified, the averaging is over 'all iters/time'
from https://cpp.openfoam.org/v6/fieldAve...ce.html#l00217
Siassei 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
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


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