Hotstart files in SWMM 5

While using SWMM 5.0.018, I realised that the Hotstart files don't completely eliminate instability in a fairly looped network, whereas in the latest version i.e. SWMM 5.0.022, the Hotstart files completely stabilize the same network!!!

I read the UPDATE HISTORY, but could not find exact information on what was done to archieve this. Could anyone help me identify exactly what was done to improve this feature?

E-mail me when people leave their comments –

You need to be a member of SWMM 5 or SWMM or EPASWMM and SWMM5 in ICM_SWMM to add comments!

Join SWMM 5 or SWMM or EPASWMM and SWMM5 in ICM_SWMM

Comments

  • 1.  The hot start files are almost the same in v18 and v22 except for a new groundwater status flag (see the code below)

    2.  It is probably due to small engine difference in v22 versus v18 that account for the difference - if you lower your time step then v18 may be just as stable as v22 for your model

     

     


    //// Function re-written to read groundwater states. //// //(5.0.018 - LR)

    int openHotstartFile1()
    //
    // Input: none
    // Output: none
    // Purpose: opens a previously saved hotstart file.
    //
    {
    int nSubcatch;
    int nNodes;
    int nLinks;
    int nPollut;
    int flowUnits;
    char fileStamp[] = "SWMM5-HOTSTART";
    char fStamp[] = "SWMM5-HOTSTART";
    char fileStamp2[] = "SWMM5-HOTSTART2";
    char fStamp2[] = "SWMM5-HOTSTART2";
    int fileVersion;

    // --- try to open the file
    if ( Fhotstart1.mode != USE_FILE ) return TRUE;
    if ( (Fhotstart1.file = fopen(Fhotstart1.name, "r+b")) == NULL)
    {
    report_writeErrorMsg(ERR_HOTSTART_FILE_OPEN, Fhotstart1.name);
    return FALSE;
    }

    // --- check that file contains proper header records
    fread(fStamp2, sizeof(char), strlen(fileStamp2), Fhotstart1.file);
    if ( strcmp(fStamp2, fileStamp2) == 0 ) fileVersion = 2;
    else
    {
    rewind(Fhotstart1.file);
    fread(fStamp, sizeof(char), strlen(fileStamp), Fhotstart1.file);
    if ( strcmp(fStamp, fileStamp) != 0 )
    {
    report_writeErrorMsg(ERR_HOTSTART_FILE_FORMAT, "");
    return FALSE;
    }
    fileVersion = 1;
    }
    nSubcatch = -1;
    nNodes = -1;
    nLinks = -1;
    nPollut = -1;
    flowUnits = -1;
    if ( fileVersion == 2 )
    {
    fread(&nSubcatch, sizeof(int), 1, Fhotstart1.file);
    }
    else nSubcatch = Nobjects[SUBCATCH];
    fread(&nNodes, sizeof(int), 1, Fhotstart1.file);
    fread(&nLinks, sizeof(int), 1, Fhotstart1.file);
    fread(&nPollut, sizeof(int), 1, Fhotstart1.file);
    fread(&flowUnits, sizeof(int), 1, Fhotstart1.file);
    if ( nSubcatch != Nobjects[SUBCATCH]
    || nNodes != Nobjects[NODE]
    || nLinks != Nobjects[LINK]
    || nPollut != Nobjects[POLLUT]
    || flowUnits != FlowUnits )
    {
    report_writeErrorMsg(ERR_HOTSTART_FILE_FORMAT, "");
    return FALSE;
    }

    // --- read contents of the file and close it
    readHotstartFile(fileVersion);
    fclose(Fhotstart1.file);
    if ( ErrorCode ) return FALSE;
    else return TRUE;
    }
This reply was deleted.