plot isotherms and quality curves on a pressure-enthalpy diagram
PHTChart(fluid, prange, hrange, opts, plotopts)
symbol or string representing the medium
(optional) range of numeric values (optionally with a unit) representing the pressure values to be plotted
(optional) range of numeric values (optionally with a unit) representing the enthalpy values to be plotted
(optional) equations of the form isotherms = value, quality = value, legends = value, or adjustqualityrange = value
(optional) plot options
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 mmHg..1000⁢mmHg.
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 name=low..high or string=low..high, which is interpreted as if the range low..high was given by itself, except the axis label for the (vertical) pressure axis is the left-hand side 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 Jkg.
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 left-hand 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 blue..red or #aa00aa..ColorTools:−Color⁡Lab,70,35,8, 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 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, isotherms=20,green..blue 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 blue..red or #aa00aa..ColorTools:−Color⁡Lab,70,35,8, 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, quality=8,green..blue would specify that there are to be 8 quality curves (at quality 0, 17, ..., 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].
The PHT chart for refrigerant R134a.
For water, we might want to specify the pressure range.
If we want to specify the enthalpy range, we have to specify the pressure range, too.
We can specify that more or fewer isotherms or quality curves should be used.
Or that we would like to see isotherms from a restricted range of temperatures.
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.
Maple will not, by default, space isotherms out in multiples of 40 kelvin. If you want that, you need to specify it manually.
You can also specify the colors. One option is to select a different palette.
Another is to specify the color ranges explicitly.
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.
Bell, Ian H.; Wronski, Jorrit; Quoilin, Sylvain; and Lemort, Vincent. Pure and Pseudo-pure Fluid Thermophysical Property Evaluation and the Open-Source Thermophysical Property Library CoolProp. Industrial & Engineering Chemistry Research, Vol. 53 No. 6 (2014): 2498-2508; http://www.coolprop.org/.
The ThermophysicalData[PHTChart] command was introduced in Maple 2016.
For more information on Maple 2016 changes, see Updates in Maple 2016.
The ThermophysicalData[PHTChart] command was updated in Maple 2017.
The legends option was introduced in Maple 2017.
For more information on Maple 2017 changes, see Updates in Maple 2017.
Download Help Document
What kind of issue would you like to report? (Optional)