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

How to obtain RMS and averaged velocity in the SOLVER?

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By Bernhard

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 9, 2013, 11:15
Default How to obtain RMS and averaged velocity in the SOLVER?
  #1
Member
 
Jack
Join Date: Dec 2011
Posts: 94
Rep Power: 14
ripperjack is on a distinguished road
Hi all,

I want to output some variables which is not included as default variables in openfoam, eg. <u'T'>, so I need to add something into my solver.

For example, I want to calculate u'T'=(u-uMean)*(T-TMean), so I need to obtain uMean first.

My question is: uMean is the "locally averaged variables" (can be calculated at each time step, and is based on the simulated time), or is the mean values after the simulation is done (can not be calculate until the simulation is ended)? Which one is the openfoam's default method when calculating UMean, pMean, and pPrime2Mean etc?

Can you guys help me? Many thanks!
Regards,
ripperjack is offline   Reply With Quote

Old   April 10, 2013, 06:24
Default
  #2
Senior Member
 
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 21
Bernhard is on a distinguished road
Well, it is your definition of UMean. In general one would use the time average for this.

I don't know which method you are referring to. If you store all data of all timesteps, you can calculate the mean quantities as a post-processing step. The alternative is to calculate things during runtime (search for fieldaverage and functionobject), which saves you a lot of storage space.

Also the second other quantities can be calculated like this, as <(u-uMean)^2> = <u^2>-uMean^2, so you basically need the time average of u and u^2.

I am not sure if this fieldAverage function-object can handle crossterms between u and T, but one should manage to extend the function-object code a bit.

Someone may advertise swak4Foam, which contains easily customizable function-objects. It may be worth examining these options before starting cumbersome implementations.
ripperjack likes this.
Bernhard 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



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