Skip to content

Commit a63643a

Browse files
committed
More documentation, and adjust smoke stack with exhaust.
1 parent ed72cdb commit a63643a

File tree

3 files changed

+36
-2
lines changed

3 files changed

+36
-2
lines changed

Source/Documentation/Manual/physics.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,16 @@ The ``ORTSSlipControlSystem ( Full )`` parameter can be inserted
339339
into the engine section of the .eng file to indicate the presence of
340340
such system.
341341

342+
Steam locomotives will have varying magnitude of rotational forces depending upon the separation
343+
between the cylinder crank angles.
344+
345+
The crank angles for example of a 2 cylinder locomotive has a 90 deg separation whereas a 3 cylinder locomotive
346+
has a 120 deg variation. OR will default to a "common" value for the number of cylinders defined, but the user
347+
can override this with "ORTSWheelCrankAngleDifference ( A B C D )", where A, B, C and D are the separations for
348+
up to a 4 cylinder locomotive. For example, a 4 cylinder locomotive can have a separation of 90 deg for each
349+
cylinder or sometimes it has two of the cranks separated by 45 deg instead. These values can either be in
350+
Rad (default) or Deg.
351+
342352

343353
Engine -- Classes of Motive Power
344354
=================================

Source/Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -710,6 +710,7 @@ public float TenderCoalMassKG // Decreased by firing and increased
710710
bool CylinderCock42On = false;
711711
public bool Cylinder2SteamEffects = false;
712712
public bool CylinderAdvancedSteamEffects = false;
713+
public bool CylinderAdvancedSteamExhaustEffects = false;
713714
public bool GeneratorSteamEffects = false;
714715
public float CompressorParticleDurationS = 3.0f;
715716
public float Cylinder1ParticleDurationS = 3.0f;
@@ -2468,8 +2469,28 @@ private void UpdateFX(float elapsedClockSeconds)
24682469
float SmokeColorFireMass = (FireMassKG / IdealFireMassKG); // As firemass exceeds the ideal mass the fire becomes 'blocked', when firemass is < ideal then fire burns more freely.
24692470
SmokeColorFireMass = (1.0f / SmokeColorFireMass) * (1.0f / SmokeColorFireMass) * (1.0f / SmokeColorFireMass); // Inverse the firemass value, then cube it to make it a bit more significant
24702471

2471-
StackSteamVelocityMpS.Update(elapsedClockSeconds, (float)Math.Sqrt(KPa.FromPSI(Pressure_c_AtmPSI) * 1000 * 2 / WaterDensityAt100DegC1BarKGpM3));
2472-
StackSteamVolumeM3pS = Kg.FromLb(CylinderSteamUsageLBpS + BlowerSteamUsageLBpS + RadiationSteamLossLBpS + CompSteamUsageLBpS + GeneratorSteamUsageLBpS) * SteamVaporSpecVolumeAt100DegC1BarM3pKG;
2472+
if (CylinderAdvancedSteamExhaustEffects)
2473+
{
2474+
2475+
if (CylinderSteamExhaust1On || CylinderSteamExhaust2On || CylinderSteamExhaust3On || CylinderSteamExhaust4On)
2476+
{
2477+
StackSteamVelocityMpS.Update(elapsedClockSeconds, (float)Math.Sqrt(KPa.FromPSI(Pressure_c_AtmPSI) * 1000 * 50 / WaterDensityAt100DegC1BarKGpM3));
2478+
StackSteamVolumeM3pS = Kg.FromLb(CylinderSteamUsageLBpS + BlowerSteamUsageLBpS + RadiationSteamLossLBpS + CompSteamUsageLBpS + GeneratorSteamUsageLBpS) * 20 * SteamVaporSpecVolumeAt100DegC1BarM3pKG;
2479+
}
2480+
else
2481+
{
2482+
StackSteamVelocityMpS.Update(elapsedClockSeconds, (float)Math.Sqrt(KPa.FromPSI(Pressure_c_AtmPSI) * 0.5f * 1000 / WaterDensityAt100DegC1BarKGpM3));
2483+
StackSteamVolumeM3pS = Kg.FromLb(CylinderSteamUsageLBpS + BlowerSteamUsageLBpS + RadiationSteamLossLBpS + CompSteamUsageLBpS + GeneratorSteamUsageLBpS) * 0.25f * SteamVaporSpecVolumeAt100DegC1BarM3pKG;
2484+
2485+
}
2486+
}
2487+
else
2488+
{
2489+
StackSteamVelocityMpS.Update(elapsedClockSeconds, (float)Math.Sqrt(KPa.FromPSI(Pressure_c_AtmPSI) * 1000 * 2 / WaterDensityAt100DegC1BarKGpM3));
2490+
StackSteamVolumeM3pS = Kg.FromLb(CylinderSteamUsageLBpS + BlowerSteamUsageLBpS + RadiationSteamLossLBpS + CompSteamUsageLBpS + GeneratorSteamUsageLBpS) * SteamVaporSpecVolumeAt100DegC1BarM3pKG;
2491+
}
2492+
2493+
24732494
float SmokeColorUnits = (RadiationSteamLossLBpS + CalculatedCarHeaterSteamUsageLBpS + BlowerBurnEffect + (SmokeColorDamper * SmokeColorFireMass)) / PreviousTotalSteamUsageLBpS - 0.2f;
24742495
SmokeColor.Update(elapsedClockSeconds, MathHelper.Clamp(SmokeColorUnits, 0.25f, 1));
24752496

Source/RunActivity/Viewer3D/RollingStock/MSTSSteamLocomotiveViewer.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,10 @@ public MSTSSteamLocomotiveViewer(Viewer viewer, MSTSSteamLocomotive car)
9797
else if (emitter.Key.ToLowerInvariant() == "cylinders42fx")
9898
Cylinders42.AddRange(emitter.Value);
9999
else if (emitter.Key.ToLowerInvariant() == "cylindersteamexhaust1fx")
100+
{
100101
CylinderSteamExhaust1.AddRange(emitter.Value);
102+
car.CylinderAdvancedSteamExhaustEffects = true;
103+
}
101104
else if (emitter.Key.ToLowerInvariant() == "cylindersteamexhaust2fx")
102105
CylinderSteamExhaust2.AddRange(emitter.Value);
103106
else if (emitter.Key.ToLowerInvariant() == "cylindersteamexhaust3fx")

0 commit comments

Comments
 (0)