
[Sponsors] 
April 4, 2013, 15:18 
How to calculate <w'T'>?

#1 
Member
Jack
Join Date: Dec 2011
Posts: 81
Rep Power: 7 
Hi guys,
I am simulating DNS channel flows using Openfoam, and I want to show contours of <w'T'>, where <> means average, w' is the zdirection velocity fluctuation, and T' is temperature fluctuation. I tried to define a new variable Q=w*T and average Q by adding the following lines into system/controlDict. But it seems to be incorrect because it will calculate <(wT)'> instead of <w'T'>. Code:
fieldAverage1 { ... fields ( Q { mean on; prime2Mean on; base time; } ... 

April 4, 2013, 16:59 

#2 
Senior Member
Lieven
Join Date: Dec 2011
Location: Leuven, Belgium
Posts: 297
Rep Power: 15 
I guess the easiest way would be to do two simulations.
1. During the first run you calculate <w> and <T> 2. During the second run you read in <w> and <T>, and evaluate Q = (w<w>)*(T<T>) and take the average of Q like you are doing I'm aware that this is a bit unfavourable from computational point of view, but I don't really see an other option. If you find one however, let me know! cause this is an interesting issue. Cheers, L 

April 4, 2013, 21:23 

#3  
Member
Jack
Join Date: Dec 2011
Posts: 81
Rep Power: 7 
Quote:
Thanks very much for your reply! Based on your suggestion, I am thinking may be I can do it in one run. I will try the following procedures: 1. Define new variables w (U.component(2)), wMean (<w>) and TMean (<T>) in solver and read their values from meshes (an initial value is given at starttime). 2. Define new variable Q=(wwMean)*(TTMean). (that is the instant w'T' value, not averaged one) 3. Add the following average lines in system/controlDict to calculate wMean, TMean, and QMean (that is <w'T'> we want). Code:
fieldAverage1 { ..... fields ( .... w { mean on; prime2Mean on; base time; } T { mean on; prime2Mean on; base time; } Q { mean on; prime2Mean on; base time; } ..... I have added the lines mentioned above into my solver, and it is running, no error. However, I need to run a real simulation to verify if the above method produce correct results. Cheers! 

April 5, 2013, 03:00 

#4 
Member
Dejan Morar
Join Date: Nov 2010
Posts: 78
Rep Power: 9 
Hi ripperjack,
you just have to add a new field in your solve, wT, and then average it. You wil also need averaged values of w and T. At the end, you can modify postChannel utility to calculate <w'T'>. <w'T'> = <wT>  <w><T> Regards 

April 5, 2013, 09:13 

#5  
Member
Jack
Join Date: Dec 2011
Posts: 81
Rep Power: 7 
Quote:
Great! That the simplest way to do it! Thanks Morard! Regards 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Problem to calculate grad(U) using swak4Foam  Hugoles  OpenFOAM PostProcessing  11  September 25, 2014 19:07 
calculate Nu number  Diana.N  FLUENT  3  February 27, 2012 14:40 
How to calculate grid width in control volume  Ingenierias2003  OpenFOAM  5  November 24, 2010 13:40 
calculate values for eps and k from Re or u?????  sbar  OpenFOAM PreProcessing  5  August 16, 2010 04:10 
How to calculate Torque for francis turbine  manish  CFX  4  March 15, 2007 03:57 