CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM (
-   -   Access UMean at runtime (

deji March 17, 2012 18:14

Access UMean at runtime
Good day to all. Is it possible to access UMean at runtime? I need it to perform compute the u'? Or can I just access u' at runtime? Thanks.

morard March 19, 2012 13:53

Hi deji,

in absence of better idea, I did it on the following way: I calculate UMean in the solver on the same way as it would be calculated by the averaging function written in controlDict (check fieldAverageTemplates.C)

alpha = ( time-startStatistics - dt ) / ( time-startStatistics );
beta = dt / ( time-startStatistics);

UM = alpha*UM + beta*U;

If you know how to access UMean directly, please let me know.


deji March 19, 2012 14:10

Thank you Dejan, I will certainly take a look at the code.


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