Change default properties for new pipe created with EN_addlink (issue #500)

This commit is contained in:
Lew Rossman
2019-05-28 11:17:44 -04:00
parent 40c39fd3c6
commit 6a5aa372f8

View File

@@ -3152,10 +3152,18 @@ int DLLEXPORT EN_addlink(EN_Project p, char *id, int linkType,
}
else if (linkType <= PIPE) // pipe or cvpipe
{
// 10" diameter new ductile iron pipe with
// length of average city block
link->Diam = 10 / p->Ucf[DIAM];
link->Kc = 100; // Rough. coeff
switch (hyd->Formflag)
{
case HW: link->Kc = 130; break;
case DW: link->Kc = 0.0005; break;
case CM: link->Kc = 0.01; break;
default: link->Kc = 1.0;
}
link->Km = 0.0; // Loss coeff
link->Len = 1000;
link->Len = 330.0;
}
else // Valve
{