Steam Locomotive Additional Features
#71
Posted 08 July 2023 - 12:39 PM
#72
Posted 08 July 2023 - 12:49 PM
#73
Posted 08 July 2023 - 06:15 PM
Attached File(s)
-
ORTSarticparams.pdf (532.19K)
Number of downloads: 144
#74
Posted 08 July 2023 - 06:51 PM
I have to read it.
Like Your approach.
#75
Posted 08 July 2023 - 10:05 PM
Traindude, on 07 July 2023 - 11:48 PM, said:
Traindude, on 07 July 2023 - 11:48 PM, said:
This is related to the changes to code to get multiple engines working. I had a patch to fix the superheat bug, but that has now been upset by the PR clash.
I will need to play with it.
#76
Posted 08 July 2023 - 10:32 PM
cesarbl, on 08 July 2023 - 05:37 AM, said:
Either way, rather then using a % value, I would prefer to see a more prototypical figure that relates to a design specification, etc.
#77
Posted 08 July 2023 - 11:40 PM
The original thought of braked or not braked was simply about animation, should the wheels rotate freely at all times or be locked if the loco starts to skid.
#78
Posted 09 July 2023 - 12:17 AM
Quote
Either way, rather then using a % value, I would prefer to see a more prototypical figure that relates to a design specification, etc.
With more powerful I mean that they are proportional to the wheel weight. My proposal was that, for each axle, total brake force is distributed according to a %. For example, if you have a 4-axle locomotive with MaxBrakeForce=200kN and each axle contributes with a 25%, then MaxBrakeRetardForce=50kN for each axle.
An alternative would be to have different several MaxBrakeShoeForce, CoF and WSP devices for each axle. This is a more complete approach but it requires quite much more code. The % solution is much more simpler, so maybe we can use it for now and then implement the advanced configuration in the future.
Quote
Yes, it's the distribution of total brake force, and must add up to 100%.
Quote
Whether a wheel skids or not depends on the brake force applied to that axle, so physics have to be changed too.
Here's a suggested patch. As you can see, it is really simple, only 10 lines:
diff --git a/Source/Orts.Simulation/Simulation/RollingStocks/MSTSLocomotive.cs b/Source/Orts.Simulation/Simulation/RollingStocks/MSTSLocomotive.cs index acf5c2d56..ff5509750 100644 --- a/Source/Orts.Simulation/Simulation/RollingStocks/MSTSLocomotive.cs +++ b/Source/Orts.Simulation/Simulation/RollingStocks/MSTSLocomotive.cs @@ -2787,7 +2787,7 @@ public virtual void AdvancedAdhesion(float elapsedClockSeconds) foreach (var axle in LocomotiveAxles) { - axle.BrakeRetardForceN = BrakeRetardForceN/LocomotiveAxles.Count; + axle.BrakeRetardForceN = BrakeRetardForceN * axle.BrakeFraction; axle.TrainSpeedMpS = SpeedMpS; //Set the train speed of the axle mod axle.WheelRadiusM = DriverWheelRadiusM; } diff --git a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerTransmissions/Axle.cs b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerTransmissions/Axle.cs index 93d62af32..78a614e1b 100644 --- a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerTransmissions/Axle.cs +++ b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerTransmissions/Axle.cs @@ -233,6 +233,7 @@ public void Initialize() if (axle.DampingNs <= 0) axle.DampingNs = locomotive.MassKG / 1000.0f / AxleList.Count; if (axle.FrictionN <= 0) axle.FrictionN = locomotive.MassKG / 1000.0f / AxleList.Count; if (axle.NumberWheelAxles <= 0) axle.NumberWheelAxles = 1; + if (axle.BrakeFraction < 0) axle.BrakeFraction = 1.0f / AxleList.Count; } axle.Initialize(); } @@ -477,6 +478,10 @@ public float TransmissionEfficiency /// Wheel number /// </summary> public int NumberWheelAxles; + /// <summary> + /// Fraction of total brake force applied + /// </summary> + public float BrakeFraction = -1; /// <summary> /// Static adhesion coefficient, as given by Curtius-Kniffler formula @@ -672,6 +677,9 @@ public void Parse(STFReader stf) case "numberwheelaxles": NumberWheelAxles = stf.ReadIntBlock(null); break; + case "brakefraction": + BrakeFraction = stf.ReadFloatBlock(STFReader.UNITS.None, null); + break; case "(": stf.SkipRestOfBlock(); break; @@ -685,6 +693,7 @@ public void Copy(Axle other) WheelWeightKg = other.WheelWeightKg; AxleWeightN = other.AxleWeightN; NumberWheelAxles = other.NumberWheelAxles; + BrakeFraction = other.BrakeFraction; } /// <summary>
#79
Posted 09 July 2023 - 02:08 AM
cesarbl, on 09 July 2023 - 12:17 AM, said:
If the % implementation and the advanced implementation need different inputs, then I disagree with "using it for now", as we would be creating a "legacy" feature that needs to be managed into the future. Ideally we should only implement the "final" solution.
#80
Posted 09 July 2023 - 02:15 AM