CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (http://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   read out controlDict and fvSolution from a lib (http://www.cfd-online.com/Forums/openfoam-programming-development/123134-read-out-controldict-fvsolution-lib.html)

RugbyGandalf September 5, 2013 04:16

read out controlDict and fvSolution from a lib
 
Dear Foam-Community,

i am working on a mesh-motion solver, wich works as a library / boundary-type.
Therefor i would like to read out the runTime out of the controlDict and some values out of the fvSolution dict. Unfortunately, I do not know, how to solve this.

I tried:
scalar iterationSteps(readScalar(runTime.controlDict().lo okup("deltaT")));
But the problem is the 'runTime'-Variable, wich i am not able to define.

Does anyone has any suggestions, how to solve this?

Regards,
Martin

jherb September 5, 2013 09:20

In (e. g.) simpleFoam.C the file createTime.H is included, which defines runTime:
Code:

//
// createTime.H
// ~~~~~~~~~~~~

    Foam::Info<< "Create time\n" << Foam::endl;

    Foam::Time runTime(Foam::Time::controlDictName, args);



All times are GMT -4. The time now is 02:31.