CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Programming & Development (
-   -   read out controlDict and fvSolution from a lib (

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?


jherb September 5, 2013 09:20

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

// 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 23:41.