Author Topic: air/rolling resistance fix  (Read 790 times)

0 Members and 1 Guest are viewing this topic.

Offline Vladki

air/rolling resistance fix
« on: March 26, 2017, 05:55:37 PM »
When digging into friction and related stuff http://forum.simutrans.com/index.php?topic=16815.0 I found some values that were way off from other vehicles. Complete patch is attached, comments below:

Code: [Select]
diff --git a/bus/hackney-carriage.dat b/bus/hackney-carriage.dat
index 1e9dcba..4557ebe 100644
--- a/bus/hackney-carriage.dat
+++ b/bus/hackney-carriage.dat
@@ -15,7 +15,7 @@ intro_year=1750
 intro_month=1
 retire_year=1913
 retire_month=4
-rolling_resistance=40
+rolling_resistance=140
 brake_force=0
 
 comfort=30
- hackney-carriage.dat has specified rolling_resistance=40, while other similar vehicles have 100-180. I think 140 would be more appropriate. Wikipedia says stage coach has 0.0385 to 0.073 on dirt road (with/without snow). So 140 might be ok for paved road. Perhaps an option to have additional rolling_resistance for different ways (dirt, gravel, cobblestone, concrete, asphalt; steel rail, welded steel rail, cast iron rail, plateway, ...) could be interesting.
Code: [Select]
diff --git a/config/simuconf.tab b/config/simuconf.tab
index aa3cbca..2d03391 100644
--- a/config/simuconf.tab
+++ b/config/simuconf.tab
@@ -1043,10 +1043,6 @@ citycar_life = 1375
 # Pak128.Britain default = 158 (yellow)
 cursor_overlay_color = 158
 
-# how height is a tile in z-direction (default 16, TTD 8)
-# THIS WILL BE ONLY USED, WHEN THIS FILE IS IN THE pakxyz/config!
-tile_height = 16
-
 ################################### River settings ##################################
 
 # rivers:
tile_height is defined twice in simuconf.dat. Once (on the top) is set to 8, next time to 16. The second definition should go away.
Code: [Select]
diff --git a/maglev/RMU9000.dat b/maglev/RMU9000.dat
index 679ccd6..51b0687 100644
--- a/maglev/RMU9000.dat
+++ b/maglev/RMU9000.dat
@@ -18,7 +18,7 @@ sound=-1
 
 can_lead_from_rear=0
 bidirectional=1
-air_resistance=1300
+air_resistance=162
 
 Constraint[Prev][0]=none
 Constraint[Next][0]=RMUflat(cooled)
All walues for maglevs are IMHO way too high, so I divided them by 8.
RMU9000 does not look to be streamlined, so it may be even omitted, default =145.
Code: [Select]
diff --git a/maglev/RMU_Aerocab.dat b/maglev/RMU_Aerocab.dat
index b2ffc18..fae823c 100644
--- a/maglev/RMU_Aerocab.dat
+++ b/maglev/RMU_Aerocab.dat
@@ -18,7 +18,7 @@ sound=-1
 
 can_lead_from_rear=1
 bidirectional=0
-air_resistance=825
+air_resistance=103
 
 Constraint[Prev][0]=RMU-aerocab(rear)
 Constraint[Prev][1]=none
@@ -53,7 +53,7 @@ sound=-1
 
 can_lead_from_rear=1
 bidirectional=0
-air_resistance=825
+air_resistance=103
 
 Constraint[Prev][0]=RMUbox(cooled)
 Constraint[Prev][1]=RMUbox(piece)
diff --git a/maglev/Ultra450.dat b/maglev/Ultra450.dat
index 00a554d..94710a2 100644
--- a/maglev/Ultra450.dat
+++ b/maglev/Ultra450.dat
@@ -24,7 +24,7 @@ bidirectional=0
 min_loading_time=25
 max_loading_time=160
 comfort=155
-air_resistance=882
+air_resistance=103
 
 Constraint[Prev][0]=BR-Ultra-450(rear)
 Constraint[Prev][1]=none
@@ -153,7 +153,7 @@ bidirectional=0
 min_loading_time=25
 max_loading_time=160
 comfort=155
-air_resistance=882
+air_resistance=103
 
 Constraint[Prev][0]=BR-Ultra-450(Open)
 Constraint[Prev][1]=BR-Ultra-450(Buffet)
diff --git a/maglev/Ultra520.dat b/maglev/Ultra520.dat
index 22bdf63..5b3da20 100644
--- a/maglev/Ultra520.dat
+++ b/maglev/Ultra520.dat
@@ -24,7 +24,7 @@ bidirectional=0
 min_loading_time=20
 max_loading_time=180
 comfort=149
-air_resistance=825
+air_resistance=103
 
 Constraint[Prev][0]=BR-Ultra-520(rear)
 Constraint[Prev][1]=none
@@ -153,7 +153,7 @@ bidirectional=0
 min_loading_time=20
 max_loading_time=180
 comfort=149
-air_resistance=825
+air_resistance=103
 
 Constraint[Prev][0]=BR-Ultra-520(Open)
 Constraint[Prev][1]=BR-Ultra-520(Buffet)
diff --git a/maglev/Ultra520DD.dat b/maglev/Ultra520DD.dat
index 8f014bc..2c37f9f 100644
--- a/maglev/Ultra520DD.dat
+++ b/maglev/Ultra520DD.dat
@@ -25,7 +25,7 @@ bidirectional=0
 min_loading_time=35
 max_loading_time=240
 comfort=128
-air_resistance=882
+air_resistance=110
 
 Constraint[Prev][0]=BR-Ultra-520DD(rear)
 Constraint[Prev][1]=none
@@ -154,7 +154,7 @@ bidirectional=0
 min_loading_time=35
 max_loading_time=240
 comfort=128
-air_resistance=882
+air_resistance=110
 
 Constraint[Prev][0]=BR-Ultra-520DD(Open)
 Constraint[Prev][1]=BR-Ultra-520DD(Buffet)
diff --git a/maglev/UltraMail.dat b/maglev/UltraMail.dat
index af103ef..a9391fe 100644
--- a/maglev/UltraMail.dat
+++ b/maglev/UltraMail.dat
@@ -23,7 +23,7 @@ bidirectional=0
 min_loading_time=45
 max_loading_time=240
 
-air_resistance=882
+air_resistance=103
 
 Constraint[Prev][0]=BR-Ultra-Mail(rear)
 Constraint[Prev][1]=none
@@ -103,7 +103,7 @@ bidirectional=0
 min_loading_time=45
 max_loading_time=240
 
-air_resistance=882
+air_resistance=103
 
 Constraint[Prev][0]=BR-Ultra-Mail(Open)
 Constraint[Next][0]=BR-Ultra-Mail(front)
All the remaining maglevs, are streamlined, and look similar to each other, so I unified their air resistance to 103. Ounly the double decker unit has higher = 110.
Code: [Select]
diff --git a/trains/ner-es1.dat b/trains/ner-es1.dat
index 8183ee8..16f44ed 100644
--- a/trains/ner-es1.dat
+++ b/trains/ner-es1.dat
@@ -24,7 +24,7 @@ sound=-1
 can_lead_from_rear=0
 bidirectional=1
 way_constraint_permissive[1]=1
-air_resistance=1000
+air_resistance=125
 
 # No multiple working
 Constraint[Prev][0]=none

This electric engine does not look very streamlined, so a default value for trains (160) may be good too.

Offline jamespetts

  • Simitrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 16075
  • Total likes: 438
  • Helpful: 177
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: air/rolling resistance fix
« Reply #1 on: March 26, 2017, 08:51:15 PM »
Thank you very much for that: I have now incorporated all of these apart from that of the Hackney carriage, which I think that I may well have balanced especially to be able to be hauled by a single pony, although I must confess that I cannot immediately recall. It is significant, however, that the Hackney carriage has only two wheels, which would reduce the rolling resistance somewhat.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Offline Vladki

Re: air/rolling resistance fix
« Reply #2 on: March 26, 2017, 10:15:29 PM »
It is significant, however, that the Hackney carriage has only two wheels, which would reduce the rolling resistance somewhat.

I do not think so. The values used (and found on wikipedia, or elsewhere), are for one wheel of certain type on certain surface. It does not matter how many wheels the vehicle has. The weight is split among them, so the more wheels you have the less drag you get on one wheel, but then you add them together and get back the same number.

Offline jamespetts

  • Simitrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 16075
  • Total likes: 438
  • Helpful: 177
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: air/rolling resistance fix
« Reply #3 on: March 26, 2017, 10:44:18 PM »
Have you tested the Hackney carriage with the single pony?
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Offline Vladki

Re: air/rolling resistance fix
« Reply #4 on: March 27, 2017, 07:02:10 AM »
No, I didn't. But there are a lot more underpowered vehicles. Even big trucks.




Offline jamespetts

  • Simitrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 16075
  • Total likes: 438
  • Helpful: 177
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: air/rolling resistance fix
« Reply #5 on: March 27, 2017, 11:16:08 AM »
The difference is that the Hackney carriage is part of a set of vehicles which I spent a long time calibrating in great detail in December of last year, whereas the motorised goods vehicles I have not yet recalibrated or tested (they are in their original state from when they were first created back in 2009, before the new Simutrans-Extended physics engine from circa 2011).

If you can assist with the testing/calibration of the motorised road goods vehicles, that would be most helpful.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Offline Vladki

Re: air/rolling resistance fix
« Reply #6 on: March 27, 2017, 05:49:31 PM »
Ok, could you tell me which vehicles are already calibrated?

I seems that the air_resistance fix for maglev/UltraMail.dat has been lost somewhere. It should have air_resistance=103 just as the other streamlined maglevs.

« Last Edit: March 27, 2017, 07:23:09 PM by Vladki »

Offline jamespetts

  • Simitrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 16075
  • Total likes: 438
  • Helpful: 177
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: air/rolling resistance fix
« Reply #7 on: March 27, 2017, 08:10:29 PM »
Thank you - I have now fixed the UltraMail.

As to which road vehicles are calibrated: the 'buses (especially the Routemaster, the Leyland Atlantean and Dennis Enviro400, the others being extrapolated from those calibrations) have had their acceleration calibrated, likewise the trolleybuses (extrapolated from the MCW Q1) and the horse drawn vehicles (including the horses). I think that I have also calibrated the trams and probably the steam powered lorries, too, although I do not think that the latter has been as thorough as with the other vehicles. I have not worked at all yet on internal combustion engine powered goods road vehicles.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Offline Vladki

Re: air/rolling resistance fix
« Reply #8 on: March 27, 2017, 08:21:34 PM »
And could you tell me more in detail how did you do the calibration? It may help me understand if there is a bug in the code or, that just the tractive force / friction / whatever in dat file/  is way off

Offline jamespetts

  • Simitrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 16075
  • Total likes: 438
  • Helpful: 177
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: air/rolling resistance fix
« Reply #9 on: March 27, 2017, 08:32:09 PM »
I cannot remember precisely what I did now, but the calibration that I did for the horse drawn vehicles entailed repeatedly modifying various parameters (the power, top speed and tractive effort of individual horses mostly, if I recall correctly) until each combination of horses could haul a realistic load at a realistic speed for that particular combination of horses, and each distinct type of horse had its own (realistic) relative merits compared with the others (e.g. a Yorkshire coach horse was faster but a little less sturdy than a Cleveland bay; coaching horses generally are faster but can haul less than draught horses, etc.).

The 'buses and trolleybuses involved calibrating only the acceleration: the power is a known amount for most 'buses and trolleybuses, so only the tractive effort has to be calibrated in this way, and is done by measuring acceleration to a certain speed and adjusting it until it matches known values (or estimates extrapolated from known values where these are unavailable).
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.