Time: Added run-time selectable userTime option
replacing the virtual functions overridden in engineTime.
Now the userTime conversion function in Time is specified in system/controlDict
such that the solver as well as all pre- and post-processing tools also operate
correctly with the chosen user-time.
For example the user-time and rpm in the tutorials/combustion/XiEngineFoam/kivaTest case are
now specified in system/controlDict:
userTime
{
type engine;
rpm 1500;
}
The default specification is real-time:
userTime
{
type real;
}
but this entry can be omitted as the real-time class is instantiated
automatically if the userTime entry is not present in system/controlDict.
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -56,7 +56,7 @@ int main(int argc, char *argv[])
|
||||
runTime++;
|
||||
}
|
||||
|
||||
Info<< "Time = " << runTime.timeName() << nl
|
||||
Info<< "Time = " << runTime.userTimeName() << nl
|
||||
<< "Attaching sliding interface" << endl;
|
||||
|
||||
attachPolyTopoChanger(mesh).attach();
|
||||
|
||||
@ -188,7 +188,7 @@ int main(int argc, char *argv[])
|
||||
|| state == polyMesh::TOPO_PATCH_CHANGE
|
||||
)
|
||||
{
|
||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||
Info<< "Time = " << runTime.userTimeName() << nl << endl;
|
||||
|
||||
// Reconstruct globalMeshData
|
||||
mesh.globalData();
|
||||
@ -238,7 +238,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
else if (state == polyMesh::POINTS_MOVED)
|
||||
{
|
||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||
Info<< "Time = " << runTime.userTimeName() << nl << endl;
|
||||
|
||||
label nFailedChecks = checkGeometry
|
||||
(
|
||||
|
||||
@ -63,7 +63,7 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
runTime.setTime(Times[timeI], timeI);
|
||||
|
||||
Info<< "Time = " << runTime.timeName() << endl;
|
||||
Info<< "Time = " << runTime.userTimeName() << endl;
|
||||
|
||||
typeIOobject<volVectorField> Uheader
|
||||
(
|
||||
|
||||
@ -97,7 +97,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
while (runTime.loop())
|
||||
{
|
||||
Info<< "Time = " << runTime.timeName() << endl;
|
||||
Info<< "Time = " << runTime.userTimeName() << endl;
|
||||
|
||||
while (pimple.loop())
|
||||
{
|
||||
|
||||
@ -59,7 +59,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
while (runTime.loop())
|
||||
{
|
||||
Info<< "Time = " << runTime.timeName() << endl;
|
||||
Info<< "Time = " << runTime.userTimeName() << endl;
|
||||
|
||||
mesh.movePoints(motionPtr->newPoints());
|
||||
|
||||
|
||||
@ -115,7 +115,7 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
runTime.setTime(timeDirs[timeI], timeI);
|
||||
|
||||
Info<< "Time = " << runTime.timeName() << endl;
|
||||
Info<< "Time = " << runTime.userTimeName() << endl;
|
||||
|
||||
// Search for list of objects for this time
|
||||
IOobjectList objects(mesh, runTime.timeName());
|
||||
|
||||
@ -221,7 +221,7 @@ int main(int argc, char *argv[])
|
||||
forAll(timeDirs, timei)
|
||||
{
|
||||
runTime.setTime(timeDirs[timei], timei);
|
||||
Info<< "Time = " << runTime.timeName() << endl;
|
||||
Info<< "Time = " << runTime.userTimeName() << endl;
|
||||
|
||||
// Optionally re-read mesh
|
||||
meshReadUpdate(mesh);
|
||||
|
||||
Reference in New Issue
Block a user