Bug fixed - Wall reaction coefficient variable in water quality simulation is explicitly defined and added since epanet uses the roughness resistance variable as it and caused some error in step wise calculation.

This commit is contained in:
mickey
2013-02-22 10:51:05 -05:00
parent 2ad5765dd3
commit 992866e602
2 changed files with 3 additions and 2 deletions

View File

@@ -1458,7 +1458,7 @@ void ratecoeffs()
{
kw = Link[k].Kw;
if (kw != 0.0) kw = piperate(k);
Link[k].R = kw;
Link[k].Rc = kw;
R[k] = 0.0;
}
} /* End of ratecoeffs */
@@ -1541,7 +1541,7 @@ double pipereact(int k, double c, double v, long dt)
/* Otherwise find bulk & wall reaction rates */
rbulk = bulkrate(c,Link[k].Kb,BulkOrder)*Bucf;
rwall = wallrate(c,Link[k].Diam,Link[k].Kw,Link[k].R);
rwall = wallrate(c,Link[k].Diam,Link[k].Kw,Link[k].Rc);
/* Find change in concentration over timestep */
dcbulk = rbulk*(double)dt;