Fix quality conversion factor error in ENsetqualtype
Reported here: http://community.wateranalytics.org/t/difference-in-water-age-calculated-in-epanet-and-in-matlab-using-epanet-matlab-toolkit/406/12
This commit is contained in:
@@ -2310,6 +2310,7 @@ int DLLEXPORT ENsetqualtype(int qualcode, char *chemname, char *chemunits, char
|
||||
if (!Openflag) return(102);
|
||||
if (qualcode < EN_NONE || qualcode > EN_TRACE) return(251);
|
||||
Qualflag = (char)qualcode;
|
||||
Ctol *= Ucf[QUALITY];
|
||||
if (Qualflag == CHEM) /* Chemical constituent */
|
||||
{
|
||||
strncpy(ChemName,chemname,MAXID);
|
||||
@@ -2355,6 +2356,8 @@ int DLLEXPORT ENsetqualtype(int qualcode, char *chemname, char *chemunits, char
|
||||
Ucf[LINKQUAL] = ccf;
|
||||
Ucf[REACTRATE] = ccf;
|
||||
|
||||
Ctol /= Ucf[QUALITY];
|
||||
|
||||
return(0);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user