Showing posts with label density altitude. Show all posts
Showing posts with label density altitude. Show all posts

Sunday, March 1, 2015

HP Prime and TI-84+: Saturation Vapor Pressure, Dew Point, Density Altitude (US Units)

HP Prime and TI-84+:  Saturation Vapor Pressure, Dew Point, Density Altitude (US Units)


The Program AIRUS uses US units as the inputs and outputs:

Input:
T = Temperature in Fahrenheit (°F)
B = Air Pressure in inHg (inches of Mercury)
H = Relative Humidity (%)

You can find these measurements on various weather websites.  Such websites are Accuweather (www.accuweather.com) and Weather Underground (www.wunderunderground.com). 

Output:
S = Saturated Water Vapor (psi)
A = Approximate Actual Density Altitude (DSI) (feet)*
X = Dew Point (°F)

*This is an approximation of density altitude, is an equivalent elevation where the standard atmosphere is met.  (per ICAO, 29.921 inHg, 59°F, 0% humidity).  Let me stress, the density altitude is an approximation.

A list consisting of temperature, air pressure, relative humidity, saturated water vapor, approximate DSI, and dew point is also returned to the home screen.

Equations Used:

Convert Temperature from Fahrenheit to Celsius:
C = (T-32)*5/9

Saturation Vapor Pressure (psi):
S=(610.78*10^((7.5*C)/(C+237.3)))/ 6894.757292318

Dew Point (°C):
W=237.3*V/(1-V) where:

V=(LN(H/100)+((17.27*C)/(237.3+C)))/17.27

Convert from Celsius to Fahrenheit:
X = W*9/5 + 32

Density Altitude (feet):
A=145442.1563*(1-((17.326*B)/(1.8*Z))^.235) where:

Z=(C+273.15)/(1-.378*Y/(33.8639*B))
Y=6.1078*10^((7.5*W)/(237.3+W))

  
HP Prime: AIRUS

EXPORT AIRUS()
BEGIN
// 2015-02-28 EWS
// U.S. Units

LOCAL t,b,h;
LOCAL c,s,d,p,a,v,w;
LOCAL x,y,z;

// Data
INPUT({t,b,h},
"Weather Data",
{"t :","b :","h :"},
{"Temperature (°F)",
"Pressure (inHg)",
"% Relative Humidity"});

// t to Celcius
c:=(t-32)*5/9;

// Saturation Vapor Pressure (Pa)
// wikipedia
s:=610.78*ALOG((7.5*c)/(c+237.3));
// to psi
s:=s/6894.757292318;


// Dew Point (°F)
// ag.arizona.edu
v:=(LN(h/100)+((17.27*c)/(237.3+c)))/17.27;
w:=237.3*v/(1-v);

// w to °F
x:=w*9/5+32;

// Density Altitude
// www.srh.noaa.gov
y:=6.1078*ALOG((7.5*w)/(237.3+w));
z:=(c+273.15)/(1-.378*y/(33.8639*b));
a:=145442.1563*(1-((17.326*b)/
(z*1.8))^.235);


// Output
PRINT();
PRINT("Input:");
PRINT(t+"°F, "+b+"inHg, "+h+"%");
PRINT("Output:");
PRINT("Sat. Water Vapor (psi): "+s);
PRINT("Approx. DSA (ft): "+a);
PRINT("Dew Point (°F): "+x);
RETURN {t,b,h,s,a,x};
END;


TI-84+ AIRUS:

Disp “T: TEMP °F”
Disp “B: PRESSURE (INHG)”
Disp “H: REL. HUMIDITY”
Prompt T,B,H
(T-32)*5/9→C
610.78*10^((7.5C)/(C+237.3))→S
S/6894.757292318→S
(ln(H/100)+((17.27C)/(237.3+C)))/17.27→V
237.3V/(1-V)→W
9W/5+32→X
6.1078*10^((7.5W)/(237.3+W))→Y
(C+273.15)/(1-.378Y/(33.8639B))→Z
145442.1563*(1-((17.326B)/(1.8Z))^.235)→A
Disp “SAT. WATER VAPOR (°F)”
Pause S
Disp “APPROX DSA (FT)”
Pause A
Disp “DEW POINT (°F)”
Pause X
Disp {T,B,H,S,A,X}


Example:

Input:
T = 68°F
B = 29.94 inHg (inches of Mercury)
H = 70%

Output:
S = 0.339111794 psi
A = 790.3879774 feet
W = 57.85583006 °F


Sources:

“Density Altitude” National Weather Resource: Southern Region Headquarters  URL:  http://www.srh.noaa.gov/images/epz/wxcalc/densityAltitude.pdf   Retrieved February 28, 2015

“Density of Air” and “Density Altitude” Wikipedia.  URL:  http://en.wikipedia.org/wiki/Density_of_air , http://en.wikipedia.org/wiki/Density_altitude  Retrieved February 26, 2015

“Dewpoint Formulas” University of Arizona.  URL: http://ag.arizona.edu/azmet/dewpoint.html  Retrieved February 28, 2015

Glover, Thomas J.  “Pocket Ref”  4th Editiion.  Sequoia Publishing, Inc.:  Littleton, CO.  2012  Print
  

This blog is property of Edward Shore - 2015




Sunday, May 19, 2013

HP 35S: Air Density & Density Altitude (Metric-US Conversion Factors included)

HP 35S: Air Density & Density Altitude (7 Digit Accuracy*)

*You can use 4 or 5 digits for the HP 15C and other RPN calculators on which each number takes a step. Slightly less accuracy but smaller program.

Source: Shelquist Engineering web page: http://wahiduddin.net/calc/density_altitude.htm

Formulas

Air Density:

D = P ÷ (R * T)
D = density in kg/m^3
P = pressure in Pascals (Pa)
T = temperature in Kelvins
R = specific gas constant = 287.05 J/(kg*°K)

Air Density Altitude: (where the plane/vehicle thinks it is)
H = 44.3307692 - 42.2665143 * D^0.2349695

H = air density in km

U.S.-SI Conversion Factors
Pressure: (convert and store in P)
1 inHg = 2275.5477799 lb/(ft*s^2) = 3386.3881579 Pa

Temperature Conversion Formula: (convert and store in T)
°K = 5/9 * (°F - 32) + 273.15

Length:
1 km = 3280.8398950 ft

Program
D001 LBL D
D002 INPUT P
D003 287.05
D004 INPUT T
D005 *
D006 ÷
D007 STO D
D008 VIEW D \\ display air density in kg/m^3
D009 0.2349696 \\ dimensionless constant
D010 y^x
D011 42.2665143
D012 *
D013 +/-
D014 44.3307692
D015 +
D016 STO H
D017 RTN \\ display density altitude


I chose to use SI units because the constants are much smaller than the formula would be in US units.

This blog is property of Edward Shore. 2013

Python – Earth’s Radius and Gravity in US Units

Python – Earth’s Radius and Gravity in US Units Introduction The following script, gravus2.py, estimates the Earth’s gravity i...