Skip to content

Commit 42398f4

Browse files
committed
Further enhancements for duplex locoomotive
1 parent af8fb30 commit 42398f4

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

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

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1448,6 +1448,19 @@ public override void Initialize()
14481448
// Model current based upon a four cylinder, balanced compound, type Vauclain, as built by Baldwin, with no receiver between the HP and LP cylinder
14491449
// Set to compound operation intially
14501450

1451+
// include check to see if it is a balanced compound locomotive, ie number of HP cylinders = number of LP cylinders
1452+
if(SteamEngines[i].NumberCylinders != SteamEngines[i].LPNumberCylinders && Simulator.Settings.VerboseConfigurationMessages)
1453+
{
1454+
1455+
Trace.TraceInformation("This doesn't appear to be a balanced compound locomotive, ie LP Cylinders = HP Cylinders. Game performnce may not be realistic.");
1456+
SteamEngines[i].NumberCylinders = 2;
1457+
SteamEngines[i].LPNumberCylinders = 2;
1458+
1459+
Trace.TraceInformation("Compound locomotive set to balanced with HP Cylinder = {0} and LP Cylinder = {1}", SteamEngines[i].NumberCylinders, SteamEngines[i].LPNumberCylinders);
1460+
1461+
}
1462+
1463+
14511464
CompoundCylinderRatio = (SteamEngines[i].LPCylindersDiameterM * SteamEngines[i].LPCylindersDiameterM) / (SteamEngines[i].CylindersDiameterM * SteamEngines[i].CylindersDiameterM);
14521465
SteamEngines[i].MaxTractiveEffortLbf = CylinderEfficiencyRate * (1.6f * MaxBoilerPressurePSI * Me.ToIn(SteamEngines[i].LPCylindersDiameterM) * Me.ToIn(SteamEngines[i].LPCylindersDiameterM) * Me.ToIn(SteamEngines[i].LPCylindersStrokeM)) / ((CompoundCylinderRatio + 1.0f) * (Me.ToIn(SteamEngines[i].AttachedAxle.WheelRadiusM * 2.0f)));
14531466

@@ -5794,6 +5807,7 @@ private void UpdateSteamTractiveForce(float elapsedClockSeconds, float locomotiv
57945807

57955808
for (int i = 0; i < SteamEngines[numberofengine].NumberCylinders; i++)
57965809
{
5810+
57975811
// This feature sues some different reference angles as follows:
57985812
// AxlePositionRad - comes from the axle module and is -180 - 0 - 180
57995813
// Crank Angle - converts the above range to 0 - 180 - 0 - this is the principle reference used so that it lines up with reference

0 commit comments

Comments
 (0)