Re-creation of the Psychromteric Chart
Re-creation of the Psychromteric Chart
Saturation Vapor Pressure & Saturation Moisture Content
Saturation Vapor Pressure & Saturation Moisture Content
Begin by determining the saturated moisture content, which depends on the saturated vapor pressure. Also, need to define the pressure level under consideration.
In[]:=
atmPress=101325;(*sealevelpressureinpascals(Pa)*)saturatedVaporPress[t_]:=611.2Exp[(17.67t)/(t+243.5)];(*Clausius-ClapeyronequationinºC,Pa*)
In[]:=
saturatedMoistureContent[t_]:=0.622(saturatedVaporPress[t]/(atmPress-saturatedVaporPress[t]))10^3(*g/kgdryair*)(*The10^3factorattheendconvertsfromkgtog*)
Here, I'm able to plot the saturated moisture content line (RH = 100%), and label the axes.
In[]:=
Labeled[Plot[saturatedMoistureContent[t],{t,0,50},PlotLabels{"RH = 100%"}],{"Dry Bulb Temperature (ºC)","Moisture Content\n (kg/kg dry air)"},{Bottom,Left},RotateLabelTrue]
Out[]=
Moisture Content (kg/kg dry air) | |
| Dry Bulb Temperature (ºC) |
This command plots the relative humidity lines in 10% increments from 10 to 100%.
In[]:=
Labeled[Plot[#saturatedMoistureContent[t]&/@Range[0.1,1,0.1],{t,0,50}],{"Dry Bulb Temperature (ºC)","Moisture Content\n (g/kg dry air)"},{Bottom,Left},RotateLabelTrue]
Out[]=
Moisture Content (g/kg dry air) | |
| Dry Bulb Temperature (ºC) |
Next, I'd like to find a way to label each RH line accordingly…
In[]:=
Plot[#saturatedMoistureContent[t]&/@Range[0.1,1,0.1],{t,0,50},PlotLabels{"10%","20%","30%","40%","50%","60%","70%","80%","90%","100%"}]
Out[]=
Unfortunately, only the first line gets labeled. To begin debugging, let's see what the Map function outputs.
In[]:=
Map[#saturatedMoistureContent[t]&,Range[0.1,1,0.1]]
Out[]=
,,,,,,,,,
38016.6
17.67t
243.5+t
101325-611.2
17.67t
243.5+t
76033.3
17.67t
243.5+t
101325-611.2
17.67t
243.5+t
114050.
17.67t
243.5+t
101325-611.2
17.67t
243.5+t
152067.
17.67t
243.5+t
101325-611.2
17.67t
243.5+t
190083.
17.67t
243.5+t
101325-611.2
17.67t
243.5+t
228100.
17.67t
243.5+t
101325-611.2
17.67t
243.5+t
266116.
17.67t
243.5+t
101325-611.2
17.67t
243.5+t
304133.
17.67t
243.5+t
101325-611.2
17.67t
243.5+t
342150.
17.67t
243.5+t
101325-611.2
17.67t
243.5+t
380166.
17.67t
243.5+t
101325-611.2
17.67t
243.5+t
then wrap the Plot function around the output from it…
In[]:=
Plot,,,,,,,,,,{t,0,50},PlotStyleBlue,PlotLabels{"10%","20%","30%","40%","50%","60%","70%","80%","90%","100%"}
38016.64000000001`
17.67`t
243.5`+t
101325-611.2`
17.67`t
243.5`+t
76033.28000000001`
17.67`t
243.5`+t
101325-611.2`
17.67`t
243.5`+t
114049.92000000003`
17.67`t
243.5`+t
101325-611.2`
17.67`t
243.5`+t
152066.56000000003`
17.67`t
243.5`+t
101325-611.2`
17.67`t
243.5`+t
190083.2`
17.67`t
243.5`+t
101325-611.2`
17.67`t
243.5`+t
228099.84`
17.67`t
243.5`+t
101325-611.2`
17.67`t
243.5`+t
266116.48000000004`
17.67`t
243.5`+t
101325-611.2`
17.67`t
243.5`+t
304133.12000000005`
17.67`t
243.5`+t
101325-611.2`
17.67`t
243.5`+t
342149.76`
17.67`t
243.5`+t
101325-611.2`
17.67`t
243.5`+t
380166.4`
17.67`t
243.5`+t
101325-611.2`
17.67`t
243.5`+t
Out[]=
I'm able to generate the labeled plot.
Next, let's break this down to a limited form, and plot only two lines. Again, I get the same behaviour…
Next, let's break this down to a limited form, and plot only two lines. Again, I get the same behaviour…
In[]:=
Plot[(Map[{#saturatedMoistureContent[t]}&,Range[0.1,0.2,0.1]]),{t,0,50},PlotLabels{"10%","20%"}]
Out[]=
Here's the result of the Map function. It looks like a simplified form of the instance above.
In[]:=
Map[{#saturatedMoistureContent[t]}&,Range[0.1,0.2,0.1]]
Out[]=
,
38016.6
17.67t
243.5+t
101325-611.2
17.67t
243.5+t
76033.3
17.67t
243.5+t
101325-611.2
17.67t
243.5+t
In[]:=
Plot,,{t,0,50},PlotLabels{"10%","20%"}
38016.64000000001`
17.67`t
243.5`+t
101325-611.2`
17.67`t
243.5`+t
76033.28000000001`
17.67`t
243.5`+t
101325-611.2`
17.67`t
243.5`+t
Out[]=
Again, the output I'd expect. What's different if I explicitly plot the results of the Map function versus evaluating the Map inside the Plot?