Contents - Index


PropPlot (Macro Command)

 

The PropPlot command has the following general format:

 

PropPlot FluidName, PlotType N1 P1 P2 .. P_N1 N2 Q1 Q2 .. Q_N2 DoQLines TMin=Tmin TMax=Tmax PMin=Pmin PMax=Pmax  P=Patm  Color1=ColorID  Color2=ColorID  Name='myplot'

 

where

    FluidName is any ideal gas or real gas property name.  Append /EESREFPROP or _RP if the property values are to be obtained from the EES_REFPROP interface.

 

    PlotType is anyone of the following:  TS, TV, TH, TRho, PV,  PH, HS, TP, or PSY.  (PSY is only applicable to AIRH2O;  HS is not available for EES_REFPROP fluids.}

 

    N1 is the number (<=6) of constant property lines in the first group of properties.  The first group is for constant pressure for TS, TH, TV and TRho and constant temperature for PV and PH.  For PSY it is the number of wet bulb lines.

       NOTE:  if N1 is set to 'DEF', the default number of constant property lines for the first group of properties and their values will be provided.  Enter 0 to suppress the lines.

 

    P1..P_N1 are the N1 values of the constant property in group 1

        NOTE: Property values are provided in the specified EES unit system.  See the $ConvertEESREFROPUnits directive for EES_REFPROP fluids. If N1 is DEF or 0, do not provide any values.  

 

    N2 is the number (<=6) of constant property lines in the second group of properties, which is usually specific entropy except for the TS and PSY plots for which it is specific volume. 

       NOTE:  if N2 is set to 'DEF', the default number of constant property lines for the second group of properties and their values will be provided.  If N2=0, no group 2 constant property lines will be displayed.  (N2 should be 0 for EES_REFPROP fluids)

 

    Q1..Q_N2 are the N2 values of the constant property in group 2

 

    DoQLines, TMin, TMax, PMin, PMax, P, Color1, Color2 and Name are optional and they can appear in any order.  Default values will be supplied if these specifications are not provided. 

         DoQLines will draw lines of constant quality on the plot.

         TMin and TMax are the minimum and maximum values of temperature for TS, TV, TH, TRho and PSY plots.  

         PMin and PMax are the minimum and maximum values of pressure for PV and PH plots.

         P is only understood for PSY plots to set the atmospheric pressure.  By default, the psychrometric chart is constructed for standard barometric pressure 101.3 kPa.

         Name is the name that appears on the tab in the plot window.  If Name is provided, it will replace the default value.

         Color1 is the color used for the group 1 constant property lines. ColorID is either an integer between 0 and 16 or a color name as indicated in the following table.

         Color2 is the color used for the group 2 constant property lines. ColorID is either an integer between 0 and 16 or a color name as indicated in the following table.

 

        

 

 

The $RunMacroBefore directive provides a convenient way to construct the plot before solving the equations.  Then additional plots can be superimposed on the property plot.

 

The examples below assume that the unit system has been set with $UnitSystem directive or with the Units macro command as follows:  

Units SI C kPa kJ Mass

 

Example 1

{Create a PH property plot for Ammonia with the default values.} 

PropPlot Ammonia PH 

 

Example 2

{Create a TS property plot for Steam.  Include 5 specified constant pressure lines (in red) and the default constant entropy lines (in blue) and draw lines of constant quality.  Note that the values for the constant pressure  lines can be set with previously defined variables as well as with numerical values.} 

PropPlot Steam TS 5 11000 5300 2100 660 299 DEF DoQLines  TMax=600 Color1=Red Color2=Blue  Name='Steam Plot 1'

 

 

Example 3

The TS, TV and Trho plots provide an option to display lines of constant enthalpy instead of lines of constant volume (on TS plots) or entropy (on TV and Trho) plots.  To display lines of constant enthalpy, follow the number of constant enthalpy lines (in the second grouping) with an H, as in the following example.  (This option is not available for EES_REFPROP fluids.)

 

{Create a TS property plot for Steam.  Include 4 constant pressure lines and 6 blue constant enthalpy lines at the specified values and draw lines of constant quality.  Note that the values for the constant pressure and constant enthalpy lines can be set with previously defined variables as well as with numerical values.} 

PropPlot Steam TS 6 20000 7000 3000 800 200 20 6H 1740 2120 2500 2870 3250 3630 DoQLines Color2=Blue

 

 

Example 4

{Create a Psychrometric chart with wetbulb lines of 10, 15, 20, 35, 30, 35 C and specific volume lines of 0.8, 0.85, 0.90, and 0.95 m3/kg at a total pressure of 101 kPa in Mollier form.  The P=101.3 and Mollier, TMin and TMax are optional.  Note that these values can be specified using previously defined variables.}

PropPlot AirH2O PSY 6 10 15 20 25 30 35 4 0.8 0.85 0.9 0.95  P=101.3 TMin=5  TMax=45  Mollier

 

 

Example 5

{The following example illustrates the use of the PropPlot macro using property data from REFPROP.  This capability requires the EES_REFPROP interface.  Create a PH property plot for propane using REFPROP data through the EES_REFPROP interface.  Include 4 constant temperature lines and draw lines of constant quality   Limit the state used in the plot to pressures between 10 and 1e5 kPa.  Note that the 0 before DoQLines is required. }

PropPlot propane/EESREFPROP PH 4 50 20 -20 -50  DEF DoQLines PMin=10  PMax=1e5

 

 

Example 6

{The following example illustrates the use of the PropPlot macro using property data from REFPROP.  This capability requires the EES_REFPROP interface  Note that the macro command will use the EES unit system for the plot, regardless of whether the $ConvertEESREFPROPUnits directive is present.  Create a TS property plot for R459A using REFPROP data through the EES_REFPROP interface.  Include 6 constant pressure lines and draw lines of constant quality.}

Units SI C kPa kJ mass

PropPlot R459A/EESREFPROP TS 6 0.2 10 100 500 1500 3500 DEF DoQLines

 

 

Example 7

{Create a TV property plot for Steam with the default values and include lines of constant quality. }

PropPlot Steam TV DEF DEF doQLines

 

 

Example 8

{Create a Psychrometric chart with default wetbulb and specific volume lines.} 

PropPlot AirH2O PSY DEF DEF Color1=teal color2=fuchsia

 

 

 

MacroCommands