1. Trouble with the game?
    Try the troubleshooter!

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

    Dismiss Notice
  3. Before reporting issues or bugs, please check the up-to-date Bug Reporting Thread for the current version.
    0.30 Bug Reporting thread
    Solutions and more information may already be available.

How to code a sequential twin turbocharger in a jbeam?

Discussion in 'Troubleshooting: Bugs, Questions and Support' started by 1UZ-FE, Jan 9, 2017.

  1. 1UZ-FE

    1UZ-FE
    Expand Collapse

    Joined:
    Oct 13, 2014
    Messages:
    351
    I was aiming for a sequential twin turbocharger setup. The smaller turbo is a low psi, low inertia turbo. the second would require massive amounts of inertia, but also much more psi in favor. I'm a noob with coding, so I've tried everything I can think of in regards to making this work, and no luck. Can you help a brotha out?
     
  2. Josh

    Josh
    Expand Collapse

    Joined:
    Jul 21, 2013
    Messages:
    1,082
    I asked this awhile back when the turbo code was added in, they said its not possible they told me to make a fast spooling single to simulate twin sequential turbos.
     
  3. 1UZ-FE

    1UZ-FE
    Expand Collapse

    Joined:
    Oct 13, 2014
    Messages:
    351
    Thanks for the reply. But, If we're only using a fast spooling turbo, how will we simulate the other turbo that takes a while to spool up?
     
  4. CreasingCurve

    CreasingCurve
    Expand Collapse

    Joined:
    Jan 19, 2016
    Messages:
    940
    If its meant to be a fast spooling and low psi turbo it might be worth using a supercharger. This may be why there is currently no twin turbo v6,8 setups in game yet.
     
  5. Josh

    Josh
    Expand Collapse

    Joined:
    Jul 21, 2013
    Messages:
    1,082
    That's the other point I brought up, I really wish they would add in simulation for twin sequential or more turbos.

    You can try a supercharger/turbo setup to try to simulate.

    yes its not the same but it can get the job done I guess.
     
    #5 Josh, Jan 9, 2017
    Last edited: Jan 9, 2017
  6. 1UZ-FE

    1UZ-FE
    Expand Collapse

    Joined:
    Oct 13, 2014
    Messages:
    351
    Would you mind giving me a brief coding example in jbeam in how to have a supercharger and turbo under one slot?
     
  7. Josh

    Josh
    Expand Collapse

    Joined:
    Jul 21, 2013
    Messages:
    1,082
    This was in 0.6-0.7 I haven't played around with turbo/supercharger setups in 0.8 yet.
     
  8. 1UZ-FE

    1UZ-FE
    Expand Collapse

    Joined:
    Oct 13, 2014
    Messages:
    351
    Gotcha. Maybe I'll try to add "supercharger" and everything under that either before or after the "turbo" section
     
  9. Josh

    Josh
    Expand Collapse

    Joined:
    Jul 21, 2013
    Messages:
    1,082
    i'm trying figure it out now.
     
  10. Josh

    Josh
    Expand Collapse

    Joined:
    Jul 21, 2013
    Messages:
    1,082
    Ok so I cant figure it out.

    This is from my 0.7 hybrid super/turbocharger setup and it worked perfect.


    Code:
    {
    "pickup_engine_v8_49": {
        "information":{
            "authors":"BeamNG",
            "name":"4.9L Twin Charge V8 Engine",
            "value":1300,
        }
        "slotType" : "pickup_engine",
        "flexbodies": [
             ["mesh", "[group]:", "nonFlexMaterials"],
             ["gavril_v8_pickup", ["pickup_engine"], [], {"pos":{"x":0, "y":0, "z":0}, "rot":{"x":0, "y":0, "z":0}, "scale":{"x":1, "y":1, "z":1}}],
             ["pickup_engbay", ["pickup_cab", "pickup_firewall", "pickup_frontmeat","pickup_engine_intake"]],
        ],
        "slots": [
            ["type", "default","description"]
            ["pickup_transmission","pickup_transmission_4A","Transmission"],
            ["pickup_exhaust_v8","pickup_exhaust_v8","V8 Exhaust"],
            ["pickup_supercharger","pickup_supercharger", "Intake",{"coreSlot":true}],
        ],
        "enginetorque":[
            ["rpm", "torque"]
            [0, 0],
            [500, 424.67],
        [600, 431.55],
        [700, 438.81],
        [800, 444.79],
        [900, 451.07],
        [1000, 456.22],
        [1100, 457.01],
        [1200, 458.14],
        [1300, 462.06],
        [1400, 465.29],
        [1500, 468.47],
        [1600, 471.89],
        [1700, 474.56],
        [1800, 475.28],
        [1900, 475.73],
        [2000, 475.7],
        [2100, 475.33],
        [2200, 480.69],
        [2300, 485.28],
        [2400, 488.54],
        [2500, 488.7],
        [2600, 485.34],
        [2700, 483.85],
        [2800, 482.41],
        [2900, 480.18],
        [3000, 477.64],
        [3100, 474.72],
        [3200, 474.78],
        [3300, 473.9],
        [3400, 472.81],
        [3500, 469.46],
        [3600, 467.71],
        [3700, 465.1],
        [3800, 461.92],
        [3900, 457.59],
        [4000, 454.08],
        [4100, 448.02],
        [4200, 443.13],
        [4300, 439.33],
        [4400, 434.52],
        [4500, 429.51],
        [4600, 425.29],
        [4700, 420.94],
        [4800, 416.88],
        [4900, 412.26],
        [5000, 407.51],
        [5100, 403.05],
        [5200, 398.07],
        [5300, 393.01],
        [5400, 387.88],
        [5500, 382.8],
        [5600, 378.56],
        [5700, 373.35],
        [5800, 369.91],
        [5900, 364.82],
        [6000, 358.92],
        [6100, 353.45],
        [6200, 347.95],
    
        ],
            "turbocharger": {
            "wastegateStart":3,
            "wastegateLimit":5,
            "maxExhaustPower": 10000,
            "backPressureCoef": 0.000035,
            "frictionCoef": 1.3,
            "inertia":10.2,
        "bovEnabled":false,
            "bovSoundVolumeCoef": 0.0,
            "bovSoundFileName": "TurboBovSound",
            "pressurePSI":[
                //turbineRPM, pressure(PSI)
                [0,         -0.5],
                [30000,     1],
                [60000,     3],
                [90000,     8],
                [150000,    15],
                [200000,    24],
                [250000,    30],
            ],
            "engineDef":[
                //engineRPM, efficiency, exhaustFactor
                [0,     0.0,    0.0],
                [500,   0.00,   0.14],
            [750,   0.00,   0.30],
                [1000,  0.09,    0.42],
            [1200,  0.45,    0.55],
                [1400,  0.75,    0.75],
                [2000,  0.70,    0.95],
                [2500,  0.70,    1.00],
                [3000,  0.70,    1.00],
                [3500,  0.70,    1.00],
            [4000,  0.70,    1.00],
            ],
        }, 
        "engine":{
            //engine performance
            "idleRPM":850,
            "shiftDownRPM":1200,
            "shiftUpRPM":5800,
            "maxRPM":6200,
            "inertia":0.26,
            "friction":17
            "brakingCoefRPS":0.25
            "burnEfficiency":0.60
            "throttleSensitivity":1.1
            "torqueReactionNodes:":["e1l","e2l","e4r"]
            "particulates":0.165
    
            //cooling and oil system
            "thermalsEnabled":true
            "engineBlockMaterial":"iron"
            "oilVolume":6
    
            //engine durability
            "cylinderWallTemperatureDamageThreshold":150
            "headGasketDamageThreshold":1500000
            "pistonRingDamageThreshold":1500000
            "connectingRodDamageThreshold":1500000
        },
        "nodes": [
             ["id", "posX", "posY", "posZ"],
             {"selfCollision":false}
             {"collision":true}
             //--4.1L I6 Engine-
             {"frictionCoef":0.5},
             {"nodeMaterial":"|NM_METAL"},
             {"nodeWeight":48},
             {"group":"pickup_engine"},
             {"engineGroup":"engine_block"}
             ["e1r", -0.14, -1.07, 0.43,{"chemEnergy":1000,"burnRate":0.39,"flashPoint":800,"specHeat": 0.1,"selfIgnitionCoef":false,"smokePoint":650,"baseTemp":"thermals","conductionRadius":0.2}],
             ["e1l", 0.14, -1.07, 0.43],
             ["e2r", -0.14, -1.72, 0.43,{"chemEnergy":1000,"burnRate":0.39,"flashPoint":800,"specHeat": 0.1,"selfIgnitionCoef":false,"smokePoint":650,"baseTemp":"thermals","conductionRadius":0.2}],
             ["e2l", 0.14, -1.72, 0.43],
             {"engineGroup":["engine_block","engine_intake"]}
             ["e3r", -0.15, -1.07, 0.88,{"chemEnergy":1000,"burnRate":0.39,"flashPoint":800,"specHeat": 0.1,"selfIgnitionCoef":false,"smokePoint":650,"baseTemp":"thermals","conductionRadius":0.2}],
             ["e3l", 0.15, -1.07, 0.88],
             ["e4r", -0.15, -1.72, 0.88,{"isExhaust":true,"chemEnergy":1000,"burnRate":0.39,"flashPoint":800,"specHeat": 0.1,"selfIgnitionCoef":false,"smokePoint":600,"baseTemp":"thermals","conductionRadius":0.2}],
             ["e4l", 0.15, -1.72, 0.88],
             {"engineGroup":""}
             {"group":""},
        ],
        "beams": [
              ["id1:", "id2:"],
              {"beamPrecompression":1, "beamType":"|NORMAL", "beamLongBound":1.0, "beamShortBound":1.0},
              //--ENGINE CUBE--
              {"beamSpring":12600840,"beamDamp":390},
              {"beamDeform":142500,"beamStrength":"FLT_MAX"},
              ["e1r","e1l"],
              ["e1r","e2r"],
              ["e1r","e2l"],
              ["e1r","e3r"],
              ["e1r","e3l"],
              ["e1r","e4r"{"isExhaust":true}],
              ["e1r","e4l"],
              ["e1l","e2r"],
              ["e1l","e2l"],
              ["e1l","e3r"],
              ["e1l","e3l"],
              ["e1l","e4r"],
              ["e1l","e4l"],
              ["e2r","e2l"],
              ["e2r","e3r"],
              ["e2r","e3l"],
              ["e2r","e4r"],
              ["e2r","e4l"],
              ["e2l","e3r"],
              ["e2l","e3l"],
              ["e2l","e4r"],
              ["e2l","e4l"],
              ["e3r","e3l"],
              ["e3r","e4r"],
              ["e3r","e4l"],
              ["e3l","e4r"],
              ["e3l","e4l"],
              ["e4r","e4l"],
              {"beamPrecompression":1, "beamType":"|NORMAL", "beamLongBound":1.0, "beamShortBound":1.0},
        ],
        "triangles": [
                ["id1:","id2:","id3:"],
                //engine
        ],
    },
    "pickup_supercharger": {
        "information":{
            "authors":"BeamNG",
            "name":"Hybrid Turbo/Supercharger",
            "value":600,
        }
        "slotType" : "pickup_supercharger",
        "flexbodies": [
             ["mesh", "[group]:", "nonFlexMaterials"],
             ["pickup_supercharger", ["pickup_engine", "pickup_framecab"], [], {"pos":{"x":0, "y":0, "z":0}, "rot":{"x":0, "y":0, "z":0}, "scale":{"x":1, "y":1, "z":1}}],
        ],
        "supercharger": {
            "gearRatio":1.6,
            "clutchEngageRPM":0,
            "pressureRatePSI":500,
            "pressurePSIPer1kRPM":2.5,
            "crankLossPer1kRPM":0.05,
            "type":"roots",
            "boostController":[
                //throttle in %, factor
                [0,     0.2],
                [100,     1],
            ],
        },
        "engine":{
            "idleRPM":850,
            "shiftDownRPM":1400,
            "shiftUpRPM":5800,
            "highShiftDownRPM":2000,
            "highShiftUpRPM":5800,
            "maxRPM":6200,
            "inertia":0.37,
            //"clutchTorque":900
            "brakingCoefRPS":0.15
            "burnEfficiency":0.62
            "throttleSensitivity":1.22
    
        },
    }
    }


    This is my attempt on trying to make a 0.8 version similar.

    They are showing up as two separate parts even though they both have the same slot type

    Code:
    {
    "pickup_turbocharger_S2": {
        "information":{
            "authors":"BeamNG",
            "name":"Stage 2 Turbocharger",
            "value":1200,
       
        }
        "slotType" : "pickup_turbocharger",
        "turbocharger": {
            "wastegateStart": 35,
            "wastegateLimit": 40,
            "maxExhaustPower": 10000,
            "backPressureCoef": 0.0000916,
            "bovEnabled":false,
            "bovSoundVolumeCoef": 0.0
            "frictionCoef": 1272.5,
            "inertia":7,
            "pressurePSI":[
                //turbineRPM, pressure(PSI)
                [0,         0],
                [10000,     0],
                [15000,     0],
                [20000,     0],
                [30000,     0],
                [40000,     0],
                [50000,     15],
                [60000,     18],
                [70000,     24],
                [80000,     28],
                [90000,     35],
                [100000,    40],
            ],
            "engineDef":[
                //engineRPM, efficiency, exhaustFactor
                [0,     0.0,    0.0],
                [250,   0.0,   0.1],
                [500,  0.0,   0.2],
                [800,  0.0,   0.3],
                [1400,  0.0,    0.4],
                [2000,  0.1,    0.7],
                [2500,  0.2,    0.8],
                [3000,  0.3,    0.9],
            ],
        },
        "mainEngine":{
            "idleRPM":500,
            "maxRPM":7000,
            "burnEfficiency":0.30
            "cylinderWallTemperatureDamageThreshold":150
            //turbocharger name
            "turbocharger":"turbocharger",
         
     
            },
        }
        "pickup_supercharger": {
        "information":{
            "authors":"BeamNG",
            "name":"Stage 2 supercharger/turbocharger hybrid",
            "value":1600,
        }
        "slotType" : "pickup_turbocharger",
        "flexbodies": [
            ["mesh", "[group]:", "nonFlexMaterials"],
            ["pickup_supercharger", ["pickup_engine", "pickup_framecab"], [], {"pos":{"x":0, "y":0, "z":0}, "rot":{"x":0, "y":0, "z":0}, "scale":{"x":1, "y":1, "z":1}}],
        ],
        "supercharger": {
            "gearRatio":1.3,
            "clutchEngageRPM":0,
            "pressureRatePSI":500,
            "pressurePSIPer1kRPM":4.3,
            "crankLossPer1kRPM":0.035,
            "type":"roots",
            "boostController":[
                //throttle in %, factor
                [0,     0.2],
                [100,     1],
            ],
        },
        "mainEngine": {
            "idleRPM":500,
            "maxRPM":7000,
            "burnEfficiency":0.26,
            "revLimiterRPMDrop":50,
         
            //supercharger name
            "supercharger":"supercharger",
    
            //engine durability
            "cylinderWallTemperatureDamageThreshold":220,
        },
        "vehicleController": {
            //"highShiftUpRPM":6400,
        },
    }
    }
    
    

    So what am I doing wrong?
     
    #10 Josh, Jan 9, 2017
    Last edited: Jan 9, 2017
  11. SixSixSevenSeven

    SixSixSevenSeven
    Expand Collapse

    Joined:
    Sep 13, 2013
    Messages:
    6,960
    You don't, you just have to mess with making an unrealistic profile for the single turbo that roughly matches the twin, but it's a far from ideal solution
     
    • Agree Agree x 1
  12. 1UZ-FE

    1UZ-FE
    Expand Collapse

    Joined:
    Oct 13, 2014
    Messages:
    351
    Wouldn't know myself, but how's this for a fake twin turbo? (Wait for 3rd gear pull)
    Didn't realize it was recording from system other than directly from the audio source.
     
  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