sat_vap_press - % pws = saturation vapor pressure (pascals)...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
function pws = sat_vap_press (t_c) % SAT_VAP_PRESS Calculates saturation vapor pressure of water in pascals % Function sat_vap_press calculates the saturation vapor pressure of water % based on input of Celsius temperature. Vapor pressure is calculated with % units of pascals. % % BEE 1510 Introduction to Computer Programming % Laboratory Exercise 2 % Timothy Lin % TA: Celina % % Record of revisions: % original code: September 11, 2008 % last modified: September 15, 2008 % % Reference: Albright, L.D. 1990. Environmental Control for Animals and % Plants. ASAE, St. Josesph, MI. 453 pp. % % Variable Dictionary
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: % pws = saturation vapor pressure (pascals) % T = temperature (Kelvin) % tc = temperature (degrees Celcius) % % Constants % conversion factor from degrees Celcius to Kelvin c_k = 273.15 c % Parameters for temperatures 0 to 200 C A1 = -5.8002206E+3; A2 = 1.3914993; A3 = -48.640239E-3; A4 = 41.764768E-6; A5 = -14.452093E-9; A6 = 0.0; A7 = 6.5459673; A % Convert Celcius temperature to Kelvin T = t_c + c_k T % Calculate saturation vapor pressure pws = exp(A1/T + A2 + A3*T + A4*T^2 + A5*T^3 + A6*T^4 + A7*log(T)); p % function also used later for script file for HW01 % end...
View Full Document

This note was uploaded on 09/28/2009 for the course BEE 1510 taught by Professor Staff during the Fall '05 term at Cornell University (Engineering School).

Ask a homework question - tutors are online