View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000871 | OpenFOAM | Bug | public | 2013-05-28 12:38 | 2013-06-04 18:11 |
Reporter | nogenmyr | Assigned To | henry | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Platform | Linux | OS | CentOS | OS Version | 5 |
Summary | 0000871: Restart with engineTime... | ||||
Description | When restarting engine cases, the file "uniform/time" usually contains info on the time step size. This was saved in the unit seconds, but when using the engineTime-class this is interpreted as deltaCrankAngle - which normally differs orders of magnitude. | ||||
Steps To Reproduce | Restart an engine case with "adjustTimeStep yes" in controlDict. | ||||
Additional Information | Present in all OF versions AFAIK | ||||
Tags | No tags attached. | ||||
|
So... adding this simple hack to the constructor (just before calling timeAdjustment()) in engineTime.C solves the issue: const IOdictionary controlDict ( IOobject ( name, system(), *this, IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE, false ) ); IOdictionary timeDict ( IOobject ( "time", timeName(), "uniform", *this, IOobject::READ_IF_PRESENT, IOobject::NO_WRITE, false ) ); if (controlDict.lookupOrDefault<Switch>("adjustTimeStep", false)) { if (timeDict.readIfPresent("deltaT", deltaT_)) { deltaT_ = timeToDeg(deltaT_); } } |
|
Changed TimeIO to write entries in <time>/uniform:time in userTime units. commit 8d082f3e10c6c40d27cea845cf8c5db2452e9d08 |