
Calling Sequence


PHTChart(fluid)
PHTChart(fluid, prange, hrange, opts, plotopts)


Parameters


fluid



symbol or string representing the medium

prange



(optional) range of numeric values (optionally with a unit) representing the pressure values to be plotted

hrange



(optional) range of numeric values (optionally with a unit) representing the enthalpy values to be plotted

opts



(optional) equations of the form isotherms = value, quality = value, legends = value, or adjustqualityrange = value

plotopts



(optional) plot options





Description


•

The PHTChart function generates a plot of isotherms and quality curves on pressure and enthalpy axes.

•

The fluid argument specifies the fluid. See fluids for information on how to specify a fluid.

•

The pressure range is given by the prange argument. It can be specified as a numeric range (which is interpreted as being in pascals), or a range including units of pressure, such as $1..1000\u27e6\mathrm{mmHg}\u27e7$.


If the pressure range is not specified, the default ranges from a value just above the critical pressure for the given fluid to about a factor 1000 lower pressure.


You can also supply the pressure range as an equation of the form $\mathrm{name}=\mathrm{low}..\mathrm{high}$ or $''string''=\mathrm{low}..\mathrm{high}$, which is interpreted as if the range $\mathrm{low}..\mathrm{high}$ was given by itself, except the axis label for the (vertical) pressure axis is the lefthand side $\mathrm{name}$ or $''string''$.

•

The enthalpy range is given by the hrange argument. Like the pressure range, it can be specified as a numeric range or a range including units of enthalpy. If no unit is given, the default used is $\u27e6\frac{J}{\mathrm{kg}}\u27e7$.


If the enthalpy range is not specified, the default range is selected to include the full width of the quality curves within the given pressure range, with some space to spare.


Like for the pressure range, you can specify the enthalpy range as an equation. The lefthand side string or name is used as the axis label for the (horizontal) enthalpy axis.

•

The isotherms = value option specifies how the isotherms are to be plotted. The value term can take the following forms:

–

If value is a nonnegative integer, it specifies the approximate number of isotherms to be plotted. They are made to approximately cover the range of temperatures that occur in the graph, and such that isotherms correspond to subsequent multiples of 1, 2, or 5 times a power of 10 in the selected unit (by default, kelvin). If this value is not specified, it defaults to 11.

–

If value is a numeric range, possibly with units, or a range of Temperature objects, then it is taken to be the temperature range within which the isotherms are to be plotted. If this value is not specified, its default is the approximate range of temperatures occurring in the conditions in the plot.

–

If value is a list of numeric values (possibly with units) or Temperature objects, then this is taken to be the list of temperatures at which isotherms are to be plotted.

–

If value is a range of color specifications (as understood by plot commands), such as $\mathrm{blue}..\mathrm{red}$ or $''\#aa00aa''..\mathrm{ColorTools}:\mathrm{Color}\left(''Lab''\,\left[70\,35\,8\right]\right)$, then the colors used for the isotherms are taken from this range. If this value is not specified, its default is the range between the first two colors of the currently selected palette (see plots[setcolors]).

–

If value is an equation of the form $\mathrm{unit}=u$, then the unit $u$ is used to label the isotherms in the legend. The value $u$ can also be a Temperature object.

–

If value is a list, but not of the type detailed above, then every entry must be of one of the types listed above. All of these options are then applied. For example, $\mathrm{isotherms}=\left[20\,\mathrm{green}..\mathrm{blue}\right]$ would specify that there are to be about 20 isotherms, in colors ranging from green to blue.


If you supply a list of options, there is one extra type of option you can supply in that list: a list of color specifications. This can only be done reliably if a list of explicit temperatures is also given. In that case, the number of temperatures should be the same as the number of colors, and each isotherm is plotted in the corresponding color.

–

If you supply multiple values that include a unit, either by supplying a list of options or a list of values or even both ends of a range, then each unit needs to be the same.

•

The isotherms keyword can also be spelled as isotherm. If there are multiple color or temperature specifications, the last one will take effect.

•

The quality = value option specifies how the quality curves are to be plotted. The value term can take several forms:

–

If value is a nonnegative integer, it specifies the number of quality curves to be plotted. The quality values for these curves are spread equidistantly over the interval $0..1$.

–

If value is a list of numeric values, they specify the quality values for the quality curves.

–

If value is a range of color specifications (as understood by plot commands), such as $\mathrm{blue}..\mathrm{red}$ or $''\#aa00aa''..\mathrm{ColorTools}:\mathrm{Color}\left(''Lab''\,\left[70\,35\,8\right]\right)$, then the colors used for the quality curves are taken from this range. If this value is not specified, its default is the range between the third and fourth color of the currently selected palette (see plots[setcolors]).

–

If value is a list, but not of the type detailed above, then every entry must be of one of the types listed above. All of these options are then applied. For example, $\mathrm{quality}=\left[8\,\mathrm{green}..\mathrm{blue}\right]$ would specify that there are to be 8 quality curves (at quality $0$, $\frac{1}{7}$, ..., $1$), in colors ranging from green to blue.

•

The quality keyword can also be spelled as qualities. If there are multiple color or quality specifications, the last one will take effect.

•

The legends = value option specifies the curves to include in the legend. By default, the lowest and highest temperature for an isotherm, and the lowest and highest quality value for the quality curves, are listed in the legend for the plot. The value term is a list specifying which of these entries to show.

–

To show no legend, specify legends=[].

–

If you include quality in the legends option, then the entries for quality curves are shown.

–

If you include isotherm in the legends option, then the entries for isotherms are shown.

•

By default, Maple adjusts the pressure range in which the quality values are plotted in order to avoid some plotting artifacts that may arise otherwise, using some rules of thumb. It is, at least theoretically, possible that these rules of thumb fail and result in part of the quality curves not being shown. For this reason, it is possible to disable this mechanism by supplying the option adjustqualityrange = false.

•

You can supply extra plotting options, for example to give a title or to change properties of the axes. (By default, the pressure axis uses logarithmic scaling and the enthalpy axis does not.) These are applied when the plots are combined, using plots[display].



Examples


>

$\mathrm{with}\left(\mathrm{ThermophysicalData}\right)\:$

The PHT chart for refrigerant R134a.
>

$\mathrm{PHTChart}\left(\mathrm{R134a}\right)$

For water, we might want to specify the pressure range.
>

$\mathrm{PHTChart}\left(\mathrm{Water}\,1000...5.0{10}^{7}\mathrm{Unit}\left(\mathrm{Pa}\right)\,\mathrm{legends}=\left['\mathrm{quality}'\right]\right)$

>

$\mathrm{PHTChart}\left(\mathrm{Water}\,\mathrm{pressure}=1000...5.0{10}^{7}\mathrm{Unit}\left(\mathrm{Pa}\right)\right)$

If we want to specify the enthalpy range, we have to specify the pressure range, too.
>

$\mathrm{PHTChart}\left(\mathrm{Water}\,1.{10}^{6}..1.{10}^{7}\mathrm{Unit}\left(\mathrm{Pa}\right)\,2.{10}^{6}..4.{10}^{6}\,\mathrm{legends}=\left[\right]\right)$

We can specify that more or fewer isotherms or quality curves should be used.
>

$\mathrm{PHTChart}\left(\mathrm{R134a}\,\mathrm{isotherms}=25\right)$

>

$\mathrm{PHTChart}\left(\mathrm{Water}\,\mathrm{quality}=5\right)$

Or that we would like to see isotherms from a restricted range of temperatures.
>

$\mathrm{PHTChart}\left(\mathrm{Water}\,\mathrm{isotherms}=350..600\,\mathrm{legends}=\left['\mathrm{quality}'\,'\mathrm{isotherm}'\right]\right)$

This way, Maple still tries to put around 11 isotherms into this range, but maybe we would like one every 50 kelvins. That would mean 6 isotherms. You can specify this a few different ways.
>

$\mathrm{PHTChart}\left(\mathrm{Water}\,\mathrm{isotherms}=\left[6\,350..600\right]\right)$

>

$\mathrm{PHTChart}\left(\mathrm{Water}\,\mathrm{isotherms}=\left[350\,400\,450\,500\,550\,600\right]\,\mathrm{legends}=\left['\mathrm{isotherm}'\right]\right)$

Maple will not, by default, space isotherms out in multiples of 40 kelvin. If you want that, you need to specify it manually.
>

$\mathrm{PHTChart}\left(\mathrm{Water}\,\mathrm{isotherms}=\left[360\,400\,440\,480\,520\,560\right]\right)$

You can also specify the colors. One option is to select a different palette.
>

$\mathrm{plots}\left[\mathrm{setcolors}\right]\left(''Spring''\right)$

$\left[{''\#78000E''}{\,}{''\#000E78''}{\,}{''\#4A7800''}{\,}{''\#3E578A''}{\,}{''\#780072''}{\,}{''\#00786A''}{\,}{''\#604191''}{\,}{''\#004A78''}{\,}{''\#784C00''}{\,}{''\#91414A''}{\,}{''\#3E738A''}{\,}{''\#78003B''}{\,}{''\#00783F''}{\,}{''\#914186''}{\,}{''\#510078''}{\,}{''\#777800''}\right]$
 (1) 
>

$\mathrm{PHTChart}\left(\mathrm{Water}\right)$

>

$\mathrm{plots}\left[\mathrm{setcolors}\right]\left(''Default''\right)$

$\left[{''\#0074CC''}{\,}{''\#CC0074''}{\,}{''\#74CC00''}{\,}{''\#00CCBE''}{\,}{''\#5800CC''}{\,}{''\#4B7EA6''}{\,}{''\#C1CC00''}{\,}{''\#CC004E''}{\,}{''\#0041CC''}{\,}{''\#4BA673''}{\,}{''\#CC7E00''}{\,}{''\#BE00CC''}{\,}{''\#00CC33''}{\,}{''\#00A7CC''}{\,}{''\#9BA64B''}{\,}{''\#4BA6A6''}\right]$
 (2) 
Another is to specify the color ranges explicitly.
>

$\mathrm{PHTChart}\left(\mathrm{Water}\,\mathrm{isotherms}=\mathrm{red}..\mathrm{green}\,\mathrm{quality}=\mathrm{blue}..\mathrm{brown}\right)$

If we want to specify multiple isotherm option values, or multiple quality option values, we need to enclose them in a list. This allows, in particular, specifying particular colors for the quality curves or isotherms.
>

$\mathrm{PHTChart}\left(\mathrm{Water}\,\mathrm{isotherms}=\left[\left[300\,400\,500\,600\,650\,700\,750\right]\,\left[\mathrm{red}\,\mathrm{green}\,\mathrm{red}\,\mathrm{green}\,\mathrm{red}\,\mathrm{green}\,\mathrm{red}\right]\right]\,\mathrm{quality}=\left[\left[0\,0.1\,0.4\,0.7\right]\,\left[\mathrm{blue}\,\mathrm{brown}\,\mathrm{orange}\,\mathrm{maroon}\right]\right]\right)$



References



Bell, Ian H.; Wronski, Jorrit; Quoilin, Sylvain; and Lemort, Vincent. Pure and Pseudopure Fluid Thermophysical Property Evaluation and the OpenSource Thermophysical Property Library CoolProp. Industrial & Engineering Chemistry Research, Vol. 53 No. 6 (2014): 24982508; http://www.coolprop.org/.



Compatibility


•

The ThermophysicalData[PHTChart] command was introduced in Maple 2016.

•

The ThermophysicalData[PHTChart] command was updated in Maple 2017.

•

The legends option was introduced in Maple 2017.



