1. Trouble with the game?
    Try the troubleshooter!

    Dismiss Notice
  2. Issues with the game?
    Check the Known Issues list before reporting!

    Dismiss Notice

Is throttle butterfly implemented?

Discussion in 'General Discussion' started by fufsgfen, Jan 18, 2017.

  1. fufsgfen

    fufsgfen
    Expand Collapse

    Joined:
    Jan 10, 2017
    Messages:
    6,782
    Maybe bit stupid question, but as I have noticed that with turbo cars, when I do engine braking, I don't get much of any negative pressure (vacuum) while having driven turbo cars IRL I got lots of during engine braking, it kind of feels like if cars would have no throttle butterfly, which would then result similar behavior like on turbo diesel, where you really can't get vacuum.

    I have observed that turbo rpm increases on idling and when I open throttle just a tiny bit, I might get 0.7bar of boost, without engine load, turbo having over 60 000rpm while idling and when opening throttle tiny bit turbo rpm drops to around 40 000rpm quite quickly.

    I have not observed this kind of behavior IRL, turbo rpm did go really low while idling.

    Spooling up might be affected, situation where you slow down from higher speed and in turn open throttle, you get first higher boost, then less, turbo rpm is higher than it should and it can reduce challenge of driving turbo car where you have to keep turbo spooled to get best exit from the corner, what are practical effects from all this is quite unknown to me, probably quite small, but just something that has been bit of mystery to me.
     
  2. fufsgfen

    fufsgfen
    Expand Collapse

    Joined:
    Jan 10, 2017
    Messages:
    6,782
    I'm thinking here that maybe sensor for turbo pressure is not in intake manifold?

    However there are something odd things still, if bov releases pressure when throttle is closed and pressure sensor is between compressor wheel and throttle butterfly, I should not get 0 when releasing throttle, same goes if there is no throttle butterfly, boost should decrease, but there should be boost when higher rpm.

    So I guess throttle butterfly is there, maybe intake piping between turbo and throttle butterfly goes to vacuum and does not offer resistance for compressor wheel when throttle is closed and hence turbo rpm goes high at idle?

    There is so much I don't know though, all I know there is something happening which is not what I would except to happen :)
     
  3. Brother_Dave

    Brother_Dave
    Expand Collapse

    Joined:
    Aug 16, 2012
    Messages:
    1,662
    Might i add that most cars (not diesels of course) idle at about -.50 to -.65 bar but not yet in Beamng, atleast not the ones ive looked at so i might be wrong. Engine braking also seems kinda soft, if i release the clutch quick enough the rear wheels should be able to lock up. Common practice to initiate a drift.
    One thing that seems to have changed in the latest release is that earlier, if you hit the rev limiter in neutral or clutch pressed down, the boost would peak, fall back and rise slowly. Now it seems to rise slowly straight away which is accurate.
     
    • Agree Agree x 1
  4. fufsgfen

    fufsgfen
    Expand Collapse

    Joined:
    Jan 10, 2017
    Messages:
    6,782
    With gasoline/petrol motor it is indeed quite difficult to build up boost without a load, not sure about modern cars, but 80's, 90's cars, some had trouble building up boost on first gear as you had to change gear before boost had build up, so trick was to keep car on place with brake and give clutch little warm up. Automatics were easier of course, but it did stress clutch/gearbox a bit.

    Several times flooring for short time helped turbo to wake up a bit so car did not stumped. Not that I would know anything about traffic light races, certainly didn't do such ever :)


    Piston engine is an air pump and when you block intake (by closing throttle butterfly) it tries to create a vacuum, higher the rpm, higher will be engine braking, cutting fuel will cause even more engine braking, I have seen formulas how to calculate that relationship, but how would I remember such things.

    Anyway dynamic resistance should be multiplied by throttle position inverted to get engine braking I guess, to get engine braking effect, or then there is much better way to do it and maybe it is already done, but something else is causing this whole behavior that we find being different from what we have observed IRL.
     
  5. fufsgfen

    fufsgfen
    Expand Collapse

    Joined:
    Jan 10, 2017
    Messages:
    6,782
    I can't remember where I stumbled upon this, but as I remembered there was some kind of formula, my memory however can't tell me what Octave was, something like Python I guess, however for anyone interested, something to play with:
    Code:
    %octave file to calculate engine brake parameters
    
    %car data in SI, change them accordingly
    Vengine = 3e-3; %engine volume in m^3 (=1e-3 liter)
    L = 4.57e-2; %stroke in m, typically 0.04-0.1 m
    Ncyl = 10; %number of cylinders
    rc = 12.5; %compression ratio, typically 8-16 for petrol engines
    Vin = 0; %volume of the intake manifold
    
    %physics parameters in SI, do not change them
    mIn = 135.968; % in kg/(s*m^2)
    k = 7/5; %for diatomic gases (like most of the air molecules)
    p0 = 100000; %ambient air pressure in Pa
    
    %doing calculations
    c = 1-k;
    Vd = Vengine/Ncyl; %displaced/swept volume
    Vc = Vd/(rc-1); %clearance volume
    
    %estimation of linear brake coefficient, in kgm^2/s
    LinBrakeCoeff = Vengine * L * mIn
    
    %estimated constant torque when off the accelerator, in Nm
    ConTorque = ( (Ncyl/c) * ((Vc+Vin/rc)/((Vin+Vc)^c)) * ((Vin+Vc+Vd)^c-(Vin+Vc)^c) - Vengine) * p0/(4*pi)
    
     
  6. fufsgfen

    fufsgfen
    Expand Collapse

    Joined:
    Jan 10, 2017
    Messages:
    6,782
    I think that issue I describe in first post has something to do with maxExhaustPower, I'm not sure what that really is, maybe exhaust volume, flow or something like that, I don't understand how it relates to A/R ratio of turbine.

    Currently I'm thinking that exhaust factor is percentage of maximum theoretical gas flow in turbine side and that maxExhaustPower being maximum volume/flow of gas that can go trough there.

    So you set turbine size/(A/R-ratio) via maxExhaustPower and exhaust factor, but I can be of course wrong there.

    Problem with that thought is that maxExhaustPower seems to increase amount of exhaust, but amount of exhaust is amount of air squeezed into cylinders multiplied by temperature rise, however engine size is not defined anywhere.

    Does Beam then calculate air needed into engine from torque curve and manifold pressure, that probably would not work.

    I can calculate intake flow and from that exhaust flow, but I don't know how would I translate flow to those two parameters (maxExhaustPower and exhaust factor).

    Anyway, after playing around, what I noticed was that at idle boost pressure is too high compared to experience in real vehicles and that vehicles that have higher exhaust power tend to spin turbo bit fast at idle.

    This is often possible to compensate by lowering exhaust factor on idle rpm.

    Another bit I'm not quite understanding is efficiency in torque curve, Volumetric efficiency comes to my mind, that is 70-90% mostly and with good porting etc. can get over 90%, but it is said to be constant, not changing with rpm.

    Some intakes can use some ram effect to get bit more air to cylinder, that would change things a bit trough rpm range, but numbers I'm seeing for efficiency don't match any of those, for experiment I set that to 0.85 for whole rpm range and nothing exploded.

    Also at part throttle efficiency of engine suffers, there was other parameter for that kind of engine efficiency though.

    I guess I need to play around more, ended up with two extra turbos for Sunburst (stage 2 kind of power level), they might need bit more work though, but I put in data what I had so there is something real in them, not sure about end result, but you can't build boost without having some load for engine with these.

    sunburst_two_turbos.png
     

    Attached Files:

  7. Josh

    Josh
    Expand Collapse

    Joined:
    Jul 21, 2013
    Messages:
    1,082
    Beam doesn't simulate throttle body currently.

    (Going off of the note posted)

    Code:
    local bovJustOpened = false
    --------------->-- Hacky BOV logic, waiting for a simulation of the throttle body
      if not bovEngaged and lastThrottle - currentThrottle > 0.2 and bovEnabled then
        bovEngaged = true
        sounds.playSoundOnceAtNode(bovSoundFileName, sounds.engineNode, turboPressure / maxTurboPressure * bovSoundVolumeCoef)
        bovJustOpened = true
      end
    
      bovEngaged = bovEnabled and currentThrottle < 0.01 -- open the BOV if we have no throttle
    
      lastThrottle = currentThrottle
    
      local rolling = (electrics.values.wheelspeed or 0) > 1 and currentThrottle < 0.01
     
    • Like Like x 1
  8. fufsgfen

    fufsgfen
    Expand Collapse

    Joined:
    Jan 10, 2017
    Messages:
    6,782
    Thanks!

    So we have pretty much diesel engines currently, one just need to set torque curve and sound, I'm thinking here one request I read which was asking diesel engines.
     
  9. Josh

    Josh
    Expand Collapse

    Joined:
    Jul 21, 2013
    Messages:
    1,082
    I just try to compensate as best as possible.
     
  10. Diamondback

    Diamondback
    Expand Collapse
    Vehicle Systems Lead
    BeamNG Team

    Joined:
    Apr 8, 2014
    Messages:
    1,957
    Sorry to answer so late, probably could have saved you a lot of time otherwise :p
    The current turbo implementation is not really something you can compare to real life.
    It's merely trying to somewhat approximate what a real turbo might do.
    Unfortunately the base engine simulation is way not detailed enough to use anything better for the turbo, we tried to make a new turbo code based on mass air flow but that didn't work out, simply because the underlying engine code is way too generalized for that purpose.

    Looks like you are mostly looking at the sunburst turbos? Have a look at the modern ETKs, they might behave a bit better (still not perfect).
     
  11. Josh

    Josh
    Expand Collapse

    Joined:
    Jul 21, 2013
    Messages:
    1,082
    @Diamondback

    Will, we ever see a more advanced engine simulation in beam?
     
  12. fufsgfen

    fufsgfen
    Expand Collapse

    Joined:
    Jan 10, 2017
    Messages:
    6,782
    Thanks from the info and remember, it is never too late, everything happens when it's time to happen.

    I will take a look of ETK turbos too, I think that I'm starting to have an idea how to get turbo to do what I want with current options available, just need to play more to get engine size/power and exhaust power relationship to spreadsheet.

    Turbo model is not so bad considering how you had to make it work, with simple multiplier that could be throttle position engine model could improve a lot, including turbo, you can multiply back torque with it (inversed), multiply exhaust power as well as turbo resistance to emulate closed throttle and how turbo slows down, well of course it is never quite that simple, but lot can be done even without changing whole model.

    Pointless work of course should be avoided, so no point to change current if plan is to make new at some point.
     
  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