An
advantage of using Excel is that it is very easy to make plots of your results.
TPX comes with a workbook template which makes creating thermodynamic process
representation plots even easier. In this section, we'll look at how to create
plots using the template TPX_workbook.xlt first, and then how
to do it in any workbook.
In
the TPX folder is a folder labeled Templates, which contains
the template file TPX_workbook.xlt. Open this file to create a new
workbook based on the TPX_workbook template.
TIP: if you place the template TPX_workbook.xlt
in the directory Program Files/Microsoft Office/Templates,
then when you select New Office Document on the
Start menu, or New... from within Excel, TPX_workbook will
be one of the choices. |
A
workbook created with the TPX_workbook template has several chart sheets,
labeled on the tabs on the bottom as shown below.
Each
of these sheets contains a blank process representation plot (T vs. S, etc.),
showing the vapor dome in the current units. An additional sheet labeled Substance
is present also. In order to plot the domes for the correct substance, you need
to enter the substance name or formula where indicated on this sheet. The Substance
sheet also lists the current units.
Suppose
you have generated a table of properties such as shown below. This table of
functions was made using the property calculator, and the column of labels on
the left was added by hand.
To
plot this data, simply select the entire table, including the labels. Then
right-click the mouse to pull up the pop-up menu, and select Add to
Plots. This will cause all property pairs in the table [such as (P,
h), or (h, s)] which correspond to one of the chart sheets in the workbook to
be added to the appropriate chart.
View
the P-H Plot
View the T-S Plot
If
the values in the input cells (blue) are changed, then the table recalculates
and the plots automatically update. Once a plot is created, it can also be
moved from its own sheet onto the current worksheet (as was done on the
worksheet shown on the TPX Home Page).
Actually,
what Add to Plots does is very simple, and can be used to
create arbitrary plots - not just thermodynamic properties.
Add to Plots works only if a rectangular region is selected, with
the first column containing labels for the rows.
It
loops through every pair of labels, and looks to see if there is a chart sheet
which corresponds to those labels. If so, it adds a new data series to the
chart which consists of the two rows from the table. Two rules must be followed
for this to work:
1.
The row labels must consist of a single letter. (Note
that in the table above, "rho" violates this, and thus this row will
not be plotted.)
2.
The charts must be on separate sheets, each labeled
"XY Plot", where "X" and "Y" are arbitrary
letters.
For
example, if you wish to plot "a" vs. "q", simply
create a chart sheet "aq Plot", a data table with an "a"
row and a "q" row, and select Add to Plot.
In
the next section, we will look at the TPX worksheet functions, and how to enter
them directly into the worksheet.