Skip to content

Commit 30fd5c4

Browse files
committed
Update hammer blow.
1 parent 476d67b commit 30fd5c4

File tree

2 files changed

+13
-10
lines changed

2 files changed

+13
-10
lines changed

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

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2000,9 +2000,9 @@ public override void Initialize()
20002000
MaxIndicatedHorsePowerHP += SteamEngines[i].MaxIndicatedHorsePowerHP;
20012001
}
20022002

2003-
if (SteamEngines[i].ExcessWheelBalanceLbs == 0)
2003+
if (SteamEngines[i].ExcessRodBalanceLbs == 0)
20042004
{
2005-
SteamEngines[i].ExcessWheelBalanceLbs = 440f; // set to a default value.
2005+
SteamEngines[i].ExcessRodBalanceLbs = 440f; // set to a default value.
20062006
}
20072007

20082008
// For light locomotives reduce the weight of the various connecting rods, as the default values are for larger locomotives. This will reduce slip on small locomotives
@@ -2012,12 +2012,12 @@ public override void Initialize()
20122012
if (MassKG < Kg.FromTUS(10))
20132013
{
20142014
const float reductionfactor = 0.2f;
2015-
SteamEngines[i].ExcessWheelBalanceLbs *= reductionfactor;
2015+
SteamEngines[i].ExcessRodBalanceLbs *= reductionfactor;
20162016
}
20172017
else if (MassKG < Kg.FromTUS(20))
20182018
{
20192019
const float reductionfactor = 0.3f;
2020-
SteamEngines[i].ExcessWheelBalanceLbs *= reductionfactor;
2020+
SteamEngines[i].ExcessRodBalanceLbs *= reductionfactor;
20212021
}
20222022
}
20232023

@@ -5980,7 +5980,7 @@ private void UpdateSteamTractiveForce(float elapsedClockSeconds, float locomotiv
59805980
float verticalThrustForcelbf = effectiveRotationalForcelbf * verticalThrustFactor;
59815981

59825982
// Calculate Excess Balance
5983-
float excessBalanceForcelbf = inertiaSpeedCorrectionFactor * SteamEngines[numberofengine].ExcessWheelBalanceLbs * sin;
5983+
float excessBalanceForcelbf = inertiaSpeedCorrectionFactor * SteamEngines[numberofengine].ExcessRodBalanceLbs * sin;
59845984

59855985
// Hammer (dynamic) force due to the rotation of the wheels is calculated
59865986
// From The Steam Locomotive by Ralph Johnson (pg 276 ) -
@@ -5990,11 +5990,14 @@ private void UpdateSteamTractiveForce(float elapsedClockSeconds, float locomotiv
59905990

59915991
if (SteamEngines[numberofengine].AuxiliarySteamEngineType != SteamEngine.AuxiliarySteamEngineTypes.Booster)
59925992
{
5993-
SteamEngines[numberofengine].HammerForceLbs = (1.6047f * Me.ToIn(SteamEngines[numberofengine].CylindersStrokeM) * SteamEngines[numberofengine].ExcessWheelBalanceLbs * (float)Math.Pow(MpS.ToMpH(absSpeedMpS), 2)) / ((float)Math.Pow(Me.ToIn(2.0f * SteamEngines[numberofengine].AttachedAxle.WheelRadiusM), 2) * SteamEngines[numberofengine].AttachedAxle.NumWheelsetAxles);
5993+
// calculate the balance force per wheel
5994+
var excessBalanceForceWheelLbs = SteamEngines[numberofengine].ExcessRodBalanceLbs / SteamEngines[numberofengine].AttachedAxle.NumWheelsetAxles;
59945995

59955996
// weight on each individual wheel, rather then each axle
59965997
var wheelWeight = SteamEngines[numberofengine].AttachedAxle.WheelWeightKg / (SteamEngines[numberofengine].AttachedAxle.NumWheelsetAxles * 2f);
59975998

5999+
SteamEngines[numberofengine].HammerForceLbs = (1.6047f * Me.ToIn(SteamEngines[numberofengine].CylindersStrokeM) * excessBalanceForceWheelLbs * (float)Math.Pow(MpS.ToMpH(absSpeedMpS), 2)) / ((float)Math.Pow(Me.ToIn(2.0f * SteamEngines[numberofengine].AttachedAxle.WheelRadiusM), 2) * SteamEngines[numberofengine].AttachedAxle.NumWheelsetAxles);
6000+
59986001
if (SteamEngines[numberofengine].HammerForceLbs > wheelWeight)
59996002
{
60006003
SteamEngines[numberofengine].IsWheelHammerForce = true;

Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/SteamEngine.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -367,9 +367,9 @@ public enum AuxiliarySteamEngineTypes
367367
public float MaxIndicatedHorsePowerHP;
368368

369369
/// <summary>
370-
/// Steam Engine unbalanced mass on wheels - per side.
370+
/// Steam Engine unbalanced mass on wheels - per side. Typically called Excess or overbalance of rods
371371
/// </summary>
372-
public float ExcessWheelBalanceLbs;
372+
public float ExcessRodBalanceLbs;
373373

374374
/// <summary>
375375
/// Steam Engine unbalanced wheel warning.
@@ -721,7 +721,7 @@ public virtual void Parse(STFReader stf)
721721
break;
722722
case "excesswheelbalance":
723723
var excess = stf.ReadFloatBlock(STFReader.UNITS.Mass, null);
724-
ExcessWheelBalanceLbs = Kg.ToLb(excess); // Convert input to lbs for use internally in this module
724+
ExcessRodBalanceLbs = Kg.ToLb(excess); // Convert input to lbs for use internally in this module
725725
break;
726726

727727
case "auxiliarysteamenginetype":
@@ -755,7 +755,7 @@ public void Copy(SteamEngine other)
755755
LPCylindersDiameterM = other.LPCylindersDiameterM;
756756
BoosterCutoff = other.BoosterCutoff;
757757
MaxIndicatedHorsePowerHP = other.MaxIndicatedHorsePowerHP;
758-
ExcessWheelBalanceLbs = other.ExcessWheelBalanceLbs;
758+
ExcessRodBalanceLbs = other.ExcessRodBalanceLbs;
759759
BoosterThrottleCutoff = other.BoosterThrottleCutoff;
760760
BoosterGearRatio = other.BoosterGearRatio;
761761
AttachedAxleId = other.AttachedAxleId;

0 commit comments

Comments
 (0)