Is your vehicle unstable, especially at speed? (Intro to aerodynamics)

Discussion in 'Content Creation' started by fufsgfen, Jul 16, 2018.

  1. fufsgfen

    fufsgfen
    Expand Collapse

    Joined:
    Jan 10, 2017
    Messages:
    6,782
    No matter how you adjust suspension and braking, car just seems floaty and spins out of control when touching brake?

    It could be that your aerodynamics are the reason, but fear not help is as near as your vehicle jbeam!

    First thing to do is to analyze situation, for that we need a proper setup:
    upload_2018-7-16_19-11-6.png Make sure advanced options are enabled from UI options

    upload_2018-7-16_19-12-24.png From debug menu, enable aerodynamics debug and also collision triangle debug



    upload_2018-7-16_19-21-27.png You need wind app and weight distribution app, add them from app menu


    upload_2018-7-16_19-20-24.png Handbrake or park for the vehicle, set up wind so that it blows from front and adjust wind speed while observing weight on each tire.

    If rear weight decreases more than front, that leads to instability
    If front load increases more than rear, that can lead to instability

    Generally you would like to keep weight distribution unchanged or moving bit towards rear with speed as that improves stability.

    If your vehicle has such problematic state that weight on rear decreases with speed, you need to add a wing or alter existing collision triangles so that you can get lift or effects of lift decreased.

    How to add triangles:
    https://wiki.beamng.com/JBeam_Introduction#Triangles_.26_quads_.28Coltri.27s.29

    How to add nodes and beams to hold nodes in place:
    https://wiki.beamng.com/JBeam_Introduction#Nodes

    So I added a wing, put two triangles on top, green side up and I can see increase in weight at rear wheels:
    upload_2018-7-16_19-5-2.png upload_2018-7-16_19-5-54.png

    Drag is air resistance:
    "dragCoef":14.3,

    Lift is strength of aerodynamic effect of Triangle, angle * liftCoef * air speed is resulting lift or downforce in my case. Change value and test if change was enough to produce desired effect:
    "liftCoef":134.3


    So that is short introduction to aerodynamics for car handling, subject is really vast and there are really a lot of very complex aspects that you need to consider for realism sake, but for this introduction I will not add such, however with this short intro and reading of links provided one should be able to improve vehicles handling.
     
    • Like Like x 6
    • Informative Informative x 4
  2. alex hart

    alex hart
    Expand Collapse

    Joined:
    Jan 22, 2017
    Messages:
    1,177
    another very useful tutorial :)
     
    • Like Like x 1
  3. fufsgfen

    fufsgfen
    Expand Collapse

    Joined:
    Jan 10, 2017
    Messages:
    6,782
    I hope that it helps some, I did just quickly put this together while I needed to improve one of my vehicles, so thought why not take few screenies, might help new guys starting to explore how to improve their newly made vehicles.

    For realistic values, it is something one needs to research a lot I guess. What I have in my memory is that big rear wing IRL on rallycross car was something around 50kg of downforce at 130kph, that is big wing like one in Hillclimb config of SBR4, but do I remember that correctly and is it much useful for anyone, so better not quote me on that figure.



    While Automation does not export triangles to wings, my understanding is that effect of that wing you set up is made to body coltris, so when you export AM car, it should have correct downforce, but I haven't done that much testing on it. Anyways adding wing to such vehicle might get you bit more downforce than you designed, but designing with 0 downforce and then adding coltris to wing part of jbeam would be manual way of adding downforce AND that would allow change to aero by knocking off the wing.

    Something worth to play with and a way to improve any AM exported vehicles.
     
    • Like Like x 1
  4. Raider

    Raider
    Expand Collapse

    Joined:
    Sep 23, 2013
    Messages:
    356
    Form my experience if you want to easy measure downforce use this simple method
     
    • Like Like x 2
    • Informative Informative x 1
  5. fufsgfen

    fufsgfen
    Expand Collapse

    Joined:
    Jan 10, 2017
    Messages:
    6,782
    That is nice way to get total aero, it gave me inspiration to do this, you can use end key to tare to 0, when scale is active vehicle (it might take few tries to get perfect 0):
    upload_2018-7-17_20-16-14.png upload_2018-7-17_20-17-31.png

    You can see both scales at once when placing camera carefully, also make sure you try to get vehicle centered as close as possible to get most accurate readings.

    That saves bit of math compared to weight distribution app, but one thing I have not tested is if scales affect aerodynamics of the vehicle there, so worth to do comparison without them and using weight distribution app.
     
    • Like Like x 1
  6. fufsgfen

    fufsgfen
    Expand Collapse

    Joined:
    Jan 10, 2017
    Messages:
    6,782
    How to measure aerodynamic drag of your vehicle:


    So idea is to tie your car to thin air by node grabber (left-ctrl, left click), then set up wind to blow straight ahead and when you press left-ctrl key it shows you force in newtons (1N = 0.981kg) and that gives you total drag of your vehicle at given speed, you can use that to estimate if your vehicle is then having too much of air resistance.

    For example I have found out many AM exported vehicles I have made, have had less top speed than they should of had and reason appears to be too much drag (that is air resistance) compared to what they should of had according to AM.

    Of course this works for testing scratch build mods too.

    To get something meaningful out of measured values, this link is worth to read, also drag equation link from that article:
    https://en.wikipedia.org/wiki/Frontal_area

    Naturally it is not necessary to dive into mathematics, you could do just good estimates and test for correct top speed, but for those who seek accuracy there are means to make it so.
     
    #6 fufsgfen, Jul 26, 2018
    Last edited: Jul 26, 2018
    • Like Like x 1
  7. nhrive

    nhrive
    Expand Collapse

    Joined:
    May 18, 2015
    Messages:
    8
    I'm having problems making any stable downforce in front of my automation converted car. If I alter existing collision triangles so that I get lift, it ends up always dragging more the other side. (dunno what I'm doing wrong there, trying to follow steps and read the wiki but it's more than I can chew it seems) and If i try make new triangles or anything like that I end up with only tires and suspension in game :D Is there easy way to make like addon part or something to create lift in front?
     
  8. fufsgfen

    fufsgfen
    Expand Collapse

    Joined:
    Jan 10, 2017
    Messages:
    6,782
    There has been some typo if car is not appearing, missing one , or ] or something is usually the cause.

    X, Y, Z, so you alter only middle and last number to change node positions. Negative Y is forward. Adding two nodes to front of two front most ones would be then copying those two node lines and changing Y value to more negative and decreasing Z values very slightly.

    Then beams need to made to keep those nodes in place.

    After that also coltris need to be made, but remember always add node names for coltris counterclockwise, you can end up having lift only on one side if your added coltris is defined clockwise for other side, this means red and green colors are on different sides.

    There is of course Blender addon by Khalibloo, but you can't attach the part with it, you still need to manually make beams to attach the thing you make and for two coltris it is easier to edit file in notepad++.

    So make sure you have green color of coltris always on same side and make sure you don't omit 0 don't have , or . missing or mixed up and that every ] and } is in place and it should work fine.
     
  9. nhrive

    nhrive
    Expand Collapse

    Joined:
    May 18, 2015
    Messages:
    8
    --- Post updated ---
    No idea what am I doing anymore, under nodes: i try to add these

    {"nodeWeight":0.00001},
    ["a96", -0.826207, -0.823348, 1.31433],
    ["a97", 0.826207, -0.823348, 1.31433],
    ["a98", -0.831645, -1.52674, 1.31433],
    ["a99", 0.831645, -1.52674, 1.31433],

    then under "beams": [ i added

    ["a96", "a97"],
    ["a96", "a98"],
    ["a97", "a99"],
    ["a98", "a99"],

    and in bottom of triangles i added

    ["a96", "a98", "a97"{"dragCoef":60.0,"liftCoef":1000.0"}],
    ["a97", "a98", "a99"{"dragCoef":60.0,"liftCoef":1000.0"}],

    what did I do wrong, if not everything? Was thinking that would I get easier way around to make wings in automation in to my car and if there's a way to make them transparent / invisible somehow easy? That way I get the lift as I like, but hate to go for those ugly wings in front.
     
  10. fufsgfen

    fufsgfen
    Expand Collapse

    Joined:
    Jan 10, 2017
    Messages:
    6,782
    It can be quite tricky, sometimes I find easier to just add two nodes to middle, brace them with beams so they don't move around and then add two new coltris.

    As a general rule, enabling node names in game and moving camera around to see what is what helps:
    upload_2019-1-1_20-57-13.png

    To visualize beams you can do this ["a61", "a29"{"highlight":{"radius":0.0075, "col":"#3333FF5f"}}],
    upload_2019-1-1_21-1-50.png

    So you add {"highlight":{"radius":0.0075, "col":"#3333FF5f"}} inside of beam definition.

    ["a61", "a29"] becomes ["a61", "a29"{"highlight":{"radius":0.0075, "col":"#3333FF5f"}}]

    "col":"#3333FF5f" defines color, RRGGBBAA, red green blue alpha, from 00 to 99 and AA to FF so whole range is from 00 to FF where FF is maximum strength and 00 zero strength.

    Add those in notepad++, save and then hit ctrl-r in game, you see beam colored, do it to some beam and be very careful that every bracket gets right, then see if those help to visualize the triangular shape you want to adjust.

    Sometimes coltris of course are not between the nodes you want them to be, so make sure to check then coltris if they run way you are thinking.

    Also sometimes left and right side in AM cars are not the same, there are bugs.

    That is why I find it easier to add two nodes, beams and make two coltris is faster and easier.

    So for this I marked two beams:
    upload_2019-1-1_21-10-11.png

    I can now tell at bottom of both there are two nodes, A30 and A29, I want to add two nodes at front of them, so I see definition of those two nodes which for my vehicle are:
    ["a29", -0.319549, -2.26882, 0.58992],
    ["a30", 0.319549, -2.26882, 0.58992],

    So I want two nodes to be at front of them by 10cm, so I make these two lines right below a30 line:
    ["a29_fw", -0.319549, -2.36882, 0.58992],
    ["a30_fw", 0.319549, -2.36882, 0.58992], //_fw added to node name so I know this node is for front wing

    Next I add these beams to hold those nodes at place, these are first two added beams, which is not yet enough to keep nodes on place, they happily flop around at this stage:
    upload_2019-1-1_21-16-16.png
    upload_2019-1-1_21-17-16.png

    Adding more beams, so nodes stay in place:
    upload_2019-1-1_21-20-40.png
    upload_2019-1-1_21-20-6.png

    Next I need to define coltris for these nodes that I did just add, need to pick starting point where I follow counterclockwise, so first is a29, a29_fw, a30_fw
    upload_2019-1-1_21-26-39.png

    second is a30_fw, a30, a29:
    upload_2019-1-1_21-28-14.png

    upload_2019-1-1_21-29-1.png

    Now at this stage it is almost ready, but currently it does not make much lift or downforce, next step is then adjust the angle of the added thing.

    So to make lift these:
    ["a29_fw", -0.319549, -2.36882, 0.58992],
    ["a30_fw", 0.319549, -2.36882, 0.58992], //_fw added to node name so I know this node is for front wing

    Are changed like so:
    ["a29_fw", -0.319549, -2.36882, 0.63992],
    ["a30_fw", 0.319549, -2.36882, 0.63992], //_fw added to node name so I know this node is for front wing

    So front end of added 'lip' goes up:
    upload_2019-1-1_21-32-5.png

    Now it is just matter of adjusting position of those two added nodes to get desired size and angle, which together with liftcoef value of added two coltris defines strength of the effect.

    Part itself is perfectly invisible and I find this much easier than modifying existing coltris as sometimes sides are rather different in AM exports:
    upload_2019-1-1_21-34-0.png
     
  11. nhrive

    nhrive
    Expand Collapse

    Joined:
    May 18, 2015
    Messages:
    8
    Million thanks, now I get something to study on and try to make it work myself, rly hope I got time to go trough this and absorb much as I can. See ya around and thanks again!
     
  12. fufsgfen

    fufsgfen
    Expand Collapse

    Joined:
    Jan 10, 2017
    Messages:
    6,782
    Node weight of 0.1 is practically minimum simulator is designed for, going below that makes things really difficult as it causes instability so easily, usually I just add default node weight of 5kg or so, which adds 10kg to car, which is not much at all really, can reduce amount of fuel for that.
     
  13. nhrive

    nhrive
    Expand Collapse

    Joined:
    May 18, 2015
    Messages:
    8
    Got it working proper now, sort of. It's sure making very little downforce, even with high liftcoef values. Is it due the angle or does the surface area affect? Like the "wing" is very narrow, should I make it more wide? Thanks again for saving lots of trial and error for me.
     
  14. fufsgfen

    fufsgfen
    Expand Collapse

    Joined:
    Jan 10, 2017
    Messages:
    6,782
    It is are and angle both.

    It works so that area and angle create some value with wind speed that is multiplied by multiplied, however stall angle can then reduce effect, depending from wind direction.

    Also when coltris is connected to another, it is averaged instead of causing individual effect.

    So if you want strongest possible effect, then you need to have more nodes to keep wing separate of other coltris, but then weight adds fast.

    Also while wing is invisible it can cause collisions.
     
  15. nhrive

    nhrive
    Expand Collapse

    Joined:
    May 18, 2015
    Messages:
    8
    Been playing around with this now and loving the results, except I haven't still figured out how to keep that "splitter" in front from breaking in full acceleration, it does not hit in the ground or any other car parts, but just bends and breaks during extreme violent accelerations. Should I increase beams strength somehow? Thanks again in advance (and sorry I know this is going a bit offtopic)
    --- Post updated ---
    My brain hurts, I give up. Trying to make extra "frame" for the "splitter" to raise it and make it more wide. Cant figure out why it just flops around and wont hold together, tried to add beams to hold it, but I guess I've just missed something that I don't understand or there's something my twisted eyes wont see, here's my nodes, beams and coltris what I've added and ended up like in pic.

    nodes:

    ["a29", -0.309632, -1.79304, 0.760884],
    ["a30", 0.309632, -1.79304, 0.760884],
    ["a29_fw", -0.606752, -1.84178, 0.810884],
    ["a30_fw", 0.606752, -1.84178, 0.810884], //_fw supp
    ["a29_fw2", -0.606752, -1.85178, 0.760205],
    ["a30_fw2", 0.606752, -1.85178, 0.760205], //_fw added to node name so I know this node is for front wing

    ["a61", -0.254646, -1.82431, 0.940226],
    ["a62", 0.254646, -1.82431, 0.940226],
    ["a61_fw", -0.254646, -1.83231, 0.990226],
    ["a62_fw", 0.254646, -1.83231, 0.990226], //_fw added TUKI

    beams:
    ["a61", "a29"],
    ["a61", "a61_fw"{"highlight":{"radius":0.0075, "col":"#3333FF5f"}}],
    ["a61_fw", "a62_fw"{"highlight":{"radius":0.0075, "col":"#3333FF5f"}}],
    ["a62_fw", "a62"{"highlight":{"radius":0.0075, "col":"#3333FF5f"}}],
    ["a61_fw", "a29_fw"{"highlight":{"radius":0.0075, "col":"#3333FF5f"}}],
    ["a61", "a29_fw"{"highlight":{"radius":0.0075, "col":"#3333FF5f"}}],
    ["a29_fw", "a29"{"highlight":{"radius":0.0075, "col":"#3333FF5f"}}],
    ["a29", "a61_fw"{"highlight":{"radius":0.0075, "col":"#3333FF5f"}}],
    ["a61_fw", "a29_fw2"{"highlight":{"radius":0.0075, "col":"#3333FF5f"}}],
    ["a29_fw2", "a29_fw"{"highlight":{"radius":0.0075, "col":"#3333FF5f"}}],
    ["a29_fw2", "a30_fw"{"highlight":{"radius":0.0075, "col":"#3333FF5f"}}],
    ["a29_fw2", "a30_fw2"{"highlight":{"radius":0.0075, "col":"#3333FF5f"}}],
    ["a29_fw", "a30_fw"{"highlight":{"radius":0.0075, "col":"#3333FF5f"}}],
    ["a29_fw", "a30_fw2"{"highlight":{"radius":0.0075, "col":"#3333FF5f"}}],
    ["a29_fw", "a62_fw"{"highlight":{"radius":0.0075, "col":"#3333FF5f"}}],
    ["a61_fw", "a30_fw"{"highlight":{"radius":0.0075, "col":"#3333FF5f"}}],
    ["a57", "a60"],
    ["a62", "a30"],
    ["a30_fw", "a30_fw2"{"highlight":{"radius":0.0075, "col":"#3333FF5f"}}],
    ["a62_fw", "a30_fw2"{"highlight":{"radius":0.0075, "col":"#3333FF5f"}}],
    ["a62_fw", "a30_fw"{"highlight":{"radius":0.0075, "col":"#3333FF5f"}}],
    ["a30_fw", "a30"{"highlight":{"radius":0.0075, "col":"#3333FF5f"}}],
    ["a30", "a29_fw"{"highlight":{"radius":0.0075, "col":"#3333FF5f"}}],
    ["a29", "a30"{"highlight":{"radius":0.0075, "col":"#3333FF5f"}}],
    ["a29", "a30_fw"{"highlight":{"radius":0.0075, "col":"#3333FF5f"}}],
    ["a30", "a62_fw"{"highlight":{"radius":0.0075, "col":"#3333FF5f"}}],
    ["a30_fw", "a62"{"highlight":{"radius":0.0075, "col":"#3333FF5f"}}],
    ["a62_fw", "a61"{"highlight":{"radius":0.0075, "col":"#3333FF5f"}}],
    ["a61_fw", "a62"{"highlight":{"radius":0.0075, "col":"#3333FF5f"}}],

    ["a29_fw", "a29_fw2", "a30_fw"{"dragCoef":16.9,"liftCoef":350}], //added coltri One
    ["a30_fw2", "a30_fw", "a29_fw"{"dragCoef":16.9,"liftCoef":350}], //added coltri Two

    upload_2019-1-2_20-57-50.png
     
  16. fufsgfen

    fufsgfen
    Expand Collapse

    Joined:
    Jan 10, 2017
    Messages:
    6,782
    Strongest structure is when beams are at 45 degree angles and in 3D, you have almost like 2D shape there.

    Kinda like this and you don't need to add thickness to that, just have supporting beams coming from angle. Check construction crane pics and see how it has beams placed.
    upload_2019-1-2_21-10-8.png
     
  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