|
[Sponsors] |
March 17, 2012, 17:14 |
Access UMean at runtime
|
#1 |
Senior Member
n/a
Join Date: Sep 2009
Posts: 199
Rep Power: 17 |
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 |
|
#2 |
Member
Dejan Morar
Join Date: Nov 2010
Posts: 78
Rep Power: 17 |
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 |
|
March 19, 2012, 13:10 |
|
#3 |
Senior Member
n/a
Join Date: Sep 2009
Posts: 199
Rep Power: 17 |
Thank you Dejan, I will certainly take a look at the code.
Cheers, Deji |
|
April 25, 2016, 20:20 |
|
#4 | |
Member
Yousef
Join Date: Feb 2015
Posts: 40
Rep Power: 11 |
Quote:
for accessing UMean or any other Mean values in your solver, first add this in your Creatfields.H Code:
Info<< "Reading field UMean\n" << endl; volVectorField UMean ( IOobject ( "UMean", runTime.timeName(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE ), mesh ); Code:
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_[0] (first value of UMean) and compare it with the saved UMean file in the time directory. Info << "UMean_[0] = " << UMean_[0] << endl; |
||
|
|
Similar Threads | ||||
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 08:55 |
access to variables at interface of porous media? | Mazyar | FLUENT | 0 | October 10, 2003 15:59 |