CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   Easy way to take surface average at different planes? (https://www.cfd-online.com/Forums/openfoam/84438-easy-way-take-surface-average-different-planes.html)

cheng1988sjtu January 29, 2011 15:54

Easy way to take surface average at different planes?
 
Hi Foamers:

Now I'm working on channelFoam to reproduce the log-law and turbulence intensity. I just finished my first try using dynSmagorinsky. However, I've got some problems about the post-Processing.

1.
in the log file, I found that
************************************************** ************************************************** *
Time = 10

............
Uncorrected Ubar = 0.1335 pressure gradient = 0.000133009
ExecutionTime = 172139 s ClockTime = 345743 s

Calculating averages
************************************************** ************************************************** **

Is the 'pressure gradient' normalized by 'rho' already? I've seem some threads about it and got confused. Basically I need to use it to calculate the wall shear velocity, so it's very important to understand that.

2. Although in the 'controlDict' file, we have fieldAverage, but It seems that it is just a time average in the UMean, Pmean files, so I have 2 questions on that: a.> iis it averaged from t=0? even if it's not steady state? b>. Is there any existing utility that I can use to take a surface average of U and P? BTW, I may need to take surface average at several planes, so maybe sampling is not such a good choice for me. Any suggestions?

Thank you, foamers!

Zhen

stevenvanharen January 31, 2011 14:52

Quote:

Originally Posted by cheng1988sjtu (Post 292774)
Hi Foamers:

Now I'm working on channelFoam to reproduce the log-law and turbulence intensity. I just finished my first try using dynSmagorinsky. However, I've got some problems about the post-Processing.

1.
in the log file, I found that
************************************************** ************************************************** *
Time = 10

............
Uncorrected Ubar = 0.1335 pressure gradient = 0.000133009
ExecutionTime = 172139 s ClockTime = 345743 s

Calculating averages
************************************************** ************************************************** **

Is the 'pressure gradient' normalized by 'rho' already? I've seem some threads about it and got confused. Basically I need to use it to calculate the wall shear velocity, so it's very important to understand that.

Yes, I think all the incompressible solvers assume rho = 1. That is why the density does not appear in the momentum equation and you have to specify kinematic viscosity instead of dynamic viscosity.

Quote:

Originally Posted by cheng1988sjtu (Post 292774)

2. Although in the 'controlDict' file, we have fieldAverage, but It seems that it is just a time average in the UMean, Pmean files, so I have 2 questions on that: a.> iis it averaged from t=0? even if it's not steady state? b>. Is there any existing utility that I can use to take a surface average of U and P? BTW, I may need to take surface average at several planes, so maybe sampling is not such a good choice for me. Any suggestions?

Thank you, foamers!

Zhen

a) Yes, do not expect the code to identify the steady state for you ;)
b) If you play around with the 'sample' utility you can do quite a lot. See your source code for an example of the sampleDict file.

cheng1988sjtu January 31, 2011 23:35

thank you!
 
Hi Steven,

Thank you very much, it's really helpful.

I've looked into the source file for the field average, and yes, the average is taken from t=0 if you didn't specify the starting point of averaging.

Also the postChannel utility turns out to be a good choice for analyzing the channel flow.

Thank you!

Zhen:)

tonkiplis October 19, 2011 17:46

postChannel
 
Hi Charlie,

I'm trying to run the channel395 tutorial. I encounter troubles at the post processing step. I added k in the fieldAverage function present in the controlDict.

My questions is: I obtain for k after postChannel utility:

k

kMean

k.xy
-----------------------

I assume k is the SGS turbulent kinetic energy (based on previous posts concerning post processing of LES) kMean is therefore <k> "time averaged value". k.xy would therefore be the <k> value averaged over the homogenous directions?

-----------------------

What is exaclty UPrime2Mean and u.xy, v.xy, w.xy??

I assume UPrime2Mean=<u_i' u_j'> and u.xy to be u_rms--> Sqrt(<u'u'>)?

Am I right?
-----------------------

Any inside would be apreciable.. :)

How can I compare my k to k obtained by DNS?? I don't know how to account for the SGS turbulent kinetic energy.


Question solved.


All times are GMT -4. The time now is 05:39.