@@ -1262,14 +1262,12 @@ public override void Initialize()
1262
1262
if (CylinderExhausttoCutoff == null)
1263
1263
{
1264
1264
CylinderExhausttoCutoff = SteamTable.CylinderEventExhausttoCutoff();
1265
- // Trace.TraceInformation("Default values used for CylinderExhausttoCutoff");
1266
1265
}
1267
1266
1268
1267
1269
1268
if (CylinderCompressiontoCutoff == null)
1270
1269
{
1271
1270
CylinderCompressiontoCutoff = SteamTable.CylinderEventCompressiontoCutoff();
1272
- // Trace.TraceInformation("Default values used for CylinderCompressiontoCutoff");
1273
1271
}
1274
1272
1275
1273
if (CylinderAdmissiontoCutoff == null)
@@ -2614,39 +2612,28 @@ private void UpdateFX(float elapsedClockSeconds)
2614
2612
exhaustCrankAngleRad = CylinderExhaustOpenFactor * (float)Math.PI + (float)Math.PI;
2615
2613
}
2616
2614
2617
- // Trace.TraceInformation("Cylinder {0} ExhaustCrank {1} RealCrank {2} NormalCrank {3}", i + 1, MathHelper.ToDegrees(exhaustCrankAngleRad), MathHelper.ToDegrees(realCrankAngleRad), MathHelper.ToDegrees(normalisedCrankAngleRad));
2618
-
2619
2615
if (absSpeedMpS > 0.001)
2620
2616
{
2621
2617
if (i == 0 && ((normalisedCrankAngleRad <= MathHelper.Pi && normalisedCrankAngleRad >= exhaustCrankAngleRad) || (normalisedCrankAngleRad < 2 * MathHelper.Pi && normalisedCrankAngleRad >= exhaustCrankAngleRad)))
2622
2618
{
2623
2619
CylinderSteamExhaust1On = true;
2624
-
2625
- // Trace.TraceInformation("Exhaust - Factor {0} ExhaustCrank {1} RealCrank {2} NormalCrank {3} Exhaust1On {4} Cylinder {5} i {6}", CylinderExhaustOpenFactor, MathHelper.ToDegrees(exhaustCrankAngleRad), MathHelper.ToDegrees(realCrankAngleRad), MathHelper.ToDegrees(normalisedCrankAngleRad), CylinderSteamExhaust1On, i + 1, i);
2626
2620
}
2627
2621
else if (i == 0)
2628
2622
{
2629
2623
CylinderSteamExhaust1On = false;
2630
- // Trace.TraceInformation("Test #1 {0}", CylinderSteamExhaust1On);
2631
2624
}
2632
2625
2633
2626
else if (i == 1 && ((normalisedCrankAngleRad <= MathHelper.Pi && normalisedCrankAngleRad >= exhaustCrankAngleRad) || (normalisedCrankAngleRad < 2 * MathHelper.Pi && normalisedCrankAngleRad >= exhaustCrankAngleRad)))
2634
2627
{
2635
2628
CylinderSteamExhaust2On = true;
2636
- // Trace.TraceInformation("Exhaust - Factor {0} ExhaustCrank {1} RealCrank {2} NormalCrank {3} Exhaust2On {4} Cylinder {5} i {6}", CylinderExhaustOpenFactor, MathHelper.ToDegrees(exhaustCrankAngleRad), MathHelper.ToDegrees(realCrankAngleRad), MathHelper.ToDegrees(normalisedCrankAngleRad), CylinderSteamExhaust2On, i + 1, i);
2637
2629
}
2638
2630
else if (i == 1)
2639
2631
{
2640
2632
CylinderSteamExhaust2On = false;
2641
2633
}
2642
-
2643
- // Trace.TraceInformation("Exhaust - Factor {0} ExhaustCrank {1} RealCrank {2} NormalCrank {3} ExhaustOn {4} Cylinder {5}", CylinderExhaustOpenFactor, MathHelper.ToDegrees(exhaustCrankAngleRad), MathHelper.ToDegrees(realCrankAngleRad), MathHelper.ToDegrees(normalisedCrankAngleRad), SteamExhaust1On, i+1);
2644
-
2645
-
2646
2634
else if (i == 2 && ((normalisedCrankAngleRad <= MathHelper.Pi && normalisedCrankAngleRad >= exhaustCrankAngleRad) || (normalisedCrankAngleRad < 2 * MathHelper.Pi && normalisedCrankAngleRad >= exhaustCrankAngleRad)))
2647
2635
{
2648
2636
CylinderSteamExhaust3On = true;
2649
- // Trace.TraceInformation("Exhaust - Factor {0} ExhaustCrank {1} RealCrank {2} NormalCrank {3} Exhaust3On {4} Cylinder {5} i {6}", CylinderExhaustOpenFactor, MathHelper.ToDegrees(exhaustCrankAngleRad), MathHelper.ToDegrees(realCrankAngleRad), MathHelper.ToDegrees(normalisedCrankAngleRad), CylinderSteamExhaust3On, i + 1, i);
2650
2637
}
2651
2638
else if (i == 2)
2652
2639
{
@@ -2656,7 +2643,6 @@ private void UpdateFX(float elapsedClockSeconds)
2656
2643
else if (i == 3 && ((normalisedCrankAngleRad <= MathHelper.Pi && normalisedCrankAngleRad >= exhaustCrankAngleRad) || (normalisedCrankAngleRad < 2 * MathHelper.Pi && normalisedCrankAngleRad >= exhaustCrankAngleRad)))
2657
2644
{
2658
2645
CylinderSteamExhaust4On = true;
2659
- // Trace.TraceInformation("Exhaust - Factor {0} ExhaustCrank {1} RealCrank {2} NormalCrank {3} Exhaust4On {4} Cylinder {5} i {6}", CylinderExhaustOpenFactor, MathHelper.ToDegrees(exhaustCrankAngleRad), MathHelper.ToDegrees(realCrankAngleRad), MathHelper.ToDegrees(normalisedCrankAngleRad), CylinderSteamExhaust4On, i + 1, i);
2660
2646
}
2661
2647
else if (i == 3)
2662
2648
{
@@ -2841,35 +2827,24 @@ private void UpdateFX(float elapsedClockSeconds)
2841
2827
{
2842
2828
exhaustCrankAngleRad = CylinderExhaustOpenFactor * (float)Math.PI + (float)Math.PI;
2843
2829
}
2844
-
2845
- // Trace.TraceInformation("Cylinder {0} ExhaustCrank {1} RealCrank {2} NormalCrank {3}", i + 1, MathHelper.ToDegrees(exhaustCrankAngleRad), MathHelper.ToDegrees(realCrankAngleRad), MathHelper.ToDegrees(normalisedCrankAngleRad));
2846
-
2847
2830
if (absSpeedMpS > 0.001)
2848
2831
{
2849
2832
if (i == 0 && ((normalisedCrankAngleRad <= MathHelper.Pi && normalisedCrankAngleRad >= exhaustCrankAngleRad) || (normalisedCrankAngleRad < 2 * MathHelper.Pi && normalisedCrankAngleRad >= exhaustCrankAngleRad)))
2850
2833
{
2851
2834
CylinderSteamExhaust2_1On = true;
2852
-
2853
- // Trace.TraceInformation("Exhaust - Factor {0} ExhaustCrank {1} RealCrank {2} NormalCrank {3} Exhaust1On {4} Cylinder {5} i {6}", CylinderExhaustOpenFactor, MathHelper.ToDegrees(exhaustCrankAngleRad), MathHelper.ToDegrees(realCrankAngleRad), MathHelper.ToDegrees(normalisedCrankAngleRad), CylinderSteamExhaust1On, i + 1, i);
2854
2835
}
2855
2836
else if (i == 0)
2856
2837
{
2857
2838
CylinderSteamExhaust2_1On = false;
2858
- // Trace.TraceInformation("Test #1 {0}", CylinderSteamExhaust1On);
2859
2839
}
2860
-
2861
2840
else if (i == 1 && ((normalisedCrankAngleRad <= MathHelper.Pi && normalisedCrankAngleRad >= exhaustCrankAngleRad) || (normalisedCrankAngleRad < 2 * MathHelper.Pi && normalisedCrankAngleRad >= exhaustCrankAngleRad)))
2862
2841
{
2863
2842
CylinderSteamExhaust2_2On = true;
2864
- // Trace.TraceInformation("Exhaust - Factor {0} ExhaustCrank {1} RealCrank {2} NormalCrank {3} Exhaust2On {4} Cylinder {5} i {6}", CylinderExhaustOpenFactor, MathHelper.ToDegrees(exhaustCrankAngleRad), MathHelper.ToDegrees(realCrankAngleRad), MathHelper.ToDegrees(normalisedCrankAngleRad), CylinderSteamExhaust2On, i + 1, i);
2865
2843
}
2866
2844
else if (i == 1)
2867
2845
{
2868
2846
CylinderSteamExhaust2_2On = false;
2869
2847
}
2870
-
2871
- // Trace.TraceInformation("Exhaust - Factor {0} ExhaustCrank {1} RealCrank {2} NormalCrank {3} ExhaustOn {4} Cylinder {5}", CylinderExhaustOpenFactor, MathHelper.ToDegrees(exhaustCrankAngleRad), MathHelper.ToDegrees(realCrankAngleRad), MathHelper.ToDegrees(normalisedCrankAngleRad), SteamExhaust1On, i+1);
2872
-
2873
2848
}
2874
2849
2875
2850
if (TotalNumberCyindersEng2 == 2)
@@ -3090,8 +3065,6 @@ private void UpdateFX(float elapsedClockSeconds)
3090
3065
BoosterCylinderSteamExhaust02SteamVolumeM3pS = BoosterCylinderSteamExhaustOn && BoosterCylinderSteamExhaust02On ? (10.0f * BoosterSteamFraction) : 0.0f;
3091
3066
BoosterCylinderSteamExhaust02SteamVelocityMpS = 100.0f;
3092
3067
3093
- // Trace.TraceInformation("Booster Exhaust - ExhaustOn {0} Exhaust01On {1} Exhaust02On {2} ExhaustVolume01 {3} ExhaustVolume02 {4} SteamFraction {5} Speed {6}", BoosterCylinderSteamExhaustOn, BoosterCylinderSteamExhaust01On, BoosterCylinderSteamExhaust02On, BoosterCylinderSteamExhaust01SteamVolumeM3pS, BoosterCylinderSteamExhaust02SteamVolumeM3pS, BoosterSteamFraction, BoosterEngineSpeedRpM);
3094
-
3095
3068
// Booster Cylinder Steam Cylinder Cocks (automatic)
3096
3069
BoosterCylinderCockSteam11VolumeMpS = BoosterCylinderCocksOn && BoosterCylinderCock11On ? (10.0f * BoosterSteamFraction) : 0.0f;
3097
3070
BoosterCylinderCock11SteamVelocityMpS = 100.0f;
@@ -5600,9 +5573,6 @@ private void UpdateCylinders(float elapsedClockSeconds, float throttle, float cu
5600
5573
// Geared locomotives will have to take into account gearing ratio.
5601
5574
RawCalculatedCylinderSteamUsageLBpS = SteamEngines[numberofengine].NumberCylinders * DrvWheelRevRpS * MotiveForceGearRatio * CylStrokesPerCycle * RawCylinderSteamWeightLbs;
5602
5575
CalculatedCylinderSteamUsageLBpS = RawCalculatedCylinderSteamUsageLBpS * SuperheaterSteamUsageFactor;
5603
-
5604
-
5605
- // Trace.TraceInformation("Steam Consumption - Eng# {0} Calc {1} Raw {2} Factor {3}", numberofengine, pS.TopH(CalculatedCylinderSteamUsageLBpS), pS.TopH(RawCalculatedCylinderSteamUsageLBpS), SuperheaterSteamUsageFactor);
5606
5576
}
5607
5577
5608
5578
#endregion
@@ -6147,12 +6117,6 @@ protected override void UpdateTractiveForce(float elapsedClockSeconds, float loc
6147
6117
6148
6118
}
6149
6119
6150
- // Temporary code to compare TE and IHP
6151
-
6152
- SteamEngines[i].CompareTractiveForceN = N.FromLbf((SteamEngines[i].NumberCylinders / 2.0f) * (Me.ToIn(SteamEngines[i].CylindersDiameterM) * Me.ToIn(SteamEngines[i].CylindersDiameterM) * Me.ToIn(SteamEngines[i].CylindersStrokeM) / (2.0f * Me.ToIn(SteamEngines[i].AttachedAxle.WheelRadiusM))) * (SteamEngines[i].MeanEffectivePressurePSI * CylinderEfficiencyRate) * MotiveForceGearRatio);
6153
-
6154
- SteamEngines[i].CompareIndicatedHorsePower = (N.ToLbf(SteamEngines[i].RealTractiveForceN) * pS.TopH(Me.ToMi(absSpeedMpS))) / 375.0f;
6155
-
6156
6120
// Set Max Power equal to max IHP
6157
6121
MaxPowerW += W.FromHp(SteamEngines[i].MaxIndicatedHorsePowerHP);
6158
6122
@@ -7869,21 +7833,6 @@ public override string GetDebugStatus()
7869
7833
}
7870
7834
}
7871
7835
7872
- // Comparison of TE and IHP - to be deleted
7873
- for (int i = 0; i < SteamEngines.Count; i++)
7874
- {
7875
- status.AppendFormat("{0}\t{1}\t{2}\t{3}\t{4}\t{5}\t{6}\n",
7876
- Simulator.Catalog.GetString("ForceCom:"),
7877
- Simulator.Catalog.GetString("Eng#:"),
7878
- i + 1,
7879
- Simulator.Catalog.GetString("CompTE"),
7880
- FormatStrings.FormatForce(SteamEngines[i].CompareTractiveForceN, IsMetric),
7881
- Simulator.Catalog.GetString("CompIHP"),
7882
- FormatStrings.FormatPower(W.FromHp(SteamEngines[i].CompareIndicatedHorsePower), IsMetric, false, false)
7883
- );
7884
- }
7885
-
7886
-
7887
7836
status.AppendFormat("{0}\t{1}\t{2}\t{3}\t{4}\t{5}\t{6}\t{7}\t{8}\t{9}\t{10}\t{11}\t{12}\n",
7888
7837
Simulator.Catalog.GetString("ForceTot:"),
7889
7838
Simulator.Catalog.GetString("TheorTE"),
0 commit comments