You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Source/Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs
+38-7Lines changed: 38 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -122,6 +122,9 @@ public class MSTSSteamLocomotive : MSTSLocomotive
122
122
bool WaterMotionPump1IsOn = false;
123
123
bool WaterMotionPump2IsOn = false;
124
124
float WaterMotionPumpHeatLossBTU;
125
+
bool WaterMotionPumpLockedOut = false;
126
+
float WaterMotionPumpLockOutResetTimeS = 15.0f; // Time to reset the pump lock out time - time to prevent change of pumps
127
+
float WaterMotionPumpLockOutTimeS; // Current lock out time - reset after Reset Time exceeded
125
128
public bool CylinderCocksAreOpen;
126
129
public bool BlowdownValveOpen;
127
130
public bool CylinderCompoundOn; // Flag to indicate whether compound locomotive is in compound or simple mode of operation - simple = true (ie bypass valve is open)
@@ -1155,8 +1158,9 @@ public override void Save(BinaryWriter outf)
1155
1158
outf.Write(Injector2IsOn);
1156
1159
outf.Write(Injector2Fraction);
1157
1160
outf.Write(InjectorLockedOut);
1161
+
outf.Write(WaterMotionPumpLockedOut);
1158
1162
outf.Write(InjectorLockOutTimeS);
1159
-
outf.Write(InjectorLockOutResetTimeS);
1163
+
outf.Write(WaterMotionPumpLockOutTimeS);
1160
1164
outf.Write(WaterTempNewK);
1161
1165
outf.Write(BkW_Diff);
1162
1166
outf.Write(WaterFraction);
@@ -1219,8 +1223,9 @@ public override void Restore(BinaryReader inf)
// calculate Water steam heat based on injector water delivery temp
7046
-
BoilerMassLB += elapsedClockSeconds * TotalPumpFlowRateLbpS; // Boiler Mass increase by Injector both pumps
7047
-
BoilerHeatBTU -= elapsedClockSeconds * WaterMotionPumpHeatLossBTU; // Total loss of boiler heat due to water injection - inject steam and water Heat
7059
+
BoilerMassLB += elapsedClockSeconds * TotalPumpFlowRateLbpS; // Boiler Mass increase by both pumps
7060
+
BoilerHeatBTU -= elapsedClockSeconds * WaterMotionPumpHeatLossBTU; // Total loss of boiler heat due to water pump - inject cold water straight from tender
7048
7061
// InjectorBoilerInputLB += (elapsedClockSeconds * Injector1Fraction * InjectorFlowRateLBpS); // Keep track of water flow into boilers from Injector 1
7049
7062
BoilerHeatOutBTUpS += WaterMotionPumpHeatLossBTU; // Total loss of boiler heat due to water injection - inject steam and water Heat
if (WaterGlassLevelIN > 7.99) // turn pumps off if water level in boiler greater then 8.0, to stop cycling
7249
7278
{
7250
7279
WaterMotionPump1IsOn = false;
7251
7280
WaterMotionPump2IsOn = false;
7252
7281
}
7253
-
else if (WaterGlassLevelIN <= 7.0 && WaterGlassLevelIN > 5.75) // turn water pump #1 on if water level in boiler drops below 7.0 and is above
7282
+
else if (WaterGlassLevelIN <= 7.0 && WaterGlassLevelIN > 5.75 && !WaterMotionPumpLockedOut) // turn water pump #1 on if water level in boiler drops below 7.0 and is above
7254
7283
{
7255
7284
WaterMotionPump1IsOn = true;
7256
7285
WaterMotionPump2IsOn = false;
7286
+
WaterMotionPumpLockedOut = true;
7257
7287
}
7258
-
else if (WaterGlassLevelIN <= 5.75 && WaterGlassLevelIN > 4.5) // turn water pump #1 on if water level in boiler drops below 7.0 and is above
7288
+
else if (WaterGlassLevelIN <= 5.75 && WaterGlassLevelIN > 4.5 && !WaterMotionPumpLockedOut) // turn water pump #2 on as well if water level in boiler drops below 5.75 and is above
0 commit comments