# Talk:Atmosphere

## Drag calculation notes

The calculation for the drag force as listed on this wiki page is incorrect. The units for the equation provided would be (Kg^2*m)/(s^2) when the unit of force (N) is Kg*m/(s^s). The equation should not include the mass of the craft as the mass of the craft has nothing to do with the amount of drag exerted on it.

Remember that F=ma is a very simplified version of Newton's second law. The real way to read the equation is the sum of all instantaneous forces on a body is equal to the instantaneous mass of the body multiplied by the instantaneous acceleration of the body. It is actually more helpful to think of this drag force calculation in the context of Newton's third law.The craft is accelerating the air particles it contacts (or the pressure zone ahead of it contacts) and the equal but opposite force is applied to the craft. The mass that matters when determining aerodynamic forces is the mass of the disturbed air and this is why the density of the disturbed fluid is part of the calculation.

Edit:

Before writing this I did not see the mention to this fact in the wiki page, but I am still not sure why a force would be modeled with completely wrong units. It is not to make the amount of drag be independent of the craft's mass because, as I explained above the drag equation does not consider the craft's mass. Are the internal modeling calculations all done in mass specific forces/accelerations? If so, shouldn't the true drag force then be divided by the craft's mass to yield this value? — T0w0i7ne [talk] --T0w0i7ne (talk) 15:48, 15 July 2013 (CDT)

- First of all, this biiiig paragraph isn't very readable. I actually only read some of it and I'm asking you: Do you complain, that the formula here is not real world compatible? Then I reference to: “Note that the
*m*term is not present in the real-word drag equation. In the game, this causes acceleration due to drag (*a = FD / m*) to be unaffected by a ship's mass. (It also causes the units of the drag equation to have an extra "kg" term.)”. By the way, please sign your posts with --~~~~. — xZise [talk] 16:26, 15 July 2013 (CDT)

- I misread that section once I saw it. I now understand the desire was to make the acceleration of the craft due to the force of drag be independent of the mass of the craft. What is the point in such an approach when the reality is precisely the opposite? What does this gain in the simulation? I don't see that this would be any simpler to code or that it would use drastically less CPU cycles. Please excuse my ignorance of wiki etiquette, I am now in the process of learning how to make nicer posts (after an attempt to clean up the above atrocity). I was originally under the impression that this discussion page was more like forum postings. --T0w0i7ne (talk) 22:39, 15 July 2013 (CDT)
- Now about the physical simulation, I have no idea. Maybe this should be asked on the IRC. As I don't know how they calculate the crosssection of the craft, they maybe tried to make that calculation easier and don't calculate the cross section as precise as it needed and instead they estimate a heavy craft has a bigger cross section. I don't know ;). About etiquette: In a forum you can see who posted a post, but here it is harder without the signature. And it is always nice to know who you are talking to. — xZise [talk] 05:19, 16 July 2013 (CDT)
- Actually, the force of drag IS independent of the mass of the craft, however, the acceleration is not. This is because mass of the object is used in conversion between force applied, in newtons, and actual acceleration, in m/s².--Ruedii (talk) 17:49, 16 July 2013 (CDT)
- This is exactly what I was trying to get at in my first post. I understand the physics/aerodynamics. I'm confused by the completely unrealistic way that drag is supposedly being modeled in the game (see the wiki page). When I said "mass specific forces/accelerations" I meant it in the context that the two concepts are identical ( i.e. for all quantities being instantaneous F/m = a ). So to calculate the acceleration of the craft due to the force of drag one would divide the force of drag by the craft's mass (F_d = 1/2 * rho * A * d * V^2 and a_d = F_d/m). So the equation on the wiki page (F_d = 1/2 * rho * A * d * m * V^2) provides a meaningless value as far as I can tell. I just do not understand the reasoning behind the decision to use such a meaningless value to model drag in the game (once again assuming that the statement in the wiki that the game does it this way is accurate). — T0w0i7ne [talk] 00:47, 17 July 2013 (MDT)
- Yes the way it is calculated in the stock game is completely unrealistic. This is because mass substituted area in the equation, among many other things. For more realistic drag, FAR is available as a MOD. It's primarily used to make planes behave more realistically, but it replaces the drag and lift algorithms to achieve this, thus making drag and lift significantly more realistic. (It makes them about the same as something like Microsoft Flight Simulator. Still far less realistic than Flight Gear or X-Plane. Possibly also on par with many of the R/C Flight Simulators out there.)--Ruedii (talk) 02:10, 17 July 2013 (CDT)

- Ehm Ruedii, why first edit here was a little failed (removed my comment and readded the old signatures of T0w0i7ne). I restored it with this edit. — xZise [talk] 04:00, 17 July 2013 (CDT)

- This is exactly what I was trying to get at in my first post. I understand the physics/aerodynamics. I'm confused by the completely unrealistic way that drag is supposedly being modeled in the game (see the wiki page). When I said "mass specific forces/accelerations" I meant it in the context that the two concepts are identical ( i.e. for all quantities being instantaneous F/m = a ). So to calculate the acceleration of the craft due to the force of drag one would divide the force of drag by the craft's mass (F_d = 1/2 * rho * A * d * V^2 and a_d = F_d/m). So the equation on the wiki page (F_d = 1/2 * rho * A * d * m * V^2) provides a meaningless value as far as I can tell. I just do not understand the reasoning behind the decision to use such a meaningless value to model drag in the game (once again assuming that the statement in the wiki that the game does it this way is accurate). — T0w0i7ne [talk] 00:47, 17 July 2013 (MDT)

- I misread that section once I saw it. I now understand the desire was to make the acceleration of the craft due to the force of drag be independent of the mass of the craft. What is the point in such an approach when the reality is precisely the opposite? What does this gain in the simulation? I don't see that this would be any simpler to code or that it would use drastically less CPU cycles. Please excuse my ignorance of wiki etiquette, I am now in the process of learning how to make nicer posts (after an attempt to clean up the above atrocity). I was originally under the impression that this discussion page was more like forum postings. --T0w0i7ne (talk) 22:39, 15 July 2013 (CDT)

## Density

The ideal gas law is irrelevant for calculating density. Real-world physics do not always apply to Kerbal atmospheres. Elembis' original number of 1.2230948554874 was correct. Notice the comment he included, density at sea level is given by FlightGlobals.getAtmDensity(1.0). For p = 1.0 atm, the 1.223 number is more accurate, see http://i.imgur.com/wJPO4m2.png for verification. The 1.2002 that this page has been quoting might be accurate at the altitude of the launch pad, where pressure is slightly lower than 1 atm.

Similarly, the factor of 0.008 isn't on the density. The number comes from FlightGlobals.DragMultiplier, and it should either be interpreted as the ratio of cross-sectional area in m^2 per kilogram of mass for KSP parts, or as a dimensionless factor you have to multiply the drag coefficients (usually 0.2) by.

Notice how we've been using Elembis' original template http://wiki.kerbalspaceprogram.com/wiki/Template:VT with the correct 1.223 sea-level density number to calculate terminal velocity in every article, which has been giving correct terminal velocity values. But he referenced this more-commonly-seen Atmosphere article as his source, without realizing his correct numbers would gradually be replaced by incorrect numbers. --Tavert (talk) 18:59, 23 August 2013 (CDT)