Accurate Fuel Consumption

Discussion in 'Ideas and Suggestions' started by Valhallatchaboy, Oct 21, 2015.

  1. Valhallatchaboy

    Valhallatchaboy
    Expand Collapse

    Joined:
    Dec 11, 2014
    Messages:
    103
    I was thinking this game would be even better if the fuel consumption was more accurate/realistic. Im sure a truck-new or old- couldn't get 100 mpg. I dont know how to code that well otherwise i would do it myself. I was hoping to get an app or something that lets you adjust the total mpg of a car.
     
  2. SavageSam205

    SavageSam205
    Expand Collapse

    Joined:
    Mar 18, 2013
    Messages:
    286
    You can. In the engine file of the car (Eg. hatch_engine) you can edit the burn efficiency of the engine. Normally the value's between 0.40 and 0.50, but you can set it lower or higher if you want.
     
  3. estama

    estama
    Expand Collapse
    Developer
    BeamNG Team

    Joined:
    Aug 7, 2012
    Messages:
    268
    A little bit about fuel consumption.

    The simulation actually calculates the energy output of the engine ("work" that it does), and then assuming gasoline, it calculates to how much gasoline this corresponds to.

    As engines are not 100% efficient in converting gasoline energy to kinetic energy (there are various kinds of loses), burn efficiency defines how efficient the engine is. The lower the efficiency, the bigger the amount of gasoline it'll need to burn for the same work output.

    Above fuel consumption simulation method naturally adjusts for different environments, inclination, mud, wind, gravity and so on.
     
    #3 estama, Oct 21, 2015
    Last edited: Oct 21, 2015
    • Like Like x 10
  4. CTJacob

    CTJacob
    Expand Collapse

    Joined:
    Aug 6, 2012
    Messages:
    446
    Where are you getting 100mpg? With the D-Series I get 20mpg at a steady 60mph. 26mpg at a steady 35mph.
     
  5. Valhallatchaboy

    Valhallatchaboy
    Expand Collapse

    Joined:
    Dec 11, 2014
    Messages:
    103
    I get this insane MPG with the D series, and I get it everywhere. I go to all of the core maps and get 100 mpg no matter what I do.


    All of Gabe's cars are insanely good at buring fuel then cause I have to drive around at least thirty minutes at top gear to see any type of impact to the fuel. Gabe should design engines lol.


    I'll try, but last time I edited a cars file, the game did not load properly.
     
  6. RobertGracie

    RobertGracie
    Expand Collapse

    Joined:
    Oct 15, 2013
    Messages:
    3,856
    I wonder if I breath on that efficiency thing and make it 1.5....I wonder what would happen?
     
  7. Valhallatchaboy

    Valhallatchaboy
    Expand Collapse

    Joined:
    Dec 11, 2014
    Messages:
    103
    I tested the whole changing the burn efficiency on the Bruckwell Moonhawk since 70's type cars get horrible MPG. I went as far as 9billion with little to no effect. I went the other way with .0000000000000000000000000000000000000000000000000000000000000001 and still got no difference from before. So either I am doing something wrong, or the devs did not care about fuel consumption in the game.
     
  8. RobertGracie

    RobertGracie
    Expand Collapse

    Joined:
    Oct 15, 2013
    Messages:
    3,856
    Maybe its something to do with the numbers try .99 and .01 and see if there is a difference thats the extremes of the spectrum what you were doing was pushing the numbers far to high and far too low...

    BIT OFF TOPIC SORRY!


    I am a diesel guy myself and I keep the revs low on my car and I get upwards of 43mpg when I get out on to the open road my brother on the other hand...can barely get 24mpg....in the same car driving it in our own styles and I get yelled at for being so inconsistant....excuse me I am consistent I dont drain the tank in 200 miles...I squeeze it out to 350 miles!
     
  9. CTJacob

    CTJacob
    Expand Collapse

    Joined:
    Aug 6, 2012
    Messages:
    446
    100mpg down hill with a tail wind and 1% throttle or just cruising?
     
  10. Valhallatchaboy

    Valhallatchaboy
    Expand Collapse

    Joined:
    Dec 11, 2014
    Messages:
    103
    yeah, that did nothing.
     
  11. Valhallatchaboy

    Valhallatchaboy
    Expand Collapse

    Joined:
    Dec 11, 2014
    Messages:
    103
    more like full throttle up a hill.
     
  12. gabester

    gabester
    Expand Collapse
    Vehicle Director
    BeamNG Team

    Joined:
    Jun 6, 2012
    Messages:
    2,653
    I think the much more likely explanation is that whatever app you're using to display MPG is not working correctly.
     
    • Like Like x 3
  13. randomshortguy

    randomshortguy
    Expand Collapse

    Joined:
    Aug 9, 2013
    Messages:
    1,562
    Firstly, you may not have modified the file right, secondly, the variable isn't stored as a double, so massive values like several billion or 1x10^-15 will be rounded to zero or overflow respectively.

    Also Estama is a developer and he just stated how fuel consumption works, did you not read his post?

    While I have not studied how fuel consumption works ingame, I've gotten the Bolide down to half a tank in a matter of minutes at redline up a hill. The fuel thing is a bit deceiving since it's reset every time the car is, and thus since the average duration of a drive before being reset is around a minute for me (bit of a leadfoot and latebraking lol), you'll never really see fuel be significantly consumed.

    As for MPG, last time I checked my MPG for the D15, I was getting around 22 MPG, but that was way back in 0.3 . I haven't used the gadget recently, so I suppose Gabester is right about the app not reading correctly.
     
  14. Valhallatchaboy

    Valhallatchaboy
    Expand Collapse

    Joined:
    Dec 11, 2014
    Messages:
    103
    im using the tachometer2 app as well as engine debug app
    i did read his post and i took in account to what he said.
     
  15. Valhallatchaboy

    Valhallatchaboy
    Expand Collapse

    Joined:
    Dec 11, 2014
    Messages:
    103
    Im modifying the engine.jbeam for the vehicle.

    So Moonhawk_engine.jbeam
     
  16. speednsnake

    speednsnake
    Expand Collapse

    Joined:
    Sep 4, 2013
    Messages:
    182
    You could also calculate it yourself. According to beamNG the base model D15 has a fuel tank that contains 90L of gas, or 23.7755 gallons (23.78 in beam). Traveling at 60mph for one minute will equal one mile of distance traveled (ignoring the distance traveled while accelerating). Assuming that you don't include the pedal-to-the-metal acceleration used to attain 60mph, you could take the resulting fuel level, subtract it from the total fuel level, and divide the distance traveled by the fuel used.

    In my game (ignoring the fact that it accurately shows between 30mpg and 10mpg), it shows a final fuel level of 23.71 gallons. If I traveled 1 mile, and used 0.07 gallons of gas (23.78/23.71), the average mpg is 14.28 (1mi/0.07gal).

    This number is most likely low because I used a keyboard, which requiring me to alternate between full throttle and no throttle. The automatic transmission didn't like that very much and downshifted every time I pushed the key.

    If you are getting 100mpg you must have another problem. My engine debug app shows the correct fuel consumption just fine, even with all of the vehicle mods I have installed.

    There is admittedly still a flaw in beamng, in that it assumes that fuel can only be used during acceleration. If you floor it with the parking brake on, beam assumes that you aren't using gas because you aren't actually accelerating, despite the fact that the engine is at higher RPMs and is indeed exerting torque on the system. In the same vein, If you are moving but not accelerating per se (like when you go off the throttle), beam will, again, assume that no fuel is being used. This therefor ignores decel consumption (transmission braking)*, normal idle consumption, and any usage while the vehicle is "free-wheeling" (that is, moving with the clutch in or with the torque converter on the stall.)

    *One of the devs will have to correct me here I'm sure, but as far as I can tell beam doesn't actually simulate transmission braking at all. It will give a little jerk while changing gears, but it will slow down just as fast in first gear at 80mph as it will in fifth at the same speed. If the game doesn't simulate transmission braking, then I suppose it would have to get a pass for not recognizing the fuel consumption caused by it.
     
  17. Valhallatchaboy

    Valhallatchaboy
    Expand Collapse

    Joined:
    Dec 11, 2014
    Messages:
    103
    I kinda did, I have a truck with the similar set-up as the D-Series. It has a 16 gallon fuel tank and gets 17 miles to the gallon. Based off that I figure 1 mile of travel equals 1 gallon of fuel consumption. Thats going off 55 miles an hour at a constant speed. So just in real life, going pedal to the medal all the time will reduce fuel efficiency.


    It was a UI app. I cleared the cache and its giving me better read outs, but still not realistic ones.


    I'm not gonna blame the devs or even the game for the fuel read outs and stuff like that. I know the devs are waaaaaaay busy patching the game, jbeams, and what have you. I just wish SOMEONE would make it so that fuel economy would be more realistic.
     
  18. speednsnake

    speednsnake
    Expand Collapse

    Joined:
    Sep 4, 2013
    Messages:
    182
    Well it seems to me that you are experiencing an isolated problem with your particular files. On my end (and evidently others as well) the fuel consumption is totally normal and within reason, despite the (minor) flaws in how it determines how much fuel is used. You might want to take the plunge and do a full re-install. A few updates ago I had to uninstall it through steam and delete every file pertaining to it elsewhere on my computer to get the gas station in East Coast USA to finally show up. It didn't matter that I had already deleted every example of the cache I could find, It just wouldn't load the updated version of the map until I did that.
     
  19. estama

    estama
    Expand Collapse
    Developer
    BeamNG Team

    Joined:
    Aug 7, 2012
    Messages:
    268
    The engine work calculations are not based on acceleration or deceleration, they are based on torque and engine RPM. So in your parking brake scenario you'll consume fuel. If you press the clutch you remove the load of the transmission/wheels on the engine so you'll have decreased work required by the engine and lower fuel consumption.

    About transmission braking/speeding up the engine, yes it simulates that too. You can brake a car with the engine, and when going downhill the wheels will speed up the engine. The fuel consumption will account for all these cases.

    The whole system is highly complex and visible in "drivetrain.lua" (it is open source), so other people with experience in these things can review it.

    And to clarify a possible misunderstanding. MPG can only be calculated when the vehicle is moving. Otherwise it goes to 0 (the vehicle moved 0 miles while consuming X gallons of fuel in the last minute so 0/x = 0) [*]. This does not mean that fuel is not consumed. It just means that the local sensors (in the vehicle's electrics) do not have enough information to calculate MPG.

    [*] In the opposite case, when the vehicle is moving and fuel consumption falls to 0 (no throttle), MPG can go to infinity.
     
    #19 estama, Oct 23, 2015
    Last edited: Oct 23, 2015
    • Like Like x 2
  20. speednsnake

    speednsnake
    Expand Collapse

    Joined:
    Sep 4, 2013
    Messages:
    182
    Ok, so just because the game shows zero mpg does not mean that it assumes no fuel is consumed. I did read your post above on torque based fuel consumption, but I had no idea exactly how comprehensive it actually was. Thanks for the clarification, I don't believe I've ever had a dev reply before, much less the seldom heard estama.

    As for engine braking, perhaps this is another shortcoming of the users inability to "feel" the car, but it definitely doesn't feel like an actual car does when engine braking. In every (manual) car I've driven, the deceleration felt by completely letting off the throttle in gear at highish RPMs is abrupt and unmistakable, particularly in lower gears. In the current build it feels about right for an automatic (that's just in 'drive', not low or 2nd or something), but definitely too mild for a manual trans. As for different gearing and higher RPMs affecting engine braking, it kinda seems like it only differentiates between "in gear" and "not in gear" when determining if it will engine brake or not. Putting the car in 1st at 120mph will wind the engine waaaay up, but it wont lock the wheels or cause much of a difference in deceleration than 5th gear would. It will slow down faster in gear than out of gear though, as you stated. Is the current transmission braking accurate to reality already (and the user feedback is simply missleading), or is it one of the features that is awaiting further improvement?
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice