Talk:Barometric formula

Error
Warning the imperial constants provided seems wrong

jmrog

why give the eq2 since its a special case? —Preceding unsigned comment added by 85.156.81.72 (talk) 08:28, 1 August 2009 (UTC)

The value for the Universal Gas Constant (R*) appears to be R*/M. This is misleading looking at the formula, suggest changing the SI value to 8.314 J/K-mol to match the Gas constant page. 198.135.125.50 (talk) 17:59, 23 November 2016 (UTC)

Choosing values for b
In the equations, what determines the correct value for b to be used? Given the same height in meters, I get different results depending on b. SharkD (talk) 21:00, 31 August 2009 (UTC)

In the table, shouldn't the Standard Temperature for subscript b=0 be 298 Kelving rather than 288 Kelvin? 298 Kelvin is the temperature used in the chemistry world's definition of standard room temperature conditions.

Incorrect Value for Standard Temperature?
In the table, shouldn't the Standard Temperture for subscript b=0 be 298 Kelvin rather than 288 Kelvin? 298 Kelvin is used in the chemistry as standard room temperature. —Preceding unsigned comment added by Cougar40 (talk • contribs) 16:48, 16 July 2010 (UTC)
 * I believe that standard temperature, when talking about the atmosphere, is actually 273K. See Daniel Jacob's "Introduction to Atmospheric Chemistry". Sean Egan (talk) 18:48, 24 October 2013 (UTC)

Equations and Units
Equation 2 is necessary for isothermal regions of the atmosphere, such as the stratosphere starting at a geopotential altitude of 36500 ft. It is therefore not a special case, and necessary to any full understanding of the regions of earth's atmosphere. I believe that there are two separate isothermal regions.

Regarding units: the kelvin temperature system should not be used with a foot, pound, second unit system, or english units. The proper temperature system is degree Rankine, which is a temperature system with 0 degrees at absolute zero, and increasing at the same rate as degrees farenheit (1.8 degree Rankine = 1 degree Kelvin). I suggest a change in the constants used to reflect a realistic system of units, as unsuspecting users will not check this.

Further, these equations are often used in aerospace settings, where the specific gas constant is used instead of the universal gas constant. This should be mentioned with a link to the article discussing these two different physical values. Rspecific = R/M, where R is the universal gas constant and M is the molar mass. Also, lb-mol is not the same as the SI mole. — Preceding unsigned comment added by Spcaeguyformertah (talk • contribs) 23:15, 22 January 2011 (UTC)

Challenge
The section, Estimating the Temperature should be removed. It is completely irrelevant to the article, contains zero references, and its inclusion is simply confusing.173.189.77.96 (talk) 19:43, 13 April 2014 (UTC)

Error in Pressure Equation 1
I think there is an error in Pressure Equation 1.

see also https://en.wikipedia.org/wiki/Atmospheric_pressure — Preceding unsigned comment added by Gimusi (talk • contribs) 08:41, 6 December 2015 (UTC)


 * Specifically? I think it's a bit odd myself, but can't quite say why. I can't see how it comes from the derivation later on. --Cedderstk 12:09, 26 August 2018 (UTC)


 * I agree there is a (sign) error in the first equation. In its current form it yields a pressure P at a height h above the reference height h_b with pressure P_b with P > P_b, for a situation where T decreases with height h (as is mostly the case in the troposphere) and where height h is taken positive upwards. I will correct the sign shortly.Redav (talk) 18:01, 29 December 2020 (UTC)

Special types of kilometers ?
AFAIK the SI-system has no such unit as a "geometric meter". It doesn't have a "geopotential meter" either.

See #9 and #11 at this page: http://physics.nist.gov/cuu/Units/checklist.html

I therefore suggest that this part: "There are two different equations for computing density at various height regimes below 86 geometric km"

- is changed to this: "There are two different equations for computing density at various geometric height regimes below 86 km"

And in this part: "(84 852 geopotential meters or 278,385.8 geopotential feet)"

- "geopotential" should not be placed between the numbers and the units, so that part should be rewritten too.

T.O.K. — Preceding unsigned comment added by 37.253.241.7 (talk) 00:38, 8 February 2017 (UTC)

Derivation of first equation
The two equations don't seem very well sourced. The code at least is tallies with Stull. It just seems odd that the main, first, equation for the troposphere is using a power relationship, while the second is exponential. I can see how the second one is derived according to the derivation second, by why is the first used when temperature varies? Is it just an approximation? Shouldn't there be a single general purpose formula, at least for each layer? Would like some expert input on this. -Cedderstk 12:14, 26 August 2018 (UTC)

Tiny writing hard to read
The exponents render as a microscopic blob on most monitors...

Python equivalent
def Altitude_to_Density(h): # Alt in meters about sea level # See https://en.wikipedia.org/wiki/Barometric_formula # Tested on https://www.digitaldutch.com/atmoscalc/ #       # height asl: h(m)  mass density: p(kg/m^3) standard temp: T(K)   temp lapse rate: L(K/m) table=[{'b':0,  'h':0,     'hto':11000,  'p':1.2250,   'T':288.15,  'L':-0.0065   }, {'b':1,  'h':11000, 'hto':20000,  'p':0.36391,  'T':216.65,  'L':0.0       }, {'b':2,  'h':20000, 'hto':32000,  'p':0.08803,  'T':216.65,  'L':0.001     }, {'b':3,  'h':32000, 'hto':47000,  'p':0.01322,  'T':228.65,  'L':0.0028    }, {'b':4,  'h':47000, 'hto':51000,  'p':0.00143,  'T':270.65,  'L':0.0       }, {'b':5,  'h':51000, 'hto':71000,  'p':0.00086,  'T':270.65,  'L':-0.0028   }, {'b':6,  'h':71000, 'hto':999999, 'p':0.000064, 'T':214.65,  'L':-0.002    }] #       for layer in table: # Find the line we want if h >= layer['h'] and h < layer['hto']: break #       R=8.3144598 # N·m/(mol·K) universal gas constant g0=9.80665 # m/s2          gravity M=0.0289644 # kg/mol       molar mass of Earth's air #       if layer['L']: # Formula 1 p = layer['p'] * ( layer['T'] / (layer['T']+layer['L']*(h-layer['h'])) )**( 1 + (g0*M)/(R*layer['L']) ) else: # Formula 2 p = layer['p'] * math.exp( ( -g0*M*(h-layer['h']) ) / ( R * layer['T'] ) ) #       return p  — Preceding unsigned comment added by 2001:8000:1BED:6D00:F9F1:CD6:FEA5:C8E0 (talk) 06:38, 27 April 2020 (UTC)

Lapse rate is negative of temperature gradient
I changed the maths so that $$L$$ has reversed sign. I hope everything is correct (anybody is invited to double check). Ariescode (talk) 23:00, 12 April 2023 (UTC)


 * This issue seems to have caused many changes to the first pressure formula over time, many of which left the page actually wrong.
 * The fundamental problem seems to be that the U.S. Standard Atmosphere document (reference 2) uses an atmosphere layer table where the lapse rate is just the temperature delta for a positive change in altitude, and thus its value is negative in the troposphere. However, the Wikipedia (and wider) definition of the term "lapse rate" takes the lapse rate to be the negative of the temperature delta, and this is inconsistent with the Standard Atmosphere document.
 * This Wikipedia page can be made correct using either of the two conventions, but changing the page from one convention to the other is somewhat complex. The person editing needs to (1) change the sign of all of the lapse rate values in the atmosphere layer tables, (2) change the sign of the term that multiplies by lapse rate in the first equation, and (3) either negate the exponent, or interchange numerator and denominator inside the square brackets in the first equation.
 * I think that your (Ariescode) change got all of these right, and that the current version (13 March 2024) is also correct. However, most of the other changes to the first pressure formula changed the formula without changing the table values, and that would just give wrong results if used for calculation.  This is bad.
 * I think that this page should either:
 * 1. Use a lapse rate sign convention that is the same as the US Standard Atmosphere document, and use the same pressure formula as the Standard, but add an explicit note that the lapse rate convention on this page is the negative of the common usage, or
 * 2. Retain the current sign convention and pressure formula, but add an explicit note saying that the US Standard document used a nonstandard sign convention for lapse rate, and that's why the pressure formula in this page looks different from what is in the Standard (and also probably different from existing code implementing atmosphere calculations).
 * Right now, this page appears to be inconsistent with the Standard document, and there's no indication on the page *why* it is different. DMMartindale (talk) 02:56, 18 April 2024 (UTC)

Boltzmann Distribution
It is probably worth mentioning that this is a really good example of a boltzmann distribution. There is a reason this is often an early problem in statistical thermodynamic courses. (Though admittedly on smaller systems like gas canisters, but the approximations make the equations the same when assuming constant temperature.) Zach7898 (talk) 07:59, 9 December 2023 (UTC)