Question: PROBLEM 2 ( 2 5 points ) : The relative humidity, RH , at sea level can be calculated from measured val - ues of

PROBLEM 2(25 points):
The relative humidity, RH, at sea level can be calculated from measured val-
ues of the dry-bulb temperature, T_(db), and the wet-bulb temperature T_(wb) by
(temperatures in degrees Celsius):
RH=(VP)/(SVP)100
where VP is the vapor pressure given by:
VP=e^((16.78T_(wb)-116.9)/(T_(wb)+237.3))-0.066858(1+0.00115T_(wb))(T_(db)-T_(wb))
and VP is the saturated vapor pressure given by:
SVP=e^((16.78T_(db)-116.9)/(T_(db)+237.3))
Write a user-defined function for calculating RH for given T_(db) and T_(wb). For
the function name and arguments, use \deg F. The output argument RH is the relative humidity in
percent (rounded to the nearest integer). Inside the user-defined function
use a subfunction, or an anonymous function to convert the unit of the tem-
perature from Celsius to Fahrenheit. Use the function to determine the rela-
tive humidity for the following conditions:
(a) T_(db)=75\deg F,T_(wb)=69\deg F.
(b) T_(db)=93\deg F,T_(wb)=90\deg F.
Note: the subfunction should convert Fahrenheit to Celsius not Celsius to Fahrenheit.
Note that the exponential portion of the equation for ()/(( V P /)) is the same as that for ()/(( S V P /)) except values of ()/(( T_(w b)/)) instead of ()/(( T_(d b)/)) are substituted in. Use a nested function to calculate ()/(( S V P /)) and the exponential portion of ()/(( V P /).) Also, use a subfunction to convert your input temperatures from Fahrenheit to Celsius

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!