PV = nRT; n = m/M
PV = mRT/M; V = m/(rho)
p*m/(rho) = mRT/M
p/(rho) = RT/M
(rho) = pM/RT
p + (dp) = p + (rho)g(dh)
(dp) = (rho)g(dh)
(dp) = pMg(dh)/RT
(dp)/p = Mg(dh)/RT
integrate 0 to p (dp)/p = integrate h to 0 [Mg(dh)/RT]
ln(p) = -Mgh/RT + c
take h = 0 at bottom of building, then
ln(p_at_h=0) = c => read c from barometer to get constant
now, at height h we will read p_at_h=height from barometer, then:
ln(p_at_h=height) = -Mgh/RT + ln(p_at_h=0)
Mgh/RT = -ln(p_at_h=height) + ln(p_at_h=0)
Mgh = -RTln(p_at_h=height) + RTln(p_at_h=0)
-----------------------------------------------------------------------------
| height = -RTln(p_at_h=height)/Mg + RTln(p_at_h=0)/Mg =
| = RT/Mg(ln(p_at_h=0) - ln(p_at_h=height)) =
| = RT/Mg(ln(p_at_h=0/p_at_h=height))
p in Pascals
g = 9.81
R = 8.31
T = temperature in absolute units
M = 28.97
I hope i did it right ;)
PV = nRT; n = m/M
PV = mRT/M; V = m/(rho)
p*m/(rho) = mRT/M
p/(rho) = RT/M
(rho) = pM/RT
p + (dp) = p + (rho)g(dh)
(dp) = (rho)g(dh)
(dp) = pMg(dh)/RT
(dp)/p = Mg(dh)/RT
integrate 0 to p (dp)/p = integrate h to 0 [Mg(dh)/RT]
ln(p) = -Mgh/RT + c
take h = 0 at bottom of building, then
ln(p_at_h=0) = c => read c from barometer to get constant
now, at height h we will read p_at_h=height from barometer, then:
ln(p_at_h=height) = -Mgh/RT + ln(p_at_h=0)
Mgh/RT = -ln(p_at_h=height) + ln(p_at_h=0)
Mgh = -RTln(p_at_h=height) + RTln(p_at_h=0)
-----------------------------------------------------------------------------
| height = -RTln(p_at_h=height)/Mg + RTln(p_at_h=0)/Mg =
| = RT/Mg(ln(p_at_h=0) - ln(p_at_h=height)) =
| = RT/Mg(ln(p_at_h=0/p_at_h=height))
-----------------------------------------------------------------------------
p in Pascals
g = 9.81
R = 8.31
T = temperature in absolute units
M = 28.97
I hope i did it right ;)