Why Goods/pass Timing Scheme Matters (simulations And Nice Plots)

Discussion in 'TSW General Discussion' started by cwf.green, Jun 5, 2021.

Tags:
  1. cwf.green

    cwf.green Well-Known Member

    Joined:
    Mar 4, 2019
    Messages:
    832
    Likes Received:
    1,385
    Since DTG has already responded (on the forums) to my earlier feedback about the brake timing settings for German trains (and also fixed this for HBL, great job DTG! :D) this post is mostly academic, but I wanted to show the community why different settings have an impact on the dynamics of the trains.

    For German (and mainland European) freight trains there are 4 different (3 common) settings used. These are:

    P+P (loco in P, wagons in P): Used on freight trains weighing less than 800t,
    G+P (loco in G, wagons in P): Used on freight trains weighing 800t -1200t,
    "Langer lok" (loco + 5 first wagons in G, rest in P): Used on freight trains weighing 1200t - 4000t,
    G+G (all vehicles in G): Used on freight trains weighing in excess of 4000t.

    P-brake results in the brake cylinder filling within 3-5s and releasing in 10-20s (or 15-20s).
    G-brake results in the brake cylinder filling within 18-30s and releasing in 45-60s.

    The above selection rules can differ somewhat between countries. For example, afaik only Germany (and perhaps some neighboring countries) use the Langer lok setting. Some countries also have differing weights for the cutoff between P+P and G+P.

    I wanted to see what would happen if I simulated these different settings on a train. Since I don't have access to Simugraph I instead programmed a script in python that simulates the different settings effect on the center of mass of the train (CoM).

    Below is a plot of the deceleration (as a percentage of maximum) after a full service application has been initiated. I have used a propagation speed of 200 m/s and a train length of 420 m (~1 loco + 20 wagons). I have also used the mean application times (4s and 24s respectively).
    Brake_app_time.png
    As can be seen above, the difference between P+P and G+P is not large (since it only differs by the brake force of the locomotive) but the difference between either of these and G+G is significant with the former reaching 95% of maximum deceleration 20 seconds earlier.

    What this means for the driver/player is substantially longer stopping distances for G+G (which is the default setting for routes before HBL) and a much greater need for the driver/player to drive proactively. However, for situations when this is not required in reality, the added "difficulty" can become an annoyance since it is an artificial constraint.


    I couldn't stop myself so I programmed a simulation of the full braking regime for the different scenarios.

    What I did was to numerically integrate the force equations (mdv/dt = F) using a method called Euler-Cromer. The nice thing about this method is that it conserves energy (compared to Forward Euler) but at a slight cost in computation. It is completely unnecessary for TSW (lol) but this was the method I was most familiar with from molecular dynamics simulations. The timestep size was always 10 ms.

    Big thing: I added the coefficient of friction curves that I've mentioned in earlier threads so you will see in the plots below that the deceleration rate is never constant (velocity is never linearly decreasing).

    First I took a BR185 + 13 unit Laaers (26 wagons) train and compared deceleration and stopping distances for P+P (realistic) and G+G (unrealistic). 13_Laaers_Vt.png
    Since the deceleration is quite strong the difference is more subtle but there is still a 10 second gap.

    Below is the distance vs time graph:
    13_Laaers_St.png
    As you can see the difference in stopping distance is massive (nearly 300 meters!). An important thing is that I simulated the stopping distance from 100 km/h. At 120 km/h, which is allowed for empty Laaers wagons the stopping distance would've exceeded 1000m in G+G (assuming realistic brake force).

    I then did the same for a heavier BR185 + 15 Zacns train.
    15_Zacns_Vt.png
    Nothing very surprising about this graph. The stopping time is increased by about 10 seconds. Why not 24-4 = 20 seconds? Well the train doesn't go unbraked and then instantly apply the brakes after the full time but rather increases the deceleration rate progressively until the last wagon is fully braked.

    Now for the stopping distance:
    15_Zacns_St.png
    Here we can see that in the current/old setting of G+G (assuming realistic brake force) the train would exceed the pre-signal distance of 1000m by about 150m while the realistic setting of G+P achieves a safe stop.

    This is probably too nerdy for most people but if anyone has any questions I'm happy to answer them.
    NOTE: I referred to "G+G" as the default/TSW setting. This is not exactly correct as the loco is always in P (i.e P+G is the accurate setting), but since this is nearly identical to G+G (the loco has a vanishing effect) I decided to plot G+G settings instead.
     
    Last edited: Jun 5, 2021
    • Like Like x 9
    • Helpful Helpful x 2
  2. cwf.green

    cwf.green Well-Known Member

    Joined:
    Mar 4, 2019
    Messages:
    832
    Likes Received:
    1,385
    Update: I was a bit quick with uploading the plots before I had double checked everything.

    For the simulations above I used the Coefficient of friction curves I mentioned in this thread: https://forums.dovetailgames.com/th...accuracies-freight-edition.39907/#post-307184. The calculation at the end of that thread (deceleration = g*µ(v)*BRH/100) was based on calculating an average µ over the velocity interval chosen for the specific vehicle and then adding a "fudge factor" so that the stopping distance from the average µ agreed with the stopping distance calculated from the UIC formula. When this fudge factor was added the stopping distances nearly perfectly matched with the UIC formula for different speeds (which gives different average µ) and different BRH. This implies that the curve had the correct "form" but differed by a factor.

    However, when I integrated the train dynamics (to get stopping distances and speed vs time dependence) in python the stopping distances were incorrect. I'm not quite sure why this is but my guess is that the way I calculated the average before was too "coarse". I increased the curve by a factor of 1.23 and redid the calculations and got perfect agreement for different speeds and different BRH.

    Basically: the coefficient of friction curve (as a function of speed) seems to be what UIC based their formulas on (or a very similar curve) but it should be checked against the correct stopping distance (which is the most important thing) and may need to be scaled up or down by some factor.

    Here are the 2 stopping distance plots with the updated physics calculations:


    13_Laaers_St.png
    As you can see, the real stopping distances are slightly shorter.

    This becomes more apparent for the Zacns wagons:
    15_Zacns_St.png
    With the updated values they are actually able to stop within 1000m even in G+G. Although in reality, such a train would most likely be limited to 90 km/h.
     
    • Like Like x 1
  3. hyperlord

    hyperlord Well-Known Member

    Joined:
    May 20, 2019
    Messages:
    1,245
    Likes Received:
    1,270
    Nice plots!
     
    • Like Like x 1
  4. cwf.green

    cwf.green Well-Known Member

    Joined:
    Mar 4, 2019
    Messages:
    832
    Likes Received:
    1,385
    Thanks :D
     
  5. cwf.green

    cwf.green Well-Known Member

    Joined:
    Mar 4, 2019
    Messages:
    832
    Likes Received:
    1,385
    I thought I'd discuss my proposed changes to the tread brake friction curves. As mentioned in previous threads the curve I have is based on a nearly 100 year old test of German freight wagons (pre-WW2). There are newer curves that you can find on the internet and all these curves vary, but since the UIC concept of brake weights and the formulas were introduced around the same time as these tests were performed I thought the old German curve would most accurately comply with the UIC formulas.

    Below is a plot of the coefficient of friction (cof) between the brake block and the wheel tread as a function of speed.
    mu_vs_v.png
    I've reduced the resolution a bit on the curve (one value each 10 km/h) because the loss in accuracy is insignificant and maybe this will keep the performance good. As can be seen from the plot, the cof is nearly 3 times as high at v ~ 0 km/h compared to 100 km/h and nearly 3.5 times as high when compared against 160 km/h.

    Since the brake force of the train is proportional to this cof (as long as the brake force is lower than the adhesion limit between the rail and wheel) if the player makes a full service application and don't release the brakes in time the "bite" of the brakes can be really uncomfortable.

    To get some sense of the actual brake force (or rather the negative torque on the wheels) for the scenarios I mentioned above I've added two plots of the deceleration as a function of time during a full service application below.

    Decel_vs_time_Zacns.png
    The deceleration curve looks kind of strange. This is because I've included the application phase (I.e the time between the driver moving the airbrake lever to full service and when the brake cylinders have reached full service pressure). Note: (G+P) would be the realistic scenario, G+G is unrealistic for this type of train.

    The retardation rate right before the train has stopped is 1.6 m/s^2! This is more than most passenger wagons and if the rail adhesion is below 0.16 (which can happen during rain or snow) the brakes would lock up. Fortunately this would most likely only occur very close to the stop since if 0.10 is assumed as the minimum rail adhesion this is only exceeded below about 10 km/h.

    Decel_vs_time_Laaers.png

    The Laaers wagons have much higher brake force (100 BrH) compared to the Zacns (64 BrH) so in the (unrealistic) scenario of G+G the deceleration curve looks almost smooth since the train has already decelerated quite a bit when the brakes have finally applied fully.

    What is noticeable here is the very high deceleration close to the stop, nearly 2.4 m/s^2! This means that if the rail adhesion decreases below 0.24 the wheels will lock up. In really adverse conditions this could happen already at 50 km/h which could significantly increase the stopping distance or damage the wheels.

    Note: These are just the implications of the model I've proposed. Real drivers of freight trains would have to double check this.

    EDIT: How did I calculate the rail adhesion that would cause a wheel lockup?
    The wagons can only brake with a force that is equal to or less than the friction force of the wagon. This friction force is the product of the normal force (weight) N and the coefficient of friction between the wheel and the rail.

    F_fric = µ_rail * N = µ_rail * m * g, µ_rail is the cof between wheel and rail.

    Since the deceleration is a = F/m and

    a = µ_shoe * BrH * g / 100, µ_shoe = cof between brake shoe and wheel tread,

    we get the following equation

    µ_shoe * g * BrH /100 <= F_fric / m = µ_rail * g

    Hence: µ_shoe * (BrH/100) <= µ_rail. We can look up µ_shoe for each speed in the first plot.
     
    Last edited: Jun 8, 2021
    • Like Like x 2
    • Helpful Helpful x 1
  6. hyperlord

    hyperlord Well-Known Member

    Joined:
    May 20, 2019
    Messages:
    1,245
    Likes Received:
    1,270
    Oh man I learned a lot today!
     
    • Like Like x 1

Share This Page