kellven Posted April 9, 2012 Share Posted April 9, 2012 Note to mods: This is specificaly about an addon, however I\'m asking for general game mechanics, so I stuck this here instead. May well prove pertinent for general use, at least for those who like to calculate their astrophysics instead of just Jeb\'ing it. If you feel it\'s really in the wrong section, go ahead and move it. -What I\'m asking for: Consensus formulas for how KSP deals with atmospheric effects. Specifically; Drag, DLift, ADrag, and how they relate to Mass/Area/Vol. For wings and other parts(tanks, etc) also. -Reason I\'m asking: I tried to make an updated, normalized wing set, people could use, or base parts off of. Wanted to just get all the wing data compiled, updated, fixed, and all in one place. They may not work like real wings in real air, but at least all the parameters would be used properly. I did the best I could, but after some searching, I found stuff in the archives that seems to completely contradict what I was using. Unfortunately, I couldn\'t seem to find a consensus on how it all hung together, or even if it was still applicable. -I (think I) can do the conversion to part logic myself, but I need to know what\'s what if it\'s going to be worth anything. So far I\'ve found: drag = -IAS^2 * atmDens * partDragFactor d(h) = Fg / ( v2 * kd ) Patm(alt) = (Pasl * 2.71828183)^-((alt / 1000f) / scaleHeight) Vt=45.519/sqrt(maximum_drag) And most recent: FD=.5*density*velocity2*(max_drag1*m1+max_drag2*m2...) -Assuming the last function holds true today, am I correct in assuming DLift gets multiplied by 'FD' somehow along with AoA and applied perpendicular to part global Y(Z) axis? How is DragCoef factored in, multiplied by FD and set to -Y? -Angular drag (from Unity reference) is essentially 'roll resistance' Is this following something similar to the above equation, or is it simply a denominator to input torque? -Yes, I could try testing all this stuff myself, but I\'m quite sure there are a couple aerospace engineers only too happy to answer the questions. I\'m also modding, which means I don\'t get to actually play the game, much less experiment on it. I only have so many fingers and eyes. Link to comment Share on other sites More sharing options...
Bluejayek Posted April 9, 2012 Share Posted April 9, 2012 Since these equations are going to help me with a few things I am trying to calculate, can you clarify a few variables for me...d(h) is what? And in that equation Fg, v2, and kd means what exactly?Pasl is some constant defining ground level pressure I assume? Any idea on its value?How does maximum_drag relate to partDragfactor and what are the values of these?Finally, any idea on how to convert the mass numbers of parts to usable units? Thanks, and I hope this isnt taken as a hijack of your thread, I\'m just trying to get some similar information Link to comment Share on other sites More sharing options...
kellven Posted April 9, 2012 Author Share Posted April 9, 2012 The equations weren\'t mine, I just did a top forum search for 'drag', and picked out the various formulas from other posts. This is the most recent one I could find describing drag FD=.5*density*velocity2*(max_drag1*m1+max_drag2*m2...) This is the most recent one I could find describing drag FD=Force Drag density=atmo density(below) velocity2=velocity^2, I believe max_drag1=max drag of part #1 m1=mass, yes mass of part #1 Atmo Pressure, I know HarvesteR posted this way back in Aug/Sep, and I think(hope) that was where I stole the equation from, but now I can\'t re-find the post. It\'s also gone through several redesigns, so I really have no idea what\'s going on with this. Patm(alt) = (Pasl * 2.71828183)^-((alt / 1000f) / scaleHeight) Patm=atmo pressure at (altitude) Pasl=Pressure at sea level alt=altitude scaleHeight=...? You can find the MaxDrag values in the part .cfg files, but almost invariably it\'s 0.2 Mass conversion is possibly the single most subjective factor for converting Earth stuff to KSP stuff. It depends entirely on how you want everything else to balance, as a straight conversion results in completely different ratios for all parts than you find in real stuff. For instance, rocket mass fractions, engine weight, thrust:weight, even ISP and fuel cost. You\'ll just have to find your own, I use 0.0000971*5.64/10 or 0.000054708 * Earth(kg) = KSPMass However, that only works for SE v2a style engines, and it\'s only a rough approximate at that. I was hoping one of the resident engineer/physics types would pop in and give up the answers, but I think I\'m done with modding for now, so I\'ll just leave this up if anyone else is working out wings. Link to comment Share on other sites More sharing options...
kellven Posted April 22, 2012 Author Share Posted April 22, 2012 I still don\'t have an equation for atmospheric density, but I did grab some data from a little plugin.Altitude, and pressure are on second sheet. Seems pressure is a coef, rather than value, but it works.Spreadsheet Link to comment Share on other sites More sharing options...
Kosmo-not Posted April 22, 2012 Share Posted April 22, 2012 The equation for density is somewhere around 0.01*exp(-altitude/5000)altitude is in metersThe trendline fit on my data says 0.0103, but I decided to round it to 0.01. The scale height was confirmed by someone else to be 5000m. Link to comment Share on other sites More sharing options...
Recommended Posts