# Easy way to take surface average at different planes?

 Register Blogs Members List Search Today's Posts Mark Forums Read

 January 29, 2011, 16:54 Easy way to take surface average at different planes? #1 Member   Charlie Join Date: Dec 2010 Location: 415 Kinross Dr. Newark, DE 19711 Posts: 80 Rep Power: 7 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

January 31, 2011, 15:52
#2
Senior Member

Steven van Haren
Join Date: Aug 2010
Location: The Netherlands
Posts: 149
Rep Power: 8
Quote:
 Originally Posted by cheng1988sjtu 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 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.

 February 1, 2011, 00:35 thank you! #3 Member   Charlie Join Date: Dec 2010 Location: 415 Kinross Dr. Newark, DE 19711 Posts: 80 Rep Power: 7 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

 October 19, 2011, 17:46 postChannel #4 New Member   Join Date: Mar 2011 Posts: 12 Rep Power: 7 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 "time averaged value". k.xy would therefore be the value averaged over the homogenous directions? ----------------------- What is exaclty UPrime2Mean and u.xy, v.xy, w.xy?? I assume UPrime2Mean= and u.xy to be u_rms--> Sqrt()? 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. Last edited by tonkiplis; October 25, 2011 at 02:08.