|March 17, 2012, 17:14||
Access UMean at runtime
Join Date: Sep 2009
Posts: 198Rep Power: 9
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.
|March 19, 2012, 12:53||
Join Date: Nov 2010
Posts: 78Rep Power: 9
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.
|April 25, 2016, 19:20||
Join Date: Feb 2015
Posts: 9Rep Power: 4
for accessing UMean or any other Mean values in your solver, first add this in your Creatfields.H
Info<< "Reading field UMean\n" << endl; volVectorField UMean ( IOobject ( "UMean", runTime.timeName(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE ), mesh );
const GeometricField<vector, fvPatchField, volMesh>& UMean_ = U.db().objectRegistry:: lookupObject<GeometricField<vector, fvPatchField, volMesh> > ( "UMean" );
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;
|Thread||Thread Starter||Forum||Replies||Last Post|
|Online libraries - with access to Journals||momentum_waves||Main CFD Forum||2||December 12, 2007 11:08|
|UDF Data Access Macro||Woo Meng Wai||FLUENT||0||November 6, 2007 21:23|
|Error: access: unbound variable,HELP||sudhakar||FLUENT||0||January 16, 2007 00:21|
|Access Density||Allan Walsh||FLUENT||3||October 4, 2005 07:55|
|access to variables at interface of porous media?||Mazyar||FLUENT||0||October 10, 2003 14:59|