CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   Access UMean at runtime (http://www.cfd-online.com/Forums/openfoam/98740-access-umean-runtime.html)

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.

Regards,
Dejan

deji March 19, 2012 14:10

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

Cheers,
Deji


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