ThermophysicalData - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Science and Engineering : ThermophysicalData : ThermophysicalData/PHTChart

ThermophysicalData

  

PHTChart

  

Plot isotherms and quality curves on a pressure-enthalpy diagram

 

Calling Sequence

Parameters

Description

Examples

References

Compatibility

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, 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 will be interpreted as being in pascals), or a range including units of pressure, such as 1..1000mmHg.

  

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 will be 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:-ColorLab,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 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.

• 

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 a range of color specifications (as understood by plot commands), such as blue..red or #aa00aa..ColorTools:-ColorLab,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.

• 

By default, Maple will adjust 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.

• 

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.

• 

One 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

withThermophysicalData:

The PHT chart for refrigerant R134a.

PHTChartR134a

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

PHTChartWater,1000...5.0107Pa

PHTChartWater,pressure=1000...5.0107Pa

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

PHTChartWater,1.106..1.107Pa,2.106..4.106

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

PHTChartR134a,isotherms=25

PHTChartWater,quality=5

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

PHTChartWater,isotherms=350..600

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.

PHTChartWater,isotherms=6,350..600

PHTChartWater,isotherms=350,400,450,500,550,600

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

PHTChartWater,isotherms=360,400,440,480,520,560

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

plots[setcolors]Spring

#78000E,#000E78,#4A7800,#3E578A,#780072,#00786A,#604191,#004A78,#784C00,#91414A,#3E738A,#78003B,#00783F,#914186,#510078,#777800

(1)

PHTChartWater

plots[setcolors]Default

#0074CC,#CC0074,#74CC00,#00CCBE,#5800CC,#4B7EA6,#CC5800,#4BA673,#BE00CC,#CC5800,#CC0028,#00A7CC,#00CC71,#CC5800,#C1CC00,#7FA64B

(2)

Another is to specify the color ranges explicitly.

PHTChartWater,isotherms=red..green,quality=blue..brown

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.

PHTChartWater,isotherms=300,400,500,600,650,700,750,red,green,red,green,red,green,red,quality=0,0.1,0.4,0.7,blue,brown,orange,maroon

References

  

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), pp. 2498--2508; http://www.coolprop.org/.

Compatibility

• 

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

• 

For more information on Maple 2016 changes, see Updates in Maple 2016.

See Also

ThermophysicalData

ThermophysicalData/fluids