Skip to content

Commit ef944ab

Browse files
committed
Further tweaks to polach adhesion
1 parent 9407233 commit ef944ab

File tree

1 file changed

+33
-16
lines changed
  • Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerTransmissions

1 file changed

+33
-16
lines changed

Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerTransmissions/Axle.cs

Lines changed: 33 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -587,17 +587,24 @@ public void ComputeWheelSlipThresholdMpS()
587587
double fa = SlipCharacteristics(a + dx) - SlipCharacteristics(a);
588588
double fb = SlipCharacteristics(b + dx) - SlipCharacteristics(b);
589589

590+
double p = 0.025f;
590591
double s = 0.05f;
591592
double t = 0.1f;
593+
double q = 0.15f;
594+
double r = 0.2f;
592595
double u = 0.25f;
593596
double v = 0.5f;
594597
double x = 0.75f;
595598
double y = 1.0f;
596599

597600
double fa1 = SlipCharacteristics(a);
598601
double fb1 = SlipCharacteristics(b);
602+
603+
double fp = SlipCharacteristics(p);
599604
double fs = SlipCharacteristics(s);
600605
double ft = SlipCharacteristics(t);
606+
double fq = SlipCharacteristics(q);
607+
double fr = SlipCharacteristics(r);
601608
double fu = SlipCharacteristics(u);
602609
double fv = SlipCharacteristics(v);
603610
double fx = SlipCharacteristics(x);
@@ -617,10 +624,10 @@ public void ComputeWheelSlipThresholdMpS()
617624
if (fa * fb > 0)
618625
{
619626
// If sign does not change, bisection fails
620-
WheelSlipThresholdMpS = MpS.FromKpH(0.05f);
627+
WheelSlipThresholdMpS = MpS.FromKpH(0.1f);
621628
return;
622629
}
623-
while (Math.Abs(b - a) > MpS.FromKpH(0.05f))
630+
while (Math.Abs(b - a) > MpS.FromKpH(0.1f))
624631
{
625632
double c = (a + b) / 2;
626633
double fc = SlipCharacteristics(c + dx) - SlipCharacteristics(c);
@@ -635,10 +642,10 @@ public void ComputeWheelSlipThresholdMpS()
635642
fb = fc;
636643
}
637644
}
638-
WheelSlipThresholdMpS = (float)Math.Max((a + b) / 2, MpS.FromKpH(0.05f));
645+
WheelSlipThresholdMpS = (float)Math.Max((a + b) / 2, MpS.FromKpH(0.1f));
639646

640-
// if (SlipSpeedMpS > 0)
641-
// Trace.TraceInformation("Fx Values - a {0} fa1 {1} b {2} fb1 {3} s {4} fs {5} t {6} ft {7} u {8} fu {9} v {10} fv {11} x {12} fx {13} y {14} fy {15} Speed {16} Threshold {17} Fslip {18} SlipSpeed {19}", a, fa1, b, fb1, s, fs, t, ft, u, fu, v, fv, x, fx, y, fy, TrainSpeedMpS, WheelSlipThresholdMpS, fslip, SlipSpeedMpS);
647+
// if (SlipSpeedMpS > 0)
648+
// Trace.TraceInformation("Fx Values - a {0} fa1 {1} b {2} fb1 {3} s {4} fs {5} t {6} ft {7} u {8} fu {9} v {10} fv {11} x {12} fx {13} y {14} fy {15} Speed {16} Threshold {17} Fslip {18} SlipSpeed {19}", a, fa1, b, fb1, s, fs, t, ft, u, fu, v, fv, x, fx, y, fy, TrainSpeedMpS, WheelSlipThresholdMpS, fslip, SlipSpeedMpS);
642649

643650
}
644651

@@ -659,7 +666,7 @@ public float SlipSpeedMpS
659666
{
660667
get
661668
{
662-
return (float)(AxleSpeedMpS - TrainSpeedMpS);
669+
return Math.Abs((float)(AxleSpeedMpS - TrainSpeedMpS));
663670
}
664671
}
665672

@@ -976,7 +983,7 @@ public virtual void Update(float timeSpan)
976983
if (Math.Abs(SlipSpeedMpS) > WheelSlipThresholdMpS)
977984
{
978985
// Wait some time before indicating wheelslip to avoid false triggers
979-
if (WheelSlipTimeS > 0.1f)
986+
if (WheelSlipTimeS > 0.75f)
980987
{
981988
IsWheelSlip = IsWheelSlipWarning = true;
982989
}
@@ -985,7 +992,7 @@ public virtual void Update(float timeSpan)
985992
else if (Math.Abs(SlipSpeedPercent) > SlipWarningTresholdPercent)
986993
{
987994
// Wait some time before indicating wheelslip to avoid false triggers
988-
if (WheelSlipWarningTimeS > 0.1f) IsWheelSlipWarning = true;
995+
if (WheelSlipWarningTimeS > 0.75f) IsWheelSlipWarning = true;
989996
IsWheelSlip = false;
990997
WheelSlipWarningTimeS += timeSpan;
991998
}
@@ -1048,6 +1055,7 @@ public void Update()
10481055
// Calculate Hertzian values - assume 2b = 12mm.
10491056
var b_HertzianMM = 6.0;
10501057
a_HertzianMM = (3.04f / 2) * Math.Sqrt(((wheelLoadkN * wheelRadiusMM * 1000) / (2 * b_HertzianMM * Young_ModulusMPa)));
1058+
var a_HertzianM = a_HertzianMM / 1000;
10511059

10521060
var hertzianMM = a_HertzianMM / b_HertzianMM;
10531061
var hertzianMM2 = hertzianMM * hertzianMM;
@@ -1059,27 +1067,30 @@ public void Update()
10591067

10601068
// Calculate slip and creep values
10611069
var wheelProfileConicityRad = 0.5f;
1062-
var wheelContactAngleRad = MathHelper.ToRadians(60);
1070+
var wheelContactAngleRad = MathHelper.ToRadians(3); // Assume that on straight track wheel runs on the tread which has a 1 in 20 slope = 3 deg
1071+
// At a later date this could be changed when in a curve to run on the flange at a steeper angle.
10631072
var wheelCentreDeviationMM = 3.0f;
1073+
1074+
spinM1 = Math.Sin(wheelContactAngleRad) / Axle.WheelRadiusM; // set spin assuming wheel running on tread
1075+
10641076
double YawAngleRad = 0;
10651077
if (Axle.CurrentCurveRadiusM > 0)
10661078
{
10671079
YawAngleRad = Math.Asin(2.0f * Axle.BogieRigidWheelBaseM / Axle.CurrentCurveRadiusM);
1080+
spinM1 = Math.Sin(Axle.WheelFlangeAngleRad) / Axle.WheelRadiusM; // Overwrite spin if locomotive is on a curve. Assume wheel running on flange
10681081
}
10691082

1083+
if (float.IsNaN((float)spinM1)) spinM1 = 0;//avoid NaN when first starting OR
1084+
10701085
var supplenessFactor = (wheelDistanceGaugeMM * wheelRadiusMM) / (wheelProfileConicityRad * wheelCentreDeviationMM);
10711086
var lateralSlipVelocityMpS = Math.Abs(((-1 * Axle.CurrentCurveRadiusM * YawAngleRad) / supplenessFactor) * trainSpeedMpS);
10721087
Sy = lateralSlipVelocityMpS / trainSpeedMpS;
10731088
if (float.IsNaN((float)Sy)) Sy = 0;//avoid NaN when first starting OR
10741089
Sy2 = Sy * Sy;
10751090

1076-
spinM1 = Math.Sin(Axle.WheelFlangeAngleRad) / wheelRadiusMM;
1077-
10781091
// Trace.TraceInformation("Spin - {0} FlangeAngle {1} wheelRadius {2} Speed {3}", spinM1, Axle.WheelFlangeAngleRad, wheelRadiusMM, trainSpeedMpS);
10791092

1080-
if (float.IsNaN((float)spinM1)) spinM1 = 0;//avoid NaN when first starting OR
1081-
1082-
Syc = Sy + (spinM1 * a_HertzianMM);
1093+
Syc = Sy + (spinM1 * a_HertzianM);
10831094
Syc2 = Syc * Syc;
10841095

10851096
// Trace.TraceInformation("Sy - {0} Syc {1} Spin {2} a_hertz {3}", Sy, Syc, spinM1, a_HertzianMM);
@@ -1100,6 +1111,8 @@ public double SlipCharacteristics(double slipSpeedMpS)
11001111
{
11011112
var polach_uadhesion = zeroSpeedAdhesion * (((1 - polach_A) * Math.Exp(-polach_B * slipSpeedMpS)) + polach_A);
11021113

1114+
// Trace.TraceInformation("Polach Adhesion - {0} ZeroAdhesion {1} RawPolach {2} SlipSpeed {3}", polach_uadhesion, zeroSpeedAdhesion, (((1 - polach_A) * Math.Exp(-polach_B * slipSpeedMpS)) + polach_A), slipSpeedMpS);
1115+
11031116
if (trainSpeedMpS < 0.05f)
11041117
return polach_uadhesion;
11051118

@@ -1127,16 +1140,20 @@ public double SlipCharacteristics(double slipSpeedMpS)
11271140

11281141
var fx = (f * Sx / Sc) / wheelLoadN;
11291142

1130-
// if (fx < 0)
1143+
/*
1144+
// if (slipSpeedMpS == 0.025f || slipSpeedMpS == 0.05f || slipSpeedMpS == 0.1f || slipSpeedMpS == 0.15f || slipSpeedMpS == 0.2f)
1145+
if (Axle.IsWheelSlip)
11311146
{
1132-
// Trace.TraceInformation("Negative Fx - Fx {0} Speed {1} SlipSpeed {2} Sx {3} PolachAdhesion {4} adhesionComponent {5} slipComponent {6} Polach_Ks {7} Stiffness2 {8} SlipForce {9} Sc {10} WheelLoad {11} Syc {12} Hertz_a {13}", fx, (float)trainSpeedMpS, (float)slipSpeedMpS, (float)Sx, polach_uadhesion, adhesionComponent, slipComponent, polach_Ks, Stiffness2, f, Sc, wheelLoadN, Syc, a_HertzianMM);
1147+
Trace.TraceInformation("Negative Fx - Fx {0} Speed {1} SlipSpeed {2} Sx {3} PolachAdhesion {4} adhesionComponent {5} slipComponent {6} Polach_Ks {7} Stiffness2 {8} SlipForce {9} Sc {10} WheelLoad {11} Syc {12} Hertz_a {13} Sy {14} Threshold {15}", fx, (float)trainSpeedMpS, (float)slipSpeedMpS, (float)Sx, polach_uadhesion, adhesionComponent, slipComponent, polach_Ks, Stiffness2, f, Sc, wheelLoadN, Syc, a_HertzianMM, Sy, Axle.WheelSlipThresholdMpS);
11331148
11341149
}
1150+
*/
11351151

11361152
return fx;
11371153
}
11381154
}
11391155

1156+
11401157
/// <summary>
11411158
/// Uses the Polach creep force curves calculation described in the following document
11421159
/// "Creep forces in simulations of traction vehicles running on adhesion limit" by O. Polach 2005 Wear - http://www.sze.hu/~szenasy/VILLVONT/polachslipvizsg.pdf

0 commit comments

Comments
 (0)