View Issue Details

IDProjectCategoryView StatusLast Update
0000871OpenFOAMBugpublic2013-06-04 18:11
Reporternogenmyr Assigned Tohenry  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
PlatformLinuxOSCentOSOS Version5
Summary0000871: Restart with engineTime...
DescriptionWhen 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 ReproduceRestart an engine case with "adjustTimeStep yes" in controlDict.
Additional InformationPresent in all OF versions AFAIK
TagsNo tags attached.

Activities

nogenmyr

2013-05-28 13:03

reporter   ~0002244

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_);
        }
    }

henry

2013-06-04 18:10

manager   ~0002262

Changed TimeIO to write entries in <time>/uniform:time in userTime units.
commit 8d082f3e10c6c40d27cea845cf8c5db2452e9d08

Issue History

Date Modified Username Field Change
2013-05-28 12:38 nogenmyr New Issue
2013-05-28 13:03 nogenmyr Note Added: 0002244
2013-06-04 18:10 henry Note Added: 0002262
2013-06-04 18:10 henry Status new => resolved
2013-06-04 18:10 henry Resolution open => fixed
2013-06-04 18:10 henry Assigned To => henry