Fix emitter-related NaN errors by initializing zero EmitterFlow to 1.0.
Co-Authored-By: Lew Rossman <LRossman@outlook.com>
This commit is contained in:
@@ -2429,6 +2429,7 @@ int DLLEXPORT EN_setnodevalue(EN_Project p, int index, int property, double valu
|
|||||||
if (value < 0.0) return 209;
|
if (value < 0.0) return 209;
|
||||||
if (value > 0.0) value = pow((Ucf[FLOW] / value), hyd->Qexp) / Ucf[PRESSURE];
|
if (value > 0.0) value = pow((Ucf[FLOW] / value), hyd->Qexp) / Ucf[PRESSURE];
|
||||||
Node[index].Ke = value;
|
Node[index].Ke = value;
|
||||||
|
if (hyd->EmitterFlow[index] == 0.0) hyd->EmitterFlow[index] = 1.0;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case EN_INITQUAL:
|
case EN_INITQUAL:
|
||||||
|
|||||||
Reference in New Issue
Block a user