Update project.c
This commit is contained in:
@@ -873,6 +873,9 @@ int changevalvetype(Project *pr, int index, int type)
|
|||||||
case PBV:
|
case PBV:
|
||||||
setting *= pr->Ucf[PRESSURE];
|
setting *= pr->Ucf[PRESSURE];
|
||||||
break;
|
break;
|
||||||
|
case GPV:
|
||||||
|
setting = 0.0;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
switch (type)
|
switch (type)
|
||||||
{
|
{
|
||||||
@@ -886,8 +889,10 @@ int changevalvetype(Project *pr, int index, int type)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// If converting to a GPV set its head loss curve to 0 (i.e., none)
|
// Save setting
|
||||||
if (type == GPV) setting = 0.0;
|
if (type == GPV) setting = 0.0;
|
||||||
|
if (type == PCV) setting = MIN(setting, 100.0);
|
||||||
|
link->Kc = setting;
|
||||||
link->InitSetting = setting;
|
link->InitSetting = setting;
|
||||||
|
|
||||||
// Change valve link's type
|
// Change valve link's type
|
||||||
|
|||||||
Reference in New Issue
Block a user