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.
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.
Thank you Dejan, I will certainly take a look at the code.
for accessing UMean or any other Mean values in your solver, first add this in your Creatfields.H
Also you will need to add UMean file to your 0 directory.
for checking if this is working or not, you can add this line to print Umean_ (first value of UMean) and compare it with the saved UMean file in the time directory.
Info << "UMean_ = " << UMean_ << endl;
|All times are GMT -4. The time now is 20:29.|