The International Simutrans Forum

 

Author Topic: I'm back with some minor pak updates  (Read 5026 times)

0 Members and 1 Guest are viewing this topic.

Offline neroden

  • Devotees (Inactive)
  • *
  • Posts: 831
  • Nathanael Nerode
I'm back with some minor pak updates
« on: January 07, 2011, 09:57:05 PM »
I merged the current version of standard with experimental (annoyingly finicky, but not really any significant changes), then I removed a bunch of leftover uses of "gear" (we're not supposed to have "gear" in experimental, IIRC), and adjusted power to make the gearless ships and buses work.  It's a bit blunt-instrument, but it works.  James, you can pull from ncn-devel.

By the way, things are looking pretty nice; the game is completely playable in 1830, although it's impossible to make a profit hauling coal by rail :-(.

Offline neroden

  • Devotees (Inactive)
  • *
  • Posts: 831
  • Nathanael Nerode
Re: I'm back with some minor pak updates
« Reply #1 on: January 08, 2011, 12:06:31 AM »
I'm thinking what we really want is to have proper tractive effort and "air resistance" entries for buses -- and *especially* for boats -- not just for trains.  I'm not sure where to start with that, though.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18745
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: I'm back with some minor pak updates
« Reply #2 on: January 08, 2011, 03:03:41 PM »
Nathaneal,

welcome back! Thank you for your work on the updates, which I have now merged and pushed. As for the coal haulage, we shall have to deal with that in the general price balancing exercise.

In respect of the tractive effort and air resistance for 'buses and boats; that's an interesting one. I don't know a great deal about boat physics except that they're much more complicated than land vehicle physics. I think that the running resistance (not the air resistance, which is different) is set higher in the physics model for boats (and differentially for road and rail vehicles), so this is taken into account already to some extent. As to tractive effort for 'buses, this depends on finding real world data. For some odd reason, for road vehicles, it tends to be called "torque", which should be some clue in tracking down information.

If anyone has any ideas as to where to find torque information for commercial road vehicles, I'd be very grateful!

Offline inkelyad

  • Devotees (Inactive)
  • *
  • Posts: 482
  • Languages: EN, RU
Re: I'm back with some minor pak updates
« Reply #3 on: January 08, 2011, 03:30:46 PM »
Simutrans physics more or less wrong for boats. When I put real-life data for handysize(10000t, 4100kW) tanker in it (page 10 here). It can barely move.

I was forced to put
Code: [Select]
#define FR_WATER 0.00126
in convoy.h

About finding air resistance.
1) Build testing map with one long straight schedule coal mine->power station.
2) put actual power, payload, weight in and speed=500 in dat file
3) tweak air_resistance using test map until actual max speed will be more or less max speed you need
4) put actual max speed value in dat file.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18745
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: I'm back with some minor pak updates
« Reply #4 on: January 08, 2011, 03:48:24 PM »
The air resistance parameter was designed to be used only for streamlined vehicles - is there a particular reason to use air resistance to balance everything? One of the difficulties with physics is that there is almost no published information about the power of steam railway locomotives (or of the tractive effort of many other things). That will have to be deduced by looking at real life performance information and trying to match it, then extrapolating and interpolating from that.

Offline inkelyad

  • Devotees (Inactive)
  • *
  • Posts: 482
  • Languages: EN, RU
Re: I'm back with some minor pak updates
« Reply #5 on: January 08, 2011, 04:00:11 PM »
One of the difficulties with physics is that there is almost no published information about the power of steam railway locomotives (or of the tractive effort of many other things).
It looks like nobody  bother/know how to measure it.

Offline ӔO

  • Devotees (Inactive)
  • *
  • Posts: 2345
  • Hopefully helpful
  • Languages: en, jp
Re: I'm back with some minor pak updates
« Reply #6 on: January 09, 2011, 03:35:16 AM »
It seems like tractive effort was used in favour of power for measuring power.
http://en.wikipedia.org/wiki/Steam_locomotive#Measurement

There are many problems with measuring power in steam locomotives, in that it effectively only has one gear, but must require lots of power/traction on a standing start, yet have a high enough gear to reach a decent speed.

Another is the rate at which the stoker feeds coal into the boiler.

And I don't remember where, but I recall reading that for a short time, a large boost in power can be achieved by expending built up steam to go faster or get up a steep hill, but this will cripple the locomotive until steam power can be built up again.

Pretty similar in how humans have to catch their breath after full out sprinting 100m, but can jog for miles.

Combustion engines also have a similar problem, although you're looking at a complete break down or over heating if the engine is run to its peak power. More so for smaller engines producing large power compared to large engines producing the same power.

The truck and bus power information can be even tricker, because they can come with various engines sizes which all produce differing amounts of power. Each engines also might have their own particular quirks and reliability issues.
« Last Edit: January 09, 2011, 03:52:15 AM by AEO »

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18745
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: I'm back with some minor pak updates
« Reply #7 on: January 11, 2011, 12:55:21 AM »
It seems like tractive effort was used in favour of power for measuring power.
http://en.wikipedia.org/wiki/Steam_locomotive#Measurement

There are many problems with measuring power in steam locomotives, in that it effectively only has one gear, but must require lots of power/traction on a standing start, yet have a high enough gear to reach a decent speed.

Tractive effort measures force, not power: they are different concepts. All locomotives will have a tractive effort and a power rating, although for steam locomotives, the power varied with the speed and was hard to measure, so the tractive effort was used as a measure exclusively. I am trying to balance steam locomotives' power ratings by attempting to replicate real life recorded speed/load combinations.

Quote
The truck and bus power information can be even tricker, because they can come with various engines sizes which all produce differing amounts of power. Each engines also might have their own particular quirks and reliability issues.

I suppose that we deal with that simply by postulating one specific engine and dealing with the characteristics of that specific engine.

Offline neroden

  • Devotees (Inactive)
  • *
  • Posts: 831
  • Nathanael Nerode
Re: I'm back with some minor pak updates
« Reply #8 on: January 11, 2011, 04:48:59 AM »
Simutrans physics more or less wrong for boats. When I put real-life data for handysize(10000t, 4100kW) tanker in it (page 10 here). It can barely move.

I was forced to put
Code: [Select]
#define FR_WATER 0.00126
in convoy.h
Perhaps we can get Bernd to write new physics code just for ships.  :-)  But in the meantime...

I actually think you have the right idea.  Let's try this:
(1) Set rolling resistance to zero for ships.  This is basically correct because ships float; the portion of resistance due to horizontal friction proportional to mass is not significant.  Is there some reason not to do this?  This is actually the reason ships can move such huge weights with small engines, it's because they float.
(2) Figure out what to set water resistance to -- obviously a high number, much higher than air resistance on land.  Both the density and the Reynolds number are different than for air resistance.  Perhaps Bernd can figure this number correctly.  Perhaps he already has, but I don't think so....
(3) Set slope force/resistance high to attempt to loosely model the current, pick something to reflect a "reasonable" current.

Anyone willing to try a patch to set rolling resistance to zero, or perhaps .001, for ships?  The resistance to ships' motion includes more than plain water resistance (wave resistance for instance), but nothing resembling rolling resistance.  Done on my jp-devel branch.  Would inkelyad or someone like to try putting in realistic numbers for ship power and weight and see how it looks?

Offline neroden

  • Devotees (Inactive)
  • *
  • Posts: 831
  • Nathanael Nerode
Re: I'm back with some minor pak updates
« Reply #9 on: January 11, 2011, 04:53:03 AM »
If anyone has any ideas as to where to find torque information for commercial road vehicles, I'd be very grateful!
Hmm.  I'm not finding much.  It seems that modern vehicles usually *do* have torque information in their specs, so perhaps you could start there and work *back* with estimates.  A lot of engines seem to come in "low torque" and "high torque" variants, which may actually be the difference between the "city" and "long distance" models of a bunch of the buses (eh? eh?).

Offline inkelyad

  • Devotees (Inactive)
  • *
  • Posts: 482
  • Languages: EN, RU
Re: I'm back with some minor pak updates
« Reply #10 on: January 11, 2011, 05:11:26 AM »
the portion of resistance due to horizontal friction proportional to mass is not significant.
More mass => more draft => more drag.
But it is not roll resistance. It is multiplier to cw/2 * A * rho * v^2 part.

Offline sdog

  • Devotee
  • *
  • Posts: 2039
Re: I'm back with some minor pak updates
« Reply #11 on: January 11, 2011, 05:21:28 AM »
Did buses and lorries keep their wheel diameters roughly constant? Or differntly asked, how do you get from torque to force? And james, please don't get angry on me, here axle load comes to play again, to determine the maximum applicable force. Could you please point me to where Bernd Gabriels physics model is implemented?
Shouldn't it be sufficient to use power only for non-rail vehicles? E.g. use tractive effort only as relevant if it is low, for practically all modern road vehicles the torque should be high enough to be limited by slip. When gears were bad, road wheels were bad too. (but this doesn't help us at all here)


rail, road, ship, planes!
for each a different thing is important. We should restrict the bloody sim to ox-carts and barges, in the 18th century.

Offline ӔO

  • Devotees (Inactive)
  • *
  • Posts: 2345
  • Hopefully helpful
  • Languages: en, jp
Re: I'm back with some minor pak updates
« Reply #12 on: January 11, 2011, 05:51:27 AM »
@james
specific engine specs might be possible to look up if you get the specific name of the engine the vehicle is equipped with.

somewhat like this. AEC reliance had a multitude of engines, and the AH590 data was here.
http://middx.net/aec/bb/viewtopic.php?f=17&t=233

@neroden
converting torque to tractive force is puzzling, IMO. Basically, the tire on a truck is never expected to slip while doing a standing start, at least on dry pavement, so the torque value is more of an indication of its towing ability.

@sdog
wheels and tires come in all sorts of sizes for trucks and buses, same as cars, unfortunately.
axle load isn't as necessary as locomotives as it is on trucks. There's only one axle doing all the work, while all the rest are load bearing, or at least, I've never seen a production truck that has more than one driving axle. The only time you'll see wheel slip on trucks is when they're on mud, sand or snow.


I'm not sure if the physics model does it, but engine torque and power curves don't work in a linear fashion. For nonperformance cars and vans, the engines and gears are usually set so that they give higher torque at low rpm and higher power at mid range rpm. This gives low engine noise when cruising along the highway in the highest gear, as the engine will be at mid rpm.

For full sized trucks with large displacement engines, which can have anywhere from 8 to 16 gears, the usable power band is very narrow and gives high torque and power inside the optimum range. Even with the high power, high torque engine with lots of gears to select from, the trucks still struggle to get up mountains on extended climbs. On the heavily loaded trucks, it'll be good if they can make 60km/h up a 5% gradient.
« Last Edit: January 11, 2011, 06:30:25 AM by AEO »

Offline neroden

  • Devotees (Inactive)
  • *
  • Posts: 831
  • Nathanael Nerode
Re: I'm back with some minor pak updates
« Reply #13 on: January 12, 2011, 07:10:09 AM »
Did buses and lorries keep their wheel diameters roughly constant? Or differntly asked, how do you get from torque to force? And james, please don't get angry on me, here axle load comes to play again, to determine the maximum applicable force. Could you please point me to where Bernd Gabriels physics model is implemented?
convoy.cc and convoy.h, mostly

Offline neroden

  • Devotees (Inactive)
  • *
  • Posts: 831
  • Nathanael Nerode
Re: I'm back with some minor pak updates
« Reply #14 on: January 12, 2011, 07:17:14 AM »
(but this doesn't help us at all here)
OK, let's get away from physics and back to game simulation.  In *business* terms, we basically want vehicles to vary in two ways:
(1) Maximum speed possible with a given load (on a flat surface)
(2) Maximum acceleration possible with that load (on a flat surface)
(3) with some added complications because both must vary with "up and down".

Physics means that the acceleration depends on the speed, and that *both* depend on the load, in confusing non-linear ways.  But basically from a business perspective, coasting speed, acceleration, and behavior on hills are all that matters.  What is the minimum number of physics parameters to get the appropriate variation in these three features, and *how do we adjust the physics parameters* to get the correct business parameters.  It's the business parameters which need to be correct.


Quote
for each a different thing is important. We should restrict the bloody sim to ox-carts and barges, in the 18th century.
Ox carts have a very complicated physics model, since ox's feet have much better traction than wheels :-) and barges were deemed too complicated to implement properly because we have no way of modelling river current :-)

We should actually design the physics model for the rolling vehicle with powered wheels, as most of the vehicles in the game will be of that sort.  If we have to make up totally phony numbers to get the ox-carts to behave right in business terms that's OK, there aren't that many of them.  I would like a separate ship physics model someday, but I'm not up to writing it.