@@ -396,7 +396,9 @@ public class MSTSSteamLocomotive : MSTSLocomotive
396396
397397 #region Additional steam properties
398398 const float SpecificHeatCoalKJpKGpK = 1.26f; // specific heat of coal - kJ/kg/K
399- const float SteamVaporSpecVolumeAt100DegC1BarM3pKG = 1.696f;
399+ const float SaturatedSteam1BarSpecificVolM3pKG = 1.694f; // specific volume of saturated steam at 1 bar (100 degC) in m^3 / kg
400+ const float SaturatedSteam5BarSpecificVolM3pKG = 0.375f; // specific volume of saturated steam at 5 bar (152 degC) in m^3 / kg
401+ const float SaturatedSteam10BarSpecificVolM3pKG = 0.194f; // specific volume of saturated steam at 10 bar (180 degC) in m^3 / kg
400402 float WaterHeatBTUpFT3; // Water heat in btu/ft3
401403 bool FusiblePlugIsBlown = false; // Fusible plug blown, due to lack of water in the boiler
402404 bool LocoIsOilBurner = false; // Used to identify if loco is oil burner
@@ -3260,35 +3262,35 @@ private void UpdateFX(float elapsedClockSeconds)
32603262 SanderSteamExhaustReverseVelocityMpS = Sander && SandingSystemType == SandingSystemTypes.Steam && Direction == Direction.Reverse ? (1.0f * SteamEffectsFactor) : 0.0f;
32613263 SanderSteamExhaustParticleDurationS = 1.0f;
32623264
3263- Cylinders1SteamVolumeM3pS = CylinderCock1On && CylinderCocksAreOpen && throttle > 0.0 && CylCockSteamUsageDisplayLBpS > 0.0 ? (1.00f * SteamEffectsFactor) : 0.0f;
3264- Cylinders2SteamVolumeM3pS = CylinderCock2On && CylinderCocksAreOpen && throttle > 0.0 && CylCockSteamUsageDisplayLBpS > 0.0 ? (1.00f * SteamEffectsFactor) : 0.0f;
3265+ Cylinders1SteamVolumeM3pS = CylinderCock1On && CylinderCocksAreOpen && throttle > 0.0 && CylCockSteamUsageDisplayLBpS > 0.0 ? (1.0f * SteamEffectsFactor) : 0.0f;
3266+ Cylinders2SteamVolumeM3pS = CylinderCock2On && CylinderCocksAreOpen && throttle > 0.0 && CylCockSteamUsageDisplayLBpS > 0.0 ? (1.0f * SteamEffectsFactor) : 0.0f;
32653267
3266- Cylinders11SteamVolumeM3pS = CylinderCock11On && CylinderCocksAreOpen && throttle > 0.0 && CylCockSteamUsageDisplayLBpS > 0.0 ? (1.00f * SteamEffectsFactor) : 0.0f;
3267- Cylinders12SteamVolumeM3pS = CylinderCock12On && CylinderCocksAreOpen && throttle > 0.0 && CylCockSteamUsageDisplayLBpS > 0.0 ? (1.00f * SteamEffectsFactor) : 0.0f;
3268- Cylinders21SteamVolumeM3pS = CylinderCock21On && CylinderCocksAreOpen && throttle > 0.0 && CylCockSteamUsageDisplayLBpS > 0.0 ? (1.00f * SteamEffectsFactor) : 0.0f;
3269- Cylinders22SteamVolumeM3pS = CylinderCock22On && CylinderCocksAreOpen && throttle > 0.0 && CylCockSteamUsageDisplayLBpS > 0.0 ? (1.00f * SteamEffectsFactor) : 0.0f;
3270- Cylinders31SteamVolumeM3pS = CylinderCock31On && CylinderCocksAreOpen && throttle > 0.0 && CylCockSteamUsageDisplayLBpS > 0.0 ? (1.00f * SteamEffectsFactor) : 0.0f;
3271- Cylinders32SteamVolumeM3pS = CylinderCock32On && CylinderCocksAreOpen && throttle > 0.0 && CylCockSteamUsageDisplayLBpS > 0.0 ? (1.00f * SteamEffectsFactor) : 0.0f;
3272- Cylinders41SteamVolumeM3pS = CylinderCock41On && CylinderCocksAreOpen && throttle > 0.0 && CylCockSteamUsageDisplayLBpS > 0.0 ? (1.00f * SteamEffectsFactor) : 0.0f;
3273- Cylinders42SteamVolumeM3pS = CylinderCock42On && CylinderCocksAreOpen && throttle > 0.0 && CylCockSteamUsageDisplayLBpS > 0.0 ? (1.00f * SteamEffectsFactor) : 0.0f;
3268+ Cylinders11SteamVolumeM3pS = CylinderCock11On && CylinderCocksAreOpen && throttle > 0.0 && CylCockSteamUsageDisplayLBpS > 0.0 ? (1.0f * SteamEffectsFactor) : 0.0f;
3269+ Cylinders12SteamVolumeM3pS = CylinderCock12On && CylinderCocksAreOpen && throttle > 0.0 && CylCockSteamUsageDisplayLBpS > 0.0 ? (1.0f * SteamEffectsFactor) : 0.0f;
3270+ Cylinders21SteamVolumeM3pS = CylinderCock21On && CylinderCocksAreOpen && throttle > 0.0 && CylCockSteamUsageDisplayLBpS > 0.0 ? (1.0f * SteamEffectsFactor) : 0.0f;
3271+ Cylinders22SteamVolumeM3pS = CylinderCock22On && CylinderCocksAreOpen && throttle > 0.0 && CylCockSteamUsageDisplayLBpS > 0.0 ? (1.0f * SteamEffectsFactor) : 0.0f;
3272+ Cylinders31SteamVolumeM3pS = CylinderCock31On && CylinderCocksAreOpen && throttle > 0.0 && CylCockSteamUsageDisplayLBpS > 0.0 ? (1.0f * SteamEffectsFactor) : 0.0f;
3273+ Cylinders32SteamVolumeM3pS = CylinderCock32On && CylinderCocksAreOpen && throttle > 0.0 && CylCockSteamUsageDisplayLBpS > 0.0 ? (1.0f * SteamEffectsFactor) : 0.0f;
3274+ Cylinders41SteamVolumeM3pS = CylinderCock41On && CylinderCocksAreOpen && throttle > 0.0 && CylCockSteamUsageDisplayLBpS > 0.0 ? (1.0f * SteamEffectsFactor) : 0.0f;
3275+ Cylinders42SteamVolumeM3pS = CylinderCock42On && CylinderCocksAreOpen && throttle > 0.0 && CylCockSteamUsageDisplayLBpS > 0.0 ? (1.0f * SteamEffectsFactor) : 0.0f;
32743276
32753277 Cylinder1ParticleDurationS = 1.0f;
32763278 Cylinder2ParticleDurationS = 1.0f;
32773279
32783280
3279- CylinderSteamExhaust1SteamVolumeM3pS = throttle > 0.0 && CylinderSteamExhaust1On ? (cutoff * 10.0f * SteamEffectsFactor) : 0.0f;
3280- CylinderSteamExhaust2SteamVolumeM3pS = throttle > 0.0 && CylinderSteamExhaust2On ? (cutoff * 10.0f * SteamEffectsFactor) : 0.0f;
3281- CylinderSteamExhaust3SteamVolumeM3pS = throttle > 0.0 && CylinderSteamExhaust3On ? (cutoff * 10.0f * SteamEffectsFactor) : 0.0f;
3282- CylinderSteamExhaust4SteamVolumeM3pS = throttle > 0.0 && CylinderSteamExhaust4On ? (cutoff * 10.0f * SteamEffectsFactor) : 0.0f;
3281+ CylinderSteamExhaust1SteamVolumeM3pS = throttle > 0.0 && CylinderSteamExhaust1On ? (cutoff * 2.5f * SteamEffectsFactor) : 0.0f;
3282+ CylinderSteamExhaust2SteamVolumeM3pS = throttle > 0.0 && CylinderSteamExhaust2On ? (cutoff * 2.5f * SteamEffectsFactor) : 0.0f;
3283+ CylinderSteamExhaust3SteamVolumeM3pS = throttle > 0.0 && CylinderSteamExhaust3On ? (cutoff * 2.5f * SteamEffectsFactor) : 0.0f;
3284+ CylinderSteamExhaust4SteamVolumeM3pS = throttle > 0.0 && CylinderSteamExhaust4On ? (cutoff * 2.5f * SteamEffectsFactor) : 0.0f;
32833285 CylinderSteamExhaustParticleDurationS = 1.0f;
32843286
3285- CylinderSteamExhaust2_1SteamVolumeM3pS = throttle > 0.0 && CylinderSteamExhaust2_1On ? (cutoff * 10.0f * SteamEffectsFactor) : 0.0f;
3286- CylinderSteamExhaust2_2SteamVolumeM3pS = throttle > 0.0 && CylinderSteamExhaust2_2On ? (cutoff * 10.0f * SteamEffectsFactor) : 0.0f;
3287+ CylinderSteamExhaust2_1SteamVolumeM3pS = throttle > 0.0 && CylinderSteamExhaust2_1On ? (cutoff * 2.5f * SteamEffectsFactor) : 0.0f;
3288+ CylinderSteamExhaust2_2SteamVolumeM3pS = throttle > 0.0 && CylinderSteamExhaust2_2On ? (cutoff * 2.5f * SteamEffectsFactor) : 0.0f;
32873289
3288- Cylinders2_11SteamVolumeM3pS = CylinderCock2_11On && CylinderCocksAreOpen && throttle > 0.0 && CylCockSteamUsageDisplayLBpS > 0.0 ? (1.00f * SteamEffectsFactor) : 0.0f;
3289- Cylinders2_12SteamVolumeM3pS = CylinderCock2_12On && CylinderCocksAreOpen && throttle > 0.0 && CylCockSteamUsageDisplayLBpS > 0.0 ? (1.00f * SteamEffectsFactor) : 0.0f;
3290- Cylinders2_21SteamVolumeM3pS = CylinderCock2_21On && CylinderCocksAreOpen && throttle > 0.0 && CylCockSteamUsageDisplayLBpS > 0.0 ? (1.00f * SteamEffectsFactor) : 0.0f;
3291- Cylinders2_22SteamVolumeM3pS = CylinderCock2_22On && CylinderCocksAreOpen && throttle > 0.0 && CylCockSteamUsageDisplayLBpS > 0.0 ? (1.00f * SteamEffectsFactor) : 0.0f;
3290+ Cylinders2_11SteamVolumeM3pS = CylinderCock2_11On && CylinderCocksAreOpen && throttle > 0.0 && CylCockSteamUsageDisplayLBpS > 0.0 ? (1.0f * SteamEffectsFactor) : 0.0f;
3291+ Cylinders2_12SteamVolumeM3pS = CylinderCock2_12On && CylinderCocksAreOpen && throttle > 0.0 && CylCockSteamUsageDisplayLBpS > 0.0 ? (1.0f * SteamEffectsFactor) : 0.0f;
3292+ Cylinders2_21SteamVolumeM3pS = CylinderCock2_21On && CylinderCocksAreOpen && throttle > 0.0 && CylCockSteamUsageDisplayLBpS > 0.0 ? (1.0f * SteamEffectsFactor) : 0.0f;
3293+ Cylinders2_22SteamVolumeM3pS = CylinderCock2_22On && CylinderCocksAreOpen && throttle > 0.0 && CylCockSteamUsageDisplayLBpS > 0.0 ? (1.0f * SteamEffectsFactor) : 0.0f;
32923294
32933295 // Booster Cylinder Steam Exhausts (automatic)
32943296 BoosterCylinderSteamExhaust01SteamVolumeM3pS = BoosterCylinderSteamExhaustOn && BoosterCylinderSteamExhaust01On ? (1.0f * BoosterSteamFraction) : 0.0f;
@@ -3337,7 +3339,7 @@ private void UpdateFX(float elapsedClockSeconds)
33373339
33383340
33393341 // Blowdown Steam Effects
3340- BlowdownSteamVolumeM3pS = (BlowdownValveOpen && BlowdownSteamUsageLBpS > 0.0) ? Kg.FromLb(BlowdownSteamUsageLBpS) * SteamVaporSpecVolumeAt100DegC1BarM3pKG : 0;
3342+ BlowdownSteamVolumeM3pS = (BlowdownValveOpen && BlowdownSteamUsageLBpS > 0.0) ? Kg.FromLb(BlowdownSteamUsageLBpS) * SaturatedSteam10BarSpecificVolM3pKG : 0;
33413343 BlowdownParticleDurationS = 2.0f;
33423344
33433345 // Drainpipe Steam Effects
@@ -3376,7 +3378,7 @@ private void UpdateFX(float elapsedClockSeconds)
33763378
33773379 // Safety Valves Steam Effects
33783380
3379- SafetyValvesSteamVolumeM3pS = SafetyIsOn ? Kg.FromLb(SafetyValveUsageLBpS) * SteamVaporSpecVolumeAt100DegC1BarM3pKG : 0;
3381+ SafetyValvesSteamVolumeM3pS = SafetyIsOn ? Kg.FromLb(SafetyValveUsageLBpS) * SaturatedSteam10BarSpecificVolM3pKG : 0;
33803382 SafetyValvesParticleDurationS = MathHelper.Clamp(3.0f / (AbsSpeedMpS / 4.0f), 0.1f, 3.0f);
33813383
33823384 // Smoke Stack Smoke Effects
@@ -3409,8 +3411,8 @@ private void UpdateFX(float elapsedClockSeconds)
34093411 {
34103412 float smokeVolumeVariationFactor = 1.0f * cutoff; // adjust smoke volume based upon throttle and cutoff settings
34113413
3412- StackSteamVolumeM3pS = Kg.FromLb(CylinderSteamUsageLBpS + BlowerSteamUsageLBpS + RadiationSteamLossLBpS + CompSteamUsageLBpS + GeneratorSteamUsageLBpS) * smokeVolumeVariationFactor * SteamVaporSpecVolumeAt100DegC1BarM3pKG;
3413- StackSteamVolumeM3pS = (StackSteamVolumeM3pS) / StackCount ;
3414+ StackSteamVolumeM3pS = Kg.FromLb(CylinderSteamUsageLBpS + BlowerSteamUsageLBpS + RadiationSteamLossLBpS + CompSteamUsageLBpS + GeneratorSteamUsageLBpS) *
3415+ smokeVolumeVariationFactor * SaturatedSteam5BarSpecificVolM3pKG ;
34143416 StackParticleDurationS = Throttlepercent + FireRatio;
34153417 }
34163418 else // when not exhausting
@@ -3419,8 +3421,8 @@ private void UpdateFX(float elapsedClockSeconds)
34193421 {
34203422 float smokeRestVolumeVariationFactor = 1.0f * cutoff; // adjust smoke volume based upon throttle and cutoff settings
34213423
3422- StackSteamVolumeM3pS = Kg.FromLb(BlowerSteamUsageLBpS + RadiationSteamLossLBpS + CompSteamUsageLBpS + GeneratorSteamUsageLBpS) * smokeRestVolumeVariationFactor * SteamVaporSpecVolumeAt100DegC1BarM3pKG;
3423- StackSteamVolumeM3pS = (StackSteamVolumeM3pS) / StackCount ;
3424+ StackSteamVolumeM3pS = Kg.FromLb(BlowerSteamUsageLBpS + RadiationSteamLossLBpS + CompSteamUsageLBpS + GeneratorSteamUsageLBpS) *
3425+ smokeRestVolumeVariationFactor * SaturatedSteam5BarSpecificVolM3pKG ;
34243426 StackParticleDurationS = Throttlepercent + FireRatio;
34253427 }
34263428 }
@@ -3429,8 +3431,8 @@ private void UpdateFX(float elapsedClockSeconds)
34293431 else // Legacy smoke implementation
34303432 {
34313433 float velocityRate = (float)Math.Sqrt(KPa.FromPSI(SteamReleasePressure_AtmPSI) * 1000 * 2 / WaterDensityAt100DegC1BarKGpM3);
3432- StackSteamVolumeM3pS = Kg.FromLb(CylinderSteamUsageLBpS + BlowerSteamUsageLBpS + RadiationSteamLossLBpS + CompSteamUsageLBpS + GeneratorSteamUsageLBpS) * SteamVaporSpecVolumeAt100DegC1BarM3pKG;
3433- StackSteamVolumeM3pS = (StackSteamVolumeM3pS) / StackCount ;
3434+ StackSteamVolumeM3pS = Kg.FromLb(CylinderSteamUsageLBpS + BlowerSteamUsageLBpS + RadiationSteamLossLBpS + CompSteamUsageLBpS + GeneratorSteamUsageLBpS) *
3435+ SaturatedSteam5BarSpecificVolM3pKG ;
34343436 StackParticleDurationS = Throttlepercent + FireRatio;
34353437 }
34363438
0 commit comments