@Gas User`s Manual - Techware Engineering

@GAS USER’S MANUAL
VERSION 4.0
COPYRIGHT NOTICE
The @Gas software and manual are copyrighted and licensed for use by one user per copy purchased.
This manual and the software described in it are copyrighted with all rights reserved. Under the
copyright laws, this manual or the software may not be copied, in whole or part without written consent
of Techware Engineering Applications, Inc. Techware Engineering Applications, Inc. grants permission
to the purchaser to make a limited number of copies of the add-in for backup purposes only, provided
that the copies are not in use at the same time as the original. Additional reproduction of the software is
a violation of copyright law. Violators will be prosecuted to the fullest extent of the law.
Copyright© 1997, 2002, 2009, 2012
Techware Engineering Applications, Inc.
All rights reserved
TRADEMARKS
The following trademarks are used throughout this manual. They are registered trademarks of the
companies shown.
Lotus®, and 1-2-3® are trademarks of Lotus Development Corporation.
Excel®, Windows®, Visual C/C++® and Visual BASIC® are trademarks of the Microsoft Corporation.
Mathcad® is a trademark of MathSoft, Inc.
TABLE OF CONTENTS
1
2
3
INTRODUCTION................................................................................................................1
1.1
Overview .................................................................................................................1
1.2
What’s New .............................................................................................................2
USING THE @GAS PROPERTY FUNCTIONS .................................................................3
2.1
General Information.................................................................................................3
2.2
Description of @Gas Functions ...............................................................................3
2.2.1
Valid Operating Range ..........................................................................................4
2.2.2
Basic Unit Sets ......................................................................................................5
2.2.3
Gas Composition ...................................................................................................5
2.2.4
Wet or Dry Basis ...................................................................................................6
2.2.5
Reference Conditions ............................................................................................6
2.3
Using @Gas from Excel ..........................................................................................7
2.4
Using @Gas from 1-2-3 ..........................................................................................9
2.5
Using @Gas from Mathcad ................................................................................... 10
2.6
Using @Gas from Visual BASIC ........................................................................... 10
2.7
Using @Gas from C/C++ Windows Programming Languages .............................. 11
2.8
Version and Serial Number ................................................................................... 12
USING DESKTOP GAS CALCULATOR .......................................................................... 13
3.1
Overview ............................................................................................................... 13
3.2
Basic Operation ..................................................................................................... 13
3.3
Entering Data ........................................................................................................ 14
3.4
Unit Selection ........................................................................................................ 15
3.5
Calculating State Points ........................................................................................ 16
3.6
Formatting Property Values ................................................................................... 16
3.7
Labeling and Storing State Points ......................................................................... 17
3.8
Printing .................................................................................................................. 17
3.9
Saving And Opening Data Files ............................................................................ 18
3.10
4
5
6
Advanced Features ............................................................................................... 18
3.10.1
Expansion/Compression Tool .......................................................................... 18
3.10.2
Heating/Cooling Tool ....................................................................................... 19
3.10.3
Exchanging Data with Other Programs............................................................ 20
3.11
Getting Help .......................................................................................................... 20
3.12
Error Messages ..................................................................................................... 21
3.13
Exiting DeskTop Gas ............................................................................................. 21
THEORETICAL BASIS OF @GAS FUNCTIONS ............................................................ 22
4.1
Gas Property Database ......................................................................................... 25
4.2
Computational Model ............................................................................................ 27
4.3
Transport Properties.............................................................................................. 27
4.3.1
Viscosity .............................................................................................................. 27
4.3.2
Thermal Conductivity .......................................................................................... 29
SPEED AND ACCURACY ............................................................................................... 32
5.1
Speed of Calculations ........................................................................................... 32
5.2
Accuracy of Calculations ....................................................................................... 32
REFERENCES................................................................................................................. 49
APPENDIX I DETAILED FUNCTION LISTING ......................................................................... 51
APPENDIX II @GAS ERROR CODES .................................................................................... 75
Chapter 1 - Introduction
Page 1
1
INTRODUCTION
@Gas is a software product that provides thermodynamic and transport properties for mixtures
of moist gases through functions contained in a Windows Dynamic Link Library (DLL). The
@Gas package includes DeskTop Gas, an interactive gas property calculator and various
add-ins which allow the functions to be used as if they were built in to 1-2-3 for Windows,
Microsoft Excel and Mathcad. Programmers can call the functions in the DLL directly from
many Windows programming languages such as Microsoft's Visual Basic, Visual C++ and
Access.
1.1
OVERVIEW
The current library includes the following gases: nitrogen (N2), oxygen (O2), argon (Ar), carbon
dioxide (CO2), and water vapor (H2O). The thermodynamic property functions are calculated
for mixtures of all five gases using an accurate third order virial equation of state. See the
theory and accuracy section of the HTML version of the User’s Manual for an explanation of
how Techware developed the equation of state.
These five gases account for 99.997% of the volumetric composition of standard air and also
account for better than 99.9% of most combustion gases.
The functions are valid over a temperature range from 180 °K, (-136 °F) to 2000 °K, (3140 °F)
and at pressures up to 50 bar (725 psia).
@Gas can be used to calculate the thermodynamic and transport properties of moist air by
calling the functions using the composition of standard air. In some cases, when dealing with
psychrometric properties of air such as relative humidity, wet bulb temperature or degree of
saturation, it may be necessary to use Techware’s @Air add-in which includes functions to
handle these parameters. The two packages use similar equations except that the @Air
program mixes two gases (dry air plus moisture) while the @Gas product mixes five discrete
gases. Nonetheless, the values returned by the @Gas functions when using a mixture
composition corresponding to standard dry air agree quite well with those returned by the @Air
functions. For this reason, the functions from the two programs can be used together as long
as you select consistent unit sets.
Included also in @Gas are functions that calculate the saturated vapor pressure of water and
the enthalpy and entropy of compressed water. These functions are useful in calculations
involving the removal of moisture from gas streams. The saturated vapor functions and the
enthalpy and entropy property values for compressed liquid water are based on the IAPWS
IF97 formulations used to develop the ASME steam tables.
For a complete set of
thermodynamic properties for water and steam use Techware's WinSteam add-in.
@Gas for Windows Version 4.0 - User's Manual
Chapter 1 - Introduction
Page 2
The @Gas package supports 32-bit applications running under Windows 95, 98, NT, 2000, XP
and Vista. The Setup program will try to detect which applications are installed on your system
and offer appropriate options for installation.
The Setup program and the installation instructions contained in the @Gas package guide you
through installing the files you'll need for the applications you expect to use. Example files to
help you get started are also provided.
1.2
32-BIT AND 64-BIT VERSIONS
The @Gas package supports both 32-bit and 64-bit installation files. The installation
instructions you received with the @Gas package will guide you through installing the files
you'll need for the applications you expect to use. Example files to help you get started will
also be installed.
1.3
WHAT’S NEW
@Gas 4.0 adds 64-bit versions of the TGas DLL, the DeskTop Gas calculator and the Excel
add-in. It also has converted all help files to compiled HTML format for compatibility with
newer operating systems.
@Gas 3.2 does not install the help shortcut on the toolbar when using Excel 2007 or later in
order to operate more reliably.
@Gas 3.0 has added many new features over the previous version, @Gas 2.0. These include
the following:
Extends the temperature range upwards from 1300 °K, (1880 °F) to 2000 °K, (3140 °F) and
downward from 273.15 °K (32 °F) to 180 °K (-135.67 °F).
Adds transport property functions:
GasPTXM, which calculates dynamic viscosity given pressure, temperature and gas
composition.
GasPTXK, which calculates thermal conductivity given pressure, temperature gas
composition.
The gas property calculator, now called DeskTop Gas, has been enhanced to include many
new features to make it even more powerful.
Adds five new unit sets: “EngG” which uses psig for pressure instead of psia; “SIF”, which uses
the formal SI units, MPa for pressure instead of bar and °K for temperature, instead of °C;
“SIK” which uses kPa instead of bar for pressure; “MET” which uses the calorie instead of the
joule for energy; and “METF” which uses kg/cm2 for pressure.
@Gas for Windows Version 4.0 - User's Manual
Chapter 2 - Using the @Gas Property Functions
2
2.1
Page 3
USING THE @GAS PROPERTY FUNCTIONS
GENERAL INFORMATION
All applications using the gas property functions use the same set of functions. In most
applications, the functions are called by name. In DeskTop Gas, the appropriate functions are
called automatically according to your on-screen selections.
Each user of spreadsheets or programs you write using the gas property functions, must have
his own copy of @Gas. Any program calling the functions must access the dynamic link library
at run time. Since this file will be called by many applications, it must be installed on the
computer in either the Windows directory or preferably, in the Windows System directory.
Normally, the installation program will set this up for you automatically.
In Excel, 1-2-3, Mathcad, Visual BASIC and your own Windows programs, the functions
provided by @Gas can be used within equations just like each application's built-in math
functions. The functions can even be nested. Each function returns a single, floating point
result. The functions require several inputs to identify the state point, the gas composition and
the unit set. Subsequent sections of this chapter describe the calling syntax and other
considerations in using the functions within supported applications.
2.2
DESCRIPTION OF @GAS FUNCTIONS
All of the @Gas functions, which are accessible to the user, are summarized in the table
below.
Function
Input(s)
Output
Equations of State
GasPTXV()
Pressure, Temperature, Composition
Specific Volume
GasPVXT()
Pressure, Volume, Composition
Dry Bulb Temperature
GasTVXP()
Temperature, Volume, Composition
Pressure
Thermodynamic Property Functions
GasPTXW()
Pressure, Temperature, Composition
Saturated Humidity Ratio
GasPXD()
Pressure, Composition
Dew Point Temperature
GasXMW()
Composition
Molecular weight
GasPTXH()
Pressure, Temperature, Composition
Specific Enthalpy
GasPTXHS()
Pressure, Temperature, Composition
Saturated Enthalpy
GasPHXT()
Pressure, Enthalpy, Composition
Dry Bulb Temperature
GasPTXS()
Pressure, Temperature, Composition
Specific Entropy
GasPTXSS()
Pressure, Temperature, Composition
Saturated Entropy
GasPSXT()
Pressure, Entropy, Composition
Dry Bulb Temperature
GasPTXL()
Pressure, Temperature, Composition
Mass fraction of water condensed
@Gas for Windows Version 4.0 - User's Manual
Chapter 2 - Using @Gas Property Functions
Page 4
Transport Property Functions
GasPTXC()
Pressure, Temperature, Composition
Specific Heat
GasPTXM()
Pressure, Temperature, Composition
Viscosity
GasPTXK()
Pressure, Temperature, Composition
Thermal Conductivity
GasVapTP()
Water Vapor Temperature
Saturated Pressure
GasVapPT()
Water Vapor Press
Saturated Temperature
GasCondPTH()
Pressure, Water Temperature
Specific Enthalpy
GasCondPTS()
Pressure, Water Temperature
Specific Entropy
GasXW()
Composition
Humidity Ratio
GasWX()
Humidity Ratio
Mole fraction of water vapor
GasVer()
None
Version/serial no.
Vapor and Liquid Water Property Function
Miscellaneous Functions
Theoretically, a state point can be uniquely identified by specifying any two thermodynamic
properties and the gas composition. In most practical applications, pressure is one of the
known variables. Most of the functions contained in @Gas assume that pressure is one of the
known variables. If this is not the case, one of the equations of state functions may be used to
obtain the pressure.
You may be familiar with gas property tables in which pressure is not one of the variables.
Typically, the gases are treated as perfect gases in which properties such as enthalpy, entropy
and specific heat are not dependent upon pressure. Treating the gas mixture as a perfect gas
produces only rough approximations of the actual properties. The perfect gas approximations
are reasonable at low pressures but increase in error as the pressure is increased. The
formulations used in @Gas are based on real gas properties and include the effects of
pressure and the mixing of the gases.
A function, GasPTXW, is provided to obtain the saturated humidity ratio for a known pressure
and temperature. The Dry Bulb Temperature at saturation is synonymous with the Dew Point
Temperature. Therefore, this function can be used with a pressure and the Dew Point
Temperature to obtain the moisture content. The inverse of this function is GasPXD, which
returns the Dew Point or Dry Bulb Temperature at which the gas becomes saturated based on
the amount of water vapor in the gas composition.
The function GasPTXHs calculates the enthalpy of the gas mixture saturated with water at a
given pressure and temperature. It is equivalent to calling the GasPTXW function to get the
saturated humidity ratio and then calling the GasPTXH function with the calculated humidity
ratio. A similar function, GasPTXSs is provided for entropy.
2.2.1 Valid Operating Range
The @Gas functions are generally valid over a temperature range from 180 °K, (-136 °F) to
2000 °K, (3140 °F) and at pressures up to 5.0 MPa, (725 psia). The functions detect requests
for calculations outside that range and return an error value.
The valid ranges of some functions depend on the amount of water vapor in the gas
composition. Those functions may, therefore, return out-of-range errors even though pressure
@Gas for Windows Version 4.0 - User's Manual
Chapter 2 - Using the @Gas Property Functions
Page 5
and temperature are within the ranges cited above. When an out-of-range or invalid set of
inputs is used, the add-in functions (i.e., Excel or 1-2-3 add-ins) simply return error values
(#VALUE or #NUM). But, DeskTop Gas produces informative error messages. DeskTop
Gas can be used in conjunction with the add-ins to develop an understanding of what causes
error values in your spreadsheet calculations.
2.2.2 Basic Unit Sets
Input to all the functions and all results can be in any of the available unit sets. @Gas lets the
user select the desired unit set with each function call through the use of an extra function
argument, the unit set parameter. The unit set parameter selects basic units, Eng, SI, etc. and
optional unit set modifiers. The gas property functions within the function library contain the
required conversion factors.
When calling gas property functions from Visual Basic or any other Windows programming
language, the unit set parameter is required and must be an integer value.
Additional flexibility in entering the unit set parameter is available when using the gas property
add-in functions from Excel or 1-2-3. The spreadsheet add-ins allow the unit set parameter to
be entered either as a character string or an integer value. Acceptable character strings are
listed in the row labeled “Unit Set Name” in the table below. Modifiers can also be appended
to these strings as described later in this section. For most users, the character string method
is preferable because the characters representing the unit sets and their options are
mnemonic. For Mathcad, the unit set can only be entered as a number, however, you can
achieve the same effect by defining mnemonics for the base unit sets and the options right on
your Mathcad worksheet
The table below summarizes the units used for each unit set.
Unit Set
English
Unit Set Number 0
Unit Set Name
"ENG"
Temperature
°F
Pressure
Psia
Entropy
Btu/lbm/ °F
Enthalpy
Btu/lbm
Specific Volume ft3/lbm
Specific Heat
Btu/lbm/°F
Viscosity
Lbm/ft-hr
Conductivity
Btu/hr/ft/°F
Humidity Ratio
Non-Dim
Mole Fraction
Non-Dim
Molecular Weight Mass per
mole
SI
Customary
1
"SI"
°C
Bar
kJ/kg/°C
kJ/kg
m3/kg
kJ/kg/°C
Centipoise
Watt/m/°C
Non-Dim
Non-Dim
Mass per
mole
English
Gauge
2
“ENGG”
°F
Psig
Btu/lbm/°F
Btu/lbm
ft3/lbm
Btu/lbm/°F
lbm/ft-hr
Btu/hr/ft/°F
Non-Dim
Non-Dim
Mass per
mole
SI
Formal
3
“SIF”
°K
MPa
kJ/kg/ °C
kJ/kg
m3/kg
kJ/kg/ °K
Pa-sec
Watt/m/°K
Non-Dim
Non-Dim
Mass per
mole
SI kPa
Metric
4
"SIK"
°C
kPa
kJ/kg/°C
kJ/kg
m3/kg
kJ/kg/°C
Centipoise
Watt/m/°C
Non-Dim
Non-Dim
Mass per
mole
5
“MET”
°C
Bar
kcal/kg/°C
kcal/kg
m3/kg
kcal/kg/°C
Centipoise
Watt/m/°C
Non-Dim
Non-Dim
Mass per
mole
Metric
Formal
6
“METF”
°C
kg/cm2
kcal/kg/°C
kcal/kg
m3/kg
kcal/kg/°C
Centipoise
Watt/m/°K
Non-Dim
Non-Dim
Mass per
mole
2.2.3 Gas Composition
The term “Composition” used in the table at the beginning of section 2.2 refers to the gas
composition, which is entered as five sequential variables in the function parameter list. Five
@Gas for Windows Version 4.0 - User's Manual
Chapter 2 - Using @Gas Property Functions
Page 6
values must be entered even if some of the values are zero and they must be in the order N2,
O2, Ar, CO2 and H2O. By default, the value for each gas constituent is entered as a mole
fraction or percent volume on a dry basis. The H2O component is entered as a humidity ratio
(mass of moisture per mass of dry gas). This is the same convention used by ASHRAE to
handle air properties. This convention is useful in some applications where the process
includes heating, cooling, humidification or drying. The gas composition does not change
except perhaps for the quantity of moisture, making it more convenient to express the gas
composition on a dry basis with a humidity ratio. By default, all of the mass-dependent
properties (volume, enthalpy, entropy, specific heat and viscosity) are expressed on a basis of
dry gas. This is also the basis of Techware’s @Air functions, allowing the two add-ins to be
used together.
In other cases where the process may involve combustion, the composition of all the gas
components will change and it is probably more convenient to express the composition on a
wet basis. In this case, all of the gas components, including H2O, are expressed as mole
fractions. This option is enabled by appending “C” to the to the unit set name. For example, if
you are working in English units, you would enter the unit set as “EngC”.
If you prefer to express the gas composition in terms of mass fractions instead of mole
fractions, you may do so by appending “M” to the unit set name. For example the unit set
“EngM” would require the gas composition for N2, O2, Ar and CO2 to be entered as mole
fractions and H2O as a humidity ratio. The unit set “EngCM” would require all five gas
components to be entered as mass fractions.
If you are using the numerical designation for unit sets, you can select the “C” option by adding
32 to the unit set number or the “M” option by adding 64 to the unit set number.
2.2.4 Wet or Dry Basis
All mass-dependent properties (specific volume, enthalpy, entropy, specific heat and viscosity)
can be expressed on either a dry or wet basis. The default for all basic unit sets expresses the
properties per mass of dry gas. This is consistent with ASHRAE conventions and is quite
useful when dealing with processes that involve evaporation or condensation of water vapor.
If you have chosen to express the gas composition on a wet basis (selected the “C” unit set
modifier), you probably want to express the property value on a wet basis as well. You can
accomplish this by adding the letter “W” to the unit set name or adding 16 to the unit set
number. In this case, the properties will be expressed per total mass of the wet gas including
the water vapor. Some of the functions (the “inverse” functions) take per-mass properties as
inputs. Remember that the choice of wet or dry basis affects the property whether it is used as
an input or output parameter.
2.2.5 Reference Conditions
Enthalpy and entropy values are always expressed relative to particular reference conditions.
Many people forget that the values of enthalpy and entropy that are found in published tables
are not absolute values but instead, are relative to particular reference conditions. Engineering
calculations always deal with enthalpy or entropy differences, typically between in-flowing and
out-flowing streams. For this reason, it does not matter what you select as the reference
conditions, as long as you use them consistently. @Gas allows you to select reference
@Gas for Windows Version 4.0 - User's Manual
Chapter 2 - Using the @Gas Property Functions
Page 7
conditions consistent with ASHRAE or an alternate set of conditions based on absolute zero
temperature.
In SI units, ASHRAE uses a reference condition of 0 °C and one atmosphere of pressure for
dry air. For water vapor, ASHRAE uses a reference condition of liquid water at the triple point
temperature of 0.01 °C. In English units, however, ASHRAE uses a reference condition of 0 °F
at one atmosphere of pressure for dry air properties while maintaining the convention of using
the triple point as a reference temperature for water properties. For dry gas, the @Gas
functions use a reference temperature of 0 °F if an English unit set is selected or 0 °C if an SI
or Metric unit set is selected. DeskTop Gas provides more flexibility as described in section 3.
@Gas always references water vapor to the triple point of liquid water.
If you try to convert enthalpy (or entropy) values produced by the functions from English to SI
units simply using standard conversion factors, you will find a difference equal to the difference
in dry gas enthalpy (or entropy) between 0 °F and 32.018 °F. You can avoid this problem by
converting the input parameters (e.g. pressure and temperature) to either English or SI units
before calling the desired @Gas function.
As an alternative, you can set the reference temperature for the dry gas portion to absolute
zero, (0 °K) by adding an “A” to the unit set name or adding 8 to the unit set number. In this
case the 0 °K reference temperature will be used for any of the English or SI unit sets.
Please note that in all cases, the enthalpy and entropy of the water portion are set to zero for
liquid water at the triple point.
Some publications, which are based on perfect gas
assumptions, assign the zero point for enthalpy and entropy to water in the vapor state at the
triple point or some other specified temperature. We believe that setting the zero point for
enthalpy and entropy to water in the liquid state rather than in the vapor state has two major
advantages. First, the values are numerically equivalent to standard international steam tables
(and Techware’s WinSteam product). This facilitates the handling of processes that include
both moist gas and liquid water streams without worrying about reference temperatures.
Second, It greatly simplifies analysis of processes in which water is either condensed from or
evaporated to the gas stream.
All of @Gas’ reference conditions use the International Temperature Scale of 1990 (ITS-90) as
the basis of temperature.
2.3
USING @GAS FROM EXCEL
@Gas 4.0 supports 32-bit and 64-bit versions of Microsoft Excel. If you followed the guidelines
in the Installation Instructions, you should have the proper version of the Excel add-in installed.
Before you can use the @Gas functions in Excel, you have to load the add-in using the Excel
Add-in Manager. The procedure for activating the add-in is slightly different for 32-bit and 64bit versions and so separate instructions are provided.
2.3.1 Loading the @Gas Functions into Excel (32-bit)
Once you have started Excel, use the Tools, Add-ins
(In Office 2007, click the Office button, then click the
Add-ins tab and click the “Go…” button at the bottom.
ins tab by clicking the File menu and then the Options
menu to start Excel’s Add-In Manager.
“Excel Options” button, then select the
In Office 2010, you can get to the Additem.) You should see an item “@Gas
@Gas for Windows Version 4.0 - User's Manual
Chapter 2 - Using @Gas Property Functions
Page 8
for Excel” in the list box (In Office 2007 or later, the item will appears as “@Gas for Excel
2007”.) If you did not find “@Gas for Excel” in the Add-in Manager list box, click the ‘Browse’
button and look for the file XLGas32.xll. It should be in the C:\Program Files\Microsoft
Office\OfficeXX\Library directory, where OfficeXX is the latest Office version installed. When
you find it, click OK. “@Gas for Excel” should now appear in the list box. If you are running
Windows 7, look in the C:\Program Files (x86)\Microsoft Office\OfficeXX\Library directory for
the file.
Click the check box next to “@Gas for Excel” and press ‘OK’. The @Gas copyright notice
should be displayed on the status bar at the bottom of Excel. The @Gas add-in is now loaded
into Excel and will reload every time you start Excel. If you do not want the Add-in to load
each time you start Excel, go back to the Add-in Manager and uncheck the @Gas box before
closing Excel.
Once selected this way using the Add-in Manager, the functions will be loaded automatically,
each time you start Excel. If you wish to unload the functions, use the Add-In Manager and
uncheck the box labeled “@Gas for Excel”. Thereafter, @Gas for Excel will not load until you
select it again using the Add-In Manager as described above.
2.3.2 Loading the @Gas Functions into Excel (64-bit)
Once you have started Excel, click the File Menu, then click the “Options” item, then select the
Add-ins tab and click the “Go…” button at the bottom. Click the ‘Browse’ button and look for
the file XLGas64.xll. It should be in the C:\Program Files\TechwareEng\@Gas directory. When
you find it, click OK. “@Gas for Excel 2010” should now appear in the list box.
Click the check box next to “@Gas for Excel 2010” and press ‘OK’. The @Gas copyright
notice should be displayed on the status bar at the bottom of Excel. The @Gas add-in is now
loaded into Excel and will reload every time you start Excel. If you do not want the Add-in to
load each time you start Excel, go back to the Add-in Manager and uncheck the @Gas box
before closing Excel.
Once selected this way using the Add-in Manager, the functions will be loaded automatically,
each time you start Excel. If you wish to unload the functions, use the Add-In Manager and
uncheck the box labeled “@Gas for Excel 2010”. Thereafter, @Gas for Excel will not load until
you select it again using the Add-In Manager as described above.
2.3.3 Using the @Gas Functions
Once the add-in is loaded, the gas property functions are available in the same ways as
Excel's built-in functions. That is, they can be typed into cell formulas or they can be inserted
using Excel’s Insert Function feature. When using this feature, the gas property functions will
be alphabetically sorted in a function category called “Engineering”. If you need help, click
“Help for Excel Add-in” in the TechwareEng\@Gas program group on the Start Menu. This will
launch an interactive help window, which provides information regarding the functions and their
usage.
Generally, you can use any of the functions listed in section 2.2 in any cell formula. Be sure to
prefix the function name with an "=" character if it is the first or only item in a formula. The line
below presents an example of a call to a gas property function from Excel:
=GasPTXH(a1,b1,c1,d1,e1,f1,g1,”SI”)
@Gas for Windows Version 4.0 - User's Manual
Chapter 2 - Using the @Gas Property Functions
Page 9
The argument "a1" is for the gas pressure and can be a cell reference or an actual pressure
value. In a similar manner, "b1" is for temperature and "c1" through "g1" are for the gas
composition. The last argument selects the units set and any options.
The @Gas package includes a sample Excel spreadsheet file named EXAMPLE.XLS which
illustrates use of the gas property functions. You can find this file in a “Samples” folder in the
@Gas program folder.
Since the @Gas property functions make many floating-point calculations, they can add to a
spreadsheet's recalculation time. You may find it desirable to set the spreadsheet to manual
recalculation rather than automatic.
2.4
USING @GAS FROM 1-2-3
@Gas works with 32-bit versions of 1-2-3 including 1-2-3 97 and 1-2-3 Millennium. You must
load the add-in file named 123GAS.12A to access the gas property functions from 1-2-3.
When the add-in is loaded into memory it establishes links between 1-2-3 and the @Gas
dynamic link library.
Use the File / Add-Ins / Manage Add-ins menu selections to start the Add-In Manager. Before
you can use the @Gas add-in for the first time, you must register the add-in by pressing the
Add-In Manager’s 'Register' push-button. If installed using the default values, the file
123GAS.12A should be in the \LOTUS\123\ADDINS directory and will be shown in the
Register Add-Ins window. If you installed the file elsewhere, you will have to use the 'Look in'
window to search for the file. When you have located the 123GAS.12A file, select it and press
the 'Open' push-button. The add-in is now registered.
To load the add-in after it is registered, click on the path name that has the 123GAS.12A file.
A check mark will appear to the left of the path name indicating that the add-in is selected.
Press the 'Done' push-button to complete the task.
Thereafter, each time you start 1-2-3, the functions will be loaded automatically. If you wish to
unload the functions, use the Add-In manager to deselect the add-in. From there forward, the
123GAS.12A add-in will not load until you select it again using the Add-In Manager as
described above but it should be unnecessary to go through the registration process again.
Once the add-in is loaded, the gas property functions can be used in any cell formula by typing
the function name in the same ways as 1-2-3's built-in functions. If you need help, click “Help
for 123 Add-in” in the TechwareEng\@Gas program group on the Start Menu. This will launch
an interactive help window, which provides information regarding the functions and their
usage.
When the add-in is loaded, the gas property functions are available in the same ways as 1-23's built-in functions. That is, they can be typed directly into cell formulas. Generally, you can
use any of the functions listed in section 2.2 in any cell formula simply by prefixing the function
name with an "@" character. The @Gas package contains a sample 1-2-3 spreadsheet file
named EXAMPLE.123 which makes several typical calls to the gas property functions.
@Gas for Windows Version 4.0 - User's Manual
Chapter 2 - Using @Gas Property Functions
Page 10
The line below presents an example of a call to a gas property function from 1-2-3:
@GasPTXH(a1,b1,c1,d1,e1,f1,g1,”SI”)
The argument "a1" is for the gas pressure and can be a cell reference or an actual pressure
value. In a similar manner, "b1" is for temperature and "c1" through "g1" are for the gas
composition. The last argument selects the units set and any options.
This syntax actually calls an add-in function in the 123GAS.12A add-in. These add-in
functions perform error checking and return an appropriate 1-2-3 error value (e.g., ERR) when
necessary - typically when input arguments are out of range or when too many arguments are
supplied to the function. 1-2-3 will not accept a cell formula that contains a function reference
with too few input arguments. The 123GAS add-in functions themselves call functions in
TGAS32.DLL to actually perform the calculations.
2.5
USING @GAS FROM MATHCAD
The @Gas add-in for Mathcad is a self-registering DLL. All that is required for Mathcad to
access the functions is that the add-in file, MDCGAS32.DLL, be located in the
MATHCAD\USEREFI directory.
Whenever an @Gas function is used, Mathcad will
automatically load and register the function.
The @Gas add-in for Mathcad allows the use of any of the unit sets. Mathcad, however,
allows only pure numbers (without units) to be passed to and from user defined functions. The
last argument in each function call is the unit set designator and can have a value from 0 to
127 depending upon the selection of base unit set and the unit set options. The other
arguments to the function must be numbers without units whose values are consistent with the
selected unit set.
The @Gas package contains a sample Mathcad file named EXAMPLE.MCD, which makes
typical calls to the gas property functions and illustrates the use of the unit set designator.
Although on-line help for @Gas is not directly available from within Mathcad, the Choose
function feature does recognize the @Gas functions and assists user with the functions. Use
the Math / Choose Function menu selections to open the Choose Function window. Scroll
down the 'Function name is' box to find all of the gas functions listed in alphabetical order. The
'Returns' box will describe the input arguments and the return value for the function that is
selected. Pressing the 'Insert' push-button will copy the function to your worksheet with
placeholders for each function argument.
2.6
USING @GAS FROM VISUAL BASIC
The gas property functions can be used directly in your Visual Basic programs just like the
built-in functions. Before the functions can be used, however, they must be declared as
functions and Visual BASIC must be told where to find them. This can all be accomplished by
including a DECLARE statement for each of the gas property functions in either the Form code
or in the Global code. The DECLARE statement must include the name of the function, the
dynamic link library where it can be found (TGAS32.DLL) and the list of arguments (which
must all be passed by value, 'ByVal'). A sample DECLARE statement follows:
@Gas for Windows Version 4.0 - User's Manual
Chapter 2 - Using the @Gas Property Functions
Page 11
Declare Function GasPTXH Lib "TGAS32.DLL" (ByVal P As Double, ByVal T As
Double, ByVal N2 As Double, ByVal O2 As Double, ByVal Ar As Double, ByVal
CO2 As Double, ByVal H2O As Double, ByVal Unitset As Integer) As Double
If you are using a 64-bit version of Office, the DLL name is “TGas64.dll” instead of “TGas32.dll”
and you must include the keyword “PtrSafe” after “Declare”, for example:
Declare PtrSafe Function GasPTXH Lib "TGAS64.DLL" (ByVal P As Double,
ByVal T As Double, ByVal N2 As Double, ByVal O2 As Double, ByVal Ar As
Double, ByVal CO2 As Double, ByVal H2O As Double, ByVal Unitset As
Integer) As Double
A text file, TGASVBDEC.TXT, which lists declarations for all of the @Gas functions is copied
to a “Programming” folder in the @Gas program folder if the “Programming” option was
selected during installation.
If you are using the @Gas functions in an Excel Visual Basic module to create additional
functions, you should use a different name to declare the functions or they will conflict with the
functions in the Xlgas32.xll add-in. In this case, you must use the ALIAS keyword in the
declaration to identify the true name in the DLL. For example,
Declare Function MyGasPTXH Lib "TGAS32.DLL" ALIAS "GasPTXH" (ByVal P
As Double, ByVal T As Double, ByVal N2 As Double, ByVal O2 As Double,
ByVal AR As Double, ByVal CO2 As Double, ByVal H2O As Double, ByVal
Unitset As Integer) As Double
If you are using a 64-bit version of Office, the DLL name is “TGas64.dll” instead of “TGas32.dll”
and you must include the keyword “PtrSafe” after “Declare”, for example:
Declare PtrSafe Function MyGasPTXH Lib "TGAS64.DLL" ALIAS "GasPTXH"
(ByVal P As Double, ByVal T As Double, ByVal N2 As Double, ByVal O2 As
Double, ByVal AR As Double, ByVal CO2 As Double, ByVal H2O As Double,
ByVal Unitset As Integer) As Double
A text file, TGASVBADEC.TXT, which lists declarations for all of the @Gas functions is copied
to a “Programming” folder in the @Gas program folder if the “Programming” option was
selected during installation.
With each TGAS32 function call, your code should check to ensure that the values returned
are greater than -1000. Return values of less than -1000 indicate error conditions. See the
Appendix for a listing of error codes and their meanings.
2.7
USING @GAS FROM C/C++ WINDOWS PROGRAMMING LANGUAGES
The gas property functions in TGAS32.DLL or TGAS64.DLLcan also be called from within
C/C++ programs compiled to run under Windows. Prototypes for all functions are provided in
the file named 'GASPROTO.H'. All files needed to support your programming applications can
be found in the “Programming” folder if you choose to install programming support during
installation. You may also find it convenient to include the file named 'GASERR.H'. It defines
mnemonic constants for the various error values returned by the gas functions. The compiled
code should also be linked with the import library named ‘TGAS32.LIB’ or ‘TGAS64.LIB’.
@Gas for Windows Version 4.0 - User's Manual
Chapter 2 - Using @Gas Property Functions
Page 12
With each gas property function call, your code should check to ensure that the values
returned are greater than -1000. Return values of -1000 or smaller indicate error conditions.
See the Appendix for a listing of error codes and their meanings.
2.8
VERSION AND SERIAL NUMBER
There may be new releases of @Gas to add features or to support new applications. Each
new release of @Gas will have a version number. Every copy of @Gas sold also has a
unique serial number. You can identify the version of the DLL and serial number of your copy
by using the GasVer function, which takes no arguments. In Excel, an empty pair of
parentheses is needed. In 1-2-3 no parentheses are needed. The GasVer function returns a
floating-point number containing the information (e.g., 4.081234). The first two digits indicate
the DLL version number. The next five digits make up your copy's serial number.
The serial number also can be found by selecting ‘About’ on the Help menu of DeskTop Gas.
@Gas for Windows Version 4.0 - User's Manual
Chapter 3 - Using DeskTop Gas Calculator
3
3.1
Page 13
USING DESKTOP GAS CALCULATOR
OVERVIEW
DeskTop Gas is a Windows application, which calculates the thermodynamic and transport
properties of a mixture of moist gases. It can be used as an interactive replacement for gas
property tables but does much more than that. It automatically calculates all unknown
properties when a state point is defined by known properties. The program is flexible, and
designed to minimize keystrokes for common calculations. DeskTop Gas allows you to enter
any number of state points, label them and store the collection of points for later reference.
You can print a table of stored points or copy them to the clipboard and paste them into your
favorite spreadsheet or word processor.
Major features of this program include:
o
o
o
o
o
o
validity over @Gas’s full range of pressures and temperatures
flexible interactive design
large choice of units for each property
tools for heating, cooling, expansion and compression processes
instant response time
extensive help screens
If installed properly, DeskTop Gas is started by simply double clicking on its name/icon in the
@Gas subgroup of the TechwareEng Group appearing on the Windows Start Menu.
3.2
BASIC OPERATION
The DeskTop Gas display is arranged in a tabular format that remains constant although the
program window can be re-sized. You may sometimes find it convenient to make the program
window smaller. Each of the rows in the top section is dedicated to one of the gas properties
(pressure, temperature, specific volume, enthalpy, entropy, specific heat, dynamic viscosity,
thermal conductivity and dew point temperature. Each of the rows in the “Gas Composition”
section shows the fraction of one of the individual gasses as well as the humidity ratio and
molecular weight of the mixture. There is a column that displays the property values for the
active point and a column that displays data for one of the stored points.
The key properties that can be used to define the gas state point are: pressure, temperature,
specific volume, enthalpy, entropy, and the gas composition. Theoretically, a state point can
be uniquely identified by specifying the gas composition and any two of the other five
properties. In most practical applications, pressure is usually one of the known variables.
Most of the calculations require that the pressure be known. In the rare case when pressure is
not known, it can be calculated from the equation of state if the dry bulb temperature and
specific volume are known.
@Gas for Windows Version 4.0 - User's Manual
Chapter 3 - Using DeskTop Gas Calculator
Page 14
Each of the key properties has a check box associated with it. When checked, it signifies that
this property is to be used in calculating the state point. In general, two thermodynamic
properties and the gas composition must be selected before DeskTop Gas will allow a
computation. If pressure and temperature are selected, DeskTop Gas can compute the gas
properties in the state that is saturated with water vapor. In these cases, you will notice that
the ‘Compute Saturated’ button is enabled. Once you select one property, DeskTop Gas will
disable all the other check boxes whose properties are not allowed in combination with the first
selected property. You may change your selections by un-checking one or all of the check
boxes and selecting a new combination.
To compute a gas property state point, begin by entering the gas composition in the lower half
of the calculator. If you wish to use the composition for standard dry air, press the button
labeled “Set to Standard Dry Air”. Note the label in the units column next to each gas
component. It indicates the basis of the gas composition. Initially, the label should indicate
“Vol frac Dry”, which means that the gas composition is entered as a volume or mole fraction
on a dry basis. Note that the value for water vapor is zero and the box is read only. This
ensures that you can only enter water vapor as a humidity ratio. If you want to enter the
composition on a wet basis, press the button labeled “Change to Wet Composition”. Now you
will find that the humidity ratio is read only and water vapor box is enabled. If you want to
enter the composition as mass fractions instead of mole fractions, press the button labeled
“Change to Mass Fraction”. The other button in the gas composition section resets the gas
composition to all zeros.
If you want the mass-dependent properties to be expressed on a wet basis instead of a dry
basis, press the button labeled “Change to per Wet Mass”.
Next, select the input properties by selecting the corresponding check boxes as described
above. Enter values for those properties in the boxes to the right of the property names. (The
next section describes various methods for entering data.) When you enter a value for any of
the key properties, a red “X” appears next to the property value to indicate that a new value
has been entered. This is a warning that the value being displayed is not consistent with the
current state point. After a compute command is completed successfully, all property values
are recalculated and the red “X’s” are cleared.
Be sure to enter the values in units consistent with the unit displayed to the right of the value
box. If you wish to change units, select the desired units before entering the value. If you
change units after the value is entered, the value entered will be converted to the new units.
Next, click the 'Compute' button to find all the unknown properties. If the ‘Compute’ button is
grayed, you have not checked enough properties to define the state point. Fields without
check boxes are output only. These include specific heat, viscosity and thermal conductivity
and dew point. After recalculation, all fields contain property values for the gas mixture at a
particular state point.
3.3
ENTERING DATA
Numeric data is entered in a specially designed edit box called an IO Box, which behaves like
a standard Windows edit box but includes some additional features. To enter new data,
double click the IO Box and all the data will be highlighted. As you enter new data, the old
data will be replaced. To edit data, hold the left mouse button down and drag the mouse over
@Gas for Windows Version 4.0 - User's Manual
Chapter 3 - Using DeskTop Gas Calculator
Page 15
the characters that you wish to replace, thereby highlighting them. Release the mouse button
and type new characters to replace the highlighted ones.
The IO Box has two modes of operation, input and output. When new data is entered, the IO
Box is placed in the input mode and a red X appears to the left of the box. After a new state
point is computed, all IO Boxes are placed in the output mode and the red X’s are removed.
The IO Box accepts either numerical values or arithmetic expressions that can be evaluated to
a numeric value. A number can be entered in either decimal or scientific notation. The
expression can be any valid arithmetic expression using the following operators:
+
*
/
^
()
add
subtract
multiply
divide
exponent
parentheses
Arithmetic calculations can be nested to any level using parentheses. An example of a valid
expression is:
((1004^2 + 997^2) / 2)^.5
which evaluates to 1000.506.
Expressions are evaluated whenever you tab to or click on another control or press the ‘Enter’
button. Only the resulting value is shown in the box. If you enter an incorrect expression, your
computer will beep and the edit cursor will highlight the offending character. You must fix the
error before DeskTop Gas will allow you to continue.
If the expression you are entering is too long to fit in the box, the box will temporarily increase
in length so that you may view more of the expression. When you are finished editing, the box
returns to its original length.
To recall the last expression used in an input box, use the 'Recall Expression' command on the
'Edit' menu. You’ll then have the opportunity to edit the expression and let the IO Box reevaluate it. Note that the box retains the last number or expression entered even after a
compute command is issued. As a result, the value in the box will not reflect the value of the
recalled expression if a compute command has altered the value.
You may use the ‘Cut’, 'Copy' and 'Paste' commands on the 'Edit' menu or the toolbar to
exchange numeric data between DeskTop Gas’ IO Boxes and any other application that
supports the clipboard. If you start entering data in an IO Box and wish to go back to the
original data you may use the 'Undo' command on the 'Edit' menu. However, once the IO Box
loses the focus, the 'Undo' command is no longer available.
3.4
UNIT SELECTION
DeskTop Gas allows you to use any combination of units for input and output properties. The
units for each property can be set independently by using its associated combo box. To
change a unit, select its combo box and scroll through the list of available units using either the
@Gas for Windows Version 4.0 - User's Manual
Chapter 3 - Using DeskTop Gas Calculator
Page 16
keyboard cursor arrows or the mouse. Whenever a new unit is selected, the program converts
the values displayed for that property to the new units. Therefore, when entering data you
should first select the units and then key in the input values. Otherwise, the values will be
converted to the new units and you will have to re-enter them.
The first time the program is started, the properties will be displayed in SI units. You can
change all of the units to either standard English or SI units by issuing the 'English Units' or 'SI
Units' command from the 'Format' menu or pressing the ‘Eng’ or ‘SI’ toolbar button. When you
change to English units in this manner, the reference temperature for the dry gas is changed to
0 °F. Similarly, when changing to SI units, the reference temperature is changed to 0 °C.
If you change the units one at a time, the reference temperature will not change, even if you
change all of the units from English to SI units. You can force a change in the reference
temperature by pressing the ‘Ref’ button on the toolbar or by selecting ‘Options’ from the
‘Tools’ menu and then choosing the ‘Reference Point’ tab. From either of the dialog boxes,
you will be able to select the desired reference temperature.
You may choose any combination of available units for your personal default unit set. Simply
select the units you desire for each property and issue the 'Use Settings as Default' command
from the 'Format' menu. The next time you start DeskTop Gas, your default unit set will be
used.
If you change units and then save a file, those selected units will be restored whenever the file
is opened. If you wish to change the units back to your default unit set, issue the command
'Restore Default Settings' from the 'Format' menu.
Unit system changes in DeskTop Gas do not affect use of @Gas from any other applications
(e.g., Excel, 1-2-3, etc.).
3.5
CALCULATING STATE POINTS
When you have finished entering values for the selected input variables, click the on-screen
button labeled 'Compute' to calculate all of the state point properties. If the 'Compute' button is
grayed, you have not checked enough properties to define the state point.
You may also compute the state point by pressing the 'Enter' key on your keyboard. Note that
the 'Enter' key serves two purposes in DeskTop Gas. Pressing the 'Enter' key just after
entering data in an IO Box, tells DeskTop Gas to evaluate the expression in the IO Box.
Pressing the 'Enter' key a second time tells DeskTop Gas to compute the state point. If you
move the focus to any other control after entering data in an IO Box, the expression is
evaluated automatically and you only have to press the 'Enter' key only once to compute the
state point. The ‘Enter’ key will not compute a state point if the ‘Compute’ button is grayed.
3.6
FORMATTING PROPERTY VALUES
DeskTop Gas normally displays all property values in fixed decimal notation. You may
increase or decrease the number of decimal places in a selected property IO Box by selecting
‘Add Decimal Places’ or ‘Decrease Decimal Places’ from the ‘Format’ menu or by clicking
either of the
toolbar buttons, respectively.
@Gas for Windows Version 4.0 - User's Manual
Chapter 3 - Using DeskTop Gas Calculator
Page 17
If you wish to change the selected property to scientific notation, select the 'Scientific Notation'
command from the ‘Format' menu or press the ‘EE’ toolbar button. The ‘Format’ menu many
be used to change the number format to 'Fixed Decimal' or 'Percent' as well. Corresponding
toolbar buttons are ‘Fix’ and ‘%’ respectively. Of course, the percent format only makes sense
for the non-dimensional properties.
The formatting commands are only enabled when the focus is on an IO Box.
3.7
LABELING AND STORING STATE POINTS
DeskTop Gas gives you the option of labeling and storing any number of state points for future
reference. After computing the state point, DeskTop Gas will automatically suggest a unique
name for the new state point such as “Point 1” or “Point 2”, but you will probably want to enter
something more descriptive. Just enter a new name in the Point Label box.
To store this point, press the 'Store Point' button. (The Store button will not be enabled if the
displayed data is not a correctly calculated state point.) DeskTop Gas requires all stored points
to have a unique label. If you try to store two points with the same label, DeskTop Gas will
query whether you wish to replace the stored point, which has the same label, with the current
point. If not, you should rename the point and try to store it again.
After storing the point, the state point values for the active point will be copied into a storage
array and given the name you selected. The point will be displayed in the stored points
column in same units as the active point. After a state point is stored, its name is added to the
point name combo box in the upper right hand corner of the main window. You can view a
stored point by pressing the arrow on the point name combo box and selecting a point from the
drop down list.
If you wish to use a stored point with any of the special tools or as the basis for calculating a
new point, you must recall the stored point to the active point. Begin by selecting the point
from the point name combo box’s dropdown list. Next, press the ‘Recall Point’ button to copy
the stored point to the active point. You may now use the active point for new calculations. If
you change any input data and press 'Compute', the active point will be changed but the stored
point from which you copied the values will remain intact.
You can delete a stored point by first selecting it from the Point Name combo box and then
select 'Delete Point' from the 'Edit' menu.
This collection of state points can be saved as a DeskTop Gas file. In addition, you can copy
state points to the clipboard, where they can be transferred to another application such as a
spreadsheet program or word processor.
3.8
PRINTING
You can print a table consisting of all of the stored points by selecting the Print command from
either the file menu or the toolbar. The tables will include a column for each of the stored
points with each of its properties listed in a row. A label for each row includes the property
name and the current units selected. The printing utility will attempt to fit as many points on a
page as possible, based on the paper size and orientation that you specify using the ‘Print
@Gas for Windows Version 4.0 - User's Manual
Chapter 3 - Using DeskTop Gas Calculator
Page 18
Setup’ command. You can preview the output by selecting the ‘Print Preview’ command from
the ‘File’ menu.
3.9
SAVING AND OPENING DATA FILES
When you start DeskTop Gas or open a new file, it will be untitled. You may save a collection
of stored state points along with your selections of units and formats to a DeskTop Gas file.
Select 'Save' from the 'File' menu or click the disk icon on the toolbar, which will open the
“Save As” dialog box. You should enter a name for the file; the file extension “.gas” will be
added automatically. You may choose a folder in which to save the file or accept the default
folder.
If you have saved the file at least one time during the session, you can save the work under a
different filename by choosing the ‘Save As’ command from the ‘File’ menu.
To open a saved file, select 'Open' from the 'File' menu or click the open file icon on the
toolbar. This will open a dialog box that lists all of your DeskTop Gas data files in the current
folder. You may select a different folder to view other files. Select the file you want to open
and press the ‘Open’ button to load the file.
To start a new file, select the 'New' button from the Toolbar. If you have stored any points and
have not saved the file, you will be prompted to do so.
3.10 ADVANCED FEATURES
DeskTop Gas includes special tools that facilitate the calculation of some common gas
processes. These tools include an Expansion/Compression tool and a Heating/Cooling tool.
3.10.1 Expansion/Compression Tool
The Expansion/Compression tool is used to evaluate performance of a gas turbine or an gas
compressor. If you are predicting the performance and know the efficiency of the turbine or
compressor, the tool can be used to calculate the state point conditions at the expansion or
compression end point. If you are analyzing the performance of a turbine or compressor and
know the conditions at the end point, the tool can be used to calculate the efficiency. The tool
also computes the energy converted to shaft work generated by the turbine or used by the
compressor.
To use the tool, first select the active state point representing the start of the expansion or
compression path. Next, select 'Expand/Compress' from the 'Tools' menu or click the turbine
icon on the toolbar, which will open the Expansion/Compression tool dialog box.
In the tool dialog box, select the conditions you will use to compute the end point from the
combo box near the top of the screen. Select “Pressure & Efficiency” if you know the pressure
and efficiency. If you are checking an actual machine you will need to know the exiting gas
temperature or enthalpy. Check either the “Pressure, Enthalpy” or Pressure, Temperature”
buttons as required. The two variables you have chosen will have their value fields enabled;
all others will be grayed. Enter the appropriate values and click the 'Compute' button.
@Gas for Windows Version 4.0 - User's Manual
Chapter 3 - Using DeskTop Gas Calculator
Page 19
The “Gas Flow In” column displays the state point properties entering the equipment, which
were copied from the active point. The “Total Flow Out” box has three columns that display
the state point properties at the end of the expansion. The first column identifies the
thermodynamic properties for the moist gas mixture and liquid water (if any) exiting the
equipment. The second column displays the thermodynamic properties for the moist gas
exiting and the third column shows the properties for the liquid water if any condensation
occurs. The units displayed are those currently in use on DeskTop Gas’ main window. If you
wish to use different units, you should select those units on the main window before opening
the expansion tool.
Below the state point properties, you will find the shaft power based on the entering gas flow
rate that you entered. The units for these results will be consistent with your input units.
You may change any of the data and repeat the calculation as required. When you are
satisfied with the result, you may copy that state point back to the active point on DeskTop
Gas’ main window by pressing the 'Close and Copy to Current Point' button. Note that the
values of moist gas in the second column will be copied back to the active point. If no
condensation has occurred, these values will be the same as in the first column labeled
mixture. If condensation has occurred, then the values in the second column will be at
saturated conditions.
If you do not wish to replace the current point on the main window with the expansion end
point calculated, just press the 'Cancel' button.
3.10.2 Heating/Cooling Tool
The Heating/Cooling tool is used to analyze a gas stream in which heat is either added or
removed. If you know the quantity of heat that is being added to or removed from the gas
stream, you can use the tool to calculate the resulting state point temperature and other
conditions. If you know the temperature or enthalpy of the gas leaving the heating or cooling
device, you can use the tool to calculate the quantity of heat exchanged.
To use the tool, first make sure that the active state point represents the conditions of the gas
entering the heating or cooling device. Next, select 'Heat/Cool' from the 'Tools' menu or click
the flame icon on the toolbar, which will open the Heating/Cooling tool dialog box.
In the tool dialog box, select the conditions you will use to compute the end point from the
combo box near the top of the screen. Select “Pressure, Heat Flow” if you know the pressure
and heat added or removed. If you are measuring performance on an existing device you will
need to know the exiting gas temperature or enthalpy. Check either of the “Pressure,
Enthalpy” or “Pressure, Temperature” buttons as required. The two variables you have chosen
will have their value fields enabled; all others will be grayed. Enter the appropriate values and
click the 'Compute' button.
The “Gas Flow In” column displays the state point properties entering the equipment, which
were copied from the Active Point in the main screen window. The “Total Flow Out” box has
three columns that display the state point properties at the end of the expansion. The first
column identifies the thermodynamic properties for the mixture of moist gas and liquid water
exiting the equipment. The second column displays the thermodynamic properties for the
moist gas exiting and the third column shows the properties for the liquid water if any
condensation occurs. The units displayed are those currently in use on DeskTop Gas’s main
@Gas for Windows Version 4.0 - User's Manual
Chapter 3 - Using DeskTop Gas Calculator
Page 20
window. If you wish to use different units, you should select those units on the main window
before opening the Heating/Cooling tool.
Below the state point properties, you will find the heat added based on the entering gas flow
rate that you entered. The units for these results will be consistent with your input units.
You may change any of the data and repeat the calculation as required. When you are
satisfied with the result, you may copy that state point back to the Active Point on DeskTop
Gas’ main window by pressing the 'Close and Copy to Current Point' button. Note that the
values for moist gas in the second column will be copied back to the active point. If no
condensation has occurred, these values will be the same as in the first column labeled
mixture. If condensation has occurred, then the values in the second column will be at
saturated conditions.
If you do not wish to replace the Active Point on the main window with the heating/cooling state
point calculated, just press the 'Cancel' button.
3.10.3 Exchanging Data with Other Programs
DeskTop Gas includes two ways to share data with other applications running on your PC
such as Excel. Both methods use the Windows clipboard.
In the first data sharing method, DeskTop Gas' 'Edit / Copy' command copies whatever text is
highlighted in an IO Box (e.g., a number or part of a number) to the Windows clipboard. From
there, that text can be pasted into other applications running on your PC. This is typically done
using those applications’ 'Edit / Paste' command).
The second data sharing method also places text on the clipboard but uses an extended
format that is especially useful for calculations involving gas properties. This method is
accessed using the 'Copy Point' command on the 'Edit' menu. Regardless of whether any text
is selected, this command copies a table of text values to the clipboard using either the Active
Point or all of the stored points. The table includes one column for each point. You can
optionally direct DeskTop Gas to also include property and unit labels in which case they
appear as the first column in the table. The table includes one row for each property in the
same order as they are displayed on DeskTop Gas’ main window. All values are copied to the
clipboard using the same format displayed on the screen. So, if you need more accuracy in
your Excel calculations, set the DeskTop Gas display accuracy accordingly, before issuing the
'Copy Point' command.
3.11 GETTING HELP
The Help menu offers extensive on-line help for DeskTop Gas. The 'About' item in the Help
menu presents the version and serial numbers of your copy of @Gas. If the program is
running in its Demo mode, the number of days remaining on the Demo are displayed instead
of a serial number.
@Gas for Windows Version 4.0 - User's Manual
Chapter 3 - Using DeskTop Gas Calculator
Page 21
3.12 ERROR MESSAGES
When input values are out of range or any other errors occur, a message box is displayed
describing the error. The calculated fields will not be updated until the error condition is
resolved.
3.13 EXITING DESKTOP GAS
You may exit DeskTop Gas by using any of the standard methods for closing Windows
applications. These include the following:
•
Click the upper left corner of its program window and select close from the menu.
•
Select Exit from the File menu.
•
Press Alt + F4 keys.
•
Click the “X” button in the upper right corner of the program window.
@Gas for Windows Version 4.0 - User's Manual
Chapter 4 – Theoretical Basis of @Gas Functions
4
Page 22
THEORETICAL BASIS OF @GAS FUNCTIONS
It is commonly accepted that virial equations of state work well for gases. In @Gas, the P-V-T
behavior of a gas mixture is described by a third order virial equation of state:
B C
pv
= 1+ m + 2m +L
RT
v v
where,
p = Total pressure
T = Absolute Thermodynamic Temperature
v = Total volume of gas
R = Universal Gas Constant
Bm = second order virial coefficient of the mixture
Cm = third order virial coefficient of the mixture
For the ranges of pressure and temperature used in these functions, coefficients higher than
third order can be ignored. It is important to note that Bm and Cm are functions only of
temperature.
Over the range of temperatures and pressures covered by these functions, all of the gases
except water exist only in the gaseous state. (Actually, CO2 can exist in a liquid state at the
high end of the pressure range and the low end of the temperature range but this state is not
considered because it would only occur in a mixture that is almost pure CO2.) At temperatures
where the saturation pressure of pure water is greater than the total gas pressure, the mole
fraction of water vapor can range from 0 to 1. That is, there is no limit to the percentage of
water vapor in the gas mixture in that situation. Elsewhere, the mole fraction of water vapor
can range from 0 to a limiting, saturated, value xeq, which is reached when the condensed
phase of water is in thermodynamic equilibrium with the gas solution. This equilibrium fraction
is equivalent to the solubility of the condensed water in the solvent gas mixture. In order to
facilitate calculation of xeq it is convenient to group the virial coefficients of the non-water gases
so that the mixture can be treated as a binary mixture between the non-water gases and water
vapor.
The virial coefficients of the gas mixture can be expressed as:
Bm = x g2 B gg + 2 x g x w B gw + x w2 B ww
and
Cm = x g3 Cggg + 3x g2 x w Cggw + 3x g x w2 Cgww + x w3 Cwww
where,
@Gas for Windows Version 4.0 - User's Manual
Chapter 4 – Theoretical Basis of @Gas Functions
Page 23
xg = mole fraction of the non-water gases in mixture
x w = mole fraction of water vapor in the mixture
Bgg , Cggg = virial coefficients of the non-water gases
B ww , C www = virial coefficients of water vapor
Bgw , Cggw , Cgww = cross virial coefficients
Since the sum of the mole fractions of the mixture must equal 1, the value xg is equal to 1 - xw.
The second virial coefficient of the non-water gases can be expressed as:
B gg
⎡ B NN x N2 + BOO xO2 + B AA x A2 + BCC xC2 + ⎤
⎢
⎥
2
= ⎢ ⎛ B NO x N xO + B NA x N x A + B NC x N xC + ⎞⎥ / (1 − xW )
⎜
⎟
⎟⎥
⎢2⎜ B x x + B x x + B x x
OC O C
AC A C
⎠⎦
⎣ ⎝ OA O A
and the second cross virial coefficient of the mixture can be expressed as:
[
]
Bgw = BNW x N + BOW xO + B AW x A + BCW xC / (1 − xW )
Similarly, the third virial coefficients can be expressed as:
C ggg
⎡C NNN x N3 + C OOO x O3 + C AAA x 3A + C CCC x C3 + ⎤
⎥
⎢
⎞ ⎥
⎢ ⎛⎜
⎢ ⎜ (C x + C x + C x )x 2 + ⎟⎟ ⎥
NNA A
NNC C
N
⎥
⎢ ⎜ NNO O
⎢ ⎜ (C OON x N + C OOA x A + C OOC xC )x O2 + ⎟⎟ ⎥
3
=⎢
⎥ / (1 − xW )
2
⎟
⎜
⎢3⎜ (C CCN x N + C CCO x O + C CCA xC )x C + ⎟ ⎥
⎥
⎢ ⎜ (C x
2
⎢ ⎜ AAN N + C AAO x O + C AAC x C )x A ⎟⎟ ⎥
⎢ ⎜ ⎛ C NOA x N x O x A + C NOC x N x O x C + ⎞ ⎟ ⎥
⎟⎟ ⎥
⎢ ⎜ 2⎜⎜
⎢⎣ ⎝ ⎝ C NAC x N x A x C + C OAC x O x A x C ⎠ ⎟⎠ ⎥⎦
and
C ggw
⎡C NNW x N2 + COOW x O2 + C AAW x 2A + CCCW x C2 + ⎤
2
⎢
⎥
= ⎢ ⎛ C NOW x N x O + C NAW x N x A + C NCW x N x C +⎞ ⎥ / (1 − xW )
⎢2⎜⎝ COAW x O x A + COCW x O x C + C ACW x A x C ⎟⎠ ⎥
⎣
⎦
and
C gww = [C NWW x N + COWW x O + C AWW x A + CCWW x C ] / (1 − xW )
where the subscripts N, O, A and C refer to N2, O2, Ar and CO2 respectively.
Assuming that the condensed phase is pure water, the value of xeq can be found by equating
the chemical potential of pure condensed water with the chemical potential of its vapor in the
@Gas for Windows Version 4.0 - User's Manual
Chapter 4 – Theoretical Basis of @Gas Functions
Page 24
gas solution. Since the equations describing chemical potentials are non-linear and difficult to
analyze, phase equilibrium is often described in terms of a thermodynamic function called
fugacity. The equality of chemical potentials can be replaced by equating the logarithms of the
fugacity of pure condensed water with that of its vapor in the gas mixture solution. The
equation of solubility based on this concept is derived by Rabinovich [3] and can be expressed
as follows:
ln
x eq p
p ws
= ln
(
z p , T , x eq
)+
z w ( p ws , T )
1
RT
∫
p
p ws
v wcond dp +
2 B ww
v w''
(
+
3C www
2( v 2'' )
2
−
)
)
⎞
⎛
2
3 ⎜ C ggw + 2 C gww − C ggw x eq + ⎟
2
B + B ww − B gw x eq − 2 ⎜
2 ⎟
v gw
2v
⎝ C ggw − 2 C gww + C www x eq ⎠
(
) )
(
(
where,
z = 1+
B C
+
, the compressibility of the gas mixture or the water vapor as required.
v v2
p ws = saturation pressure of water vapor at temperature T.
v wcond = the volume of the condensed water.
The solubility equation can be solved for xeq by iteration. For an ideal solution, xeqideal is equal
to the ratio of the vapor pressure of the pure water, to the total pressure of the mixture. The
ratio of xeq / xeqideal is called the enhancement factor or excess solubility and has a value
greater than 1. The value of xeq is used to find the dew point temperature of a gas mixture, to
determine the amount of condensation that occurs in a cooling process and to verify that the
value of x input by the user does not exceed xeq.
The thermodynamic properties (enthalpy, entropy and specific heat at constant pressure) can
be determined from knowledge of the properties in the ideal gas state and the virial
coefficients.
The molar enthalpy of a moist gas mixture, hm, can be described by the equation:
hm = x N ( h No + h N' ) + x O ( hOo + hO' ) + x A ( h Ao + h A' ) + x C ( hCo + hC' ) +
xW ( hW0 + hW' ) +
RT
v
∂B m ⎞ ⎛
⎡⎛
1 ∂C m ⎞ 1 ⎤
⎟ ⎥
⎟ + ⎜ Cm − T
⎢⎜⎝ Bm − T
2 ∂T ⎠ v ⎦
∂T ⎠ ⎝
⎣
where,
hio = ideal gas molar enthalpy for gas i
hi' = constant to adjust reference state for gas i
@Gas for Windows Version 4.0 - User's Manual
Chapter 4 – Theoretical Basis of @Gas Functions
Page 25
The molar entropy of the moist gas mixture sm can be described by the equation:
⎛ pv ⎞
⎟⎟ +
s m = x N s No + s N' + x O s Oo + s O' + x A s oA + s A' + x C s Co + s C' xW + sWo + sW' − R ln p + x N R ln⎜⎜
⎝ x N RT ⎠
(
)
(
)
(
)
(
)
(
)
⎛ pv ⎞
⎛ pv ⎞
⎛ Pv ⎞ R ⎛
∂B ⎞ R ⎛
∂C m ⎞
⎟⎟ + x C R ln⎜⎜
⎟⎟ + xW R ln⎜⎜
⎟⎟ − ⎜ Bm − T m ⎟ − 2 ⎜ C m − T
x O R ln⎜⎜
⎟
∂ T ⎠ 2v ⎝
∂T ⎠
⎝ x O RT ⎠
⎝ xC RT ⎠
⎝ xW RT ⎠ v ⎝
where,
sio = ideal gas molar entropy for gas i
si' = constant to adjust reference state for gas i
The molar specific heat at constant pressure of a moist gas mixture, cm, can be described by
the equation:
RT
c m = c x N + c x O + c x A + c x C + c xW − R −
v
o
N
o
O
o
A
o
C
o
W
⎛ ∂B m
∂ 2 Bm
⎜2
⎜ ∂T + T ∂T 2
⎝
⎞ RT ⎛ ∂C m
∂ 2Cm
⎟ − 2 ⎜2
⎟ 2v ⎜ ∂T + T ∂T 2
⎠
⎝
⎞
⎟+
⎟
⎠
B
C
T ∂B m T ∂C m ⎞
⎛
+
R⎜1 + m + 2m +
⎟
v
v ∂T
v ∂T ⎠
v
⎝
2 Bm 3C m
+ 2
1+
v
v
where,
cio =
4.1
ideal gas molar specific heat at constant pressure for gas i.
GAS PROPERTY DATABASE
In order to use the equations presented in the previous section to calculate the thermodynamic
properties, it is necessary to know the B and C virial coefficients of each of the pure gas
components and the mixed virial coefficients for all mixture combinations. In addition, the ideal
gas enthalpies, entropies and specific heats are required for each gas component. Tables of
compressibility data for the pure gases and the ideal gas enthalpies, entropies and specific
heats are provided in reference [1]. B and C virial coefficients for the pure gases were
obtained by using a least square fit of the compressibility function to isotherms at 10 degree
increments from 180 ºK to 800 ºK and at 50 degree increments from 800 ºK to 2000 ºK.
Mixed virial coefficients were calculated from molecular theory using the Leonard-Jones (6-12)
potential model. The following equations were used to calculate the virial coefficients based on
the model:
( )
*
Bij (T ) = (2πN A / 3)σ ij3 B LJ
T*
( )
*
C iij (T ) = (2πN A / 3) σ iij6 C LJ
T*
2
@Gas for Windows Version 4.0 - User's Manual
Chapter 4 – Theoretical Basis of @Gas Functions
Page 26
( )
*
C ijj (T ) = (2πN A / 3) σ ijj6 C LJ
T*
2
where N A = 6.02205E 23 per mole (Avogadro’s number)
T * = kT / ε ij or T * = kT / ε iij or T * = kT / ε ijj
k = 1.3807E −23 J/K (Boltzmann constant)
The equations and constants for calculating BLj* and C Lj* are found in Hirshfelder, Curtis and
Bird [4]. Values of potential parameters σ and ε/k for the pure gases were obtained by
minimizing the errors in predicting the compressibility factors of the pure gases using the
Leonard-Jones (6-12) potential. Mixed potential parameters were obtained by means of the
following semi-empirical mixing rules:
σ 12 = 0.5(σ 11 + σ 22 )ξ −1/ 6
( ε / k ) 12 = ( ε / k ) 11 ( ε / k ) 22 / ξ 2
σ 112 = 3 σ 11σ 122
σ 122 = 3 σ 22 σ 122
( ε / k ) 112 = 3 ( ε / k ) 11 ( ε / k ) 122
(ε / k ) 122 = 3 (ε / k ) 22 (ε / k ) 122
where
ξ = 1 + 0.892( 3a 11 t 22* ε11 / ε 22 / 2πN A σ 113 ) when gas 1 is non-water and gas 2 is water
or
ξ = 10
. when both gases are non-water
and
a11 = polarizability of the apolar molecules
t * = 8 −0.5 μ / εσ 3
μ = dipole moment of the molecule
Some of the mixed potential parameters between N2, Ar and CO2 with water were determined
by Rabinovich [3] based on experimental data on the equilibrium fractional content of water
vapor in the solvent gas. Where available, these mixed potential parameters were used
instead of the ones derived from the mixing rules.
@Gas for Windows Version 4.0 - User's Manual
Chapter 4 – Theoretical Basis of @Gas Functions
Page 27
Based on the methods described, a database was developed containing all of the pure gas
and mixed virial coefficients for the five gases at 10 degree increments from 180 °K to 800 °K
and at 50 degree increments between 800 °K and 2000 °K. A similar database was developed
for the ideal gas enthalpies, entropies and specific heats.
4.2
COMPUTATIONAL MODEL
With most of the functions, the mixture’s pressure and temperature are known. Since the virial
coefficients are functions only of temperature, the database is used to calculate mixed
coefficients Bgg, Bgw, Bww, Cggg, Cggw, Cgww and Cwww based on the formulas identified above at
four temperatures surrounding the desired temperature. Four point non-linear interpolation is
used to calculate the mixed coefficients and their derivatives at the desired temperature.
Since most of the properties require knowledge of the specific volume of the mixture, the virial
equation of state is used iteratively to calculate the specific volume. In cases where the
temperature of the mixture is not known, iterative procedures are used to determine the
temperature as well.
4.3
TRANSPORT PROPERTIES
Values for viscosity and thermal conductivity of individual gases at atmospheric pressure can
be found in many references although there does not appear to be any definitive standard of
accepted values as there are for steam and water. We found the most complete coverage by
Vasserman, Kazavchinskii, and Rabinovich [2] who have surveyed the available literature and
presented tables of values over a range of temperatures and pressures. We have used their
tabular values of viscosity and thermal conductivity as the basis of our database for Nitrogen,
Oxygen, Argon and Carbon Dioxide.
We have used the equations recommended by ASME [6] to compute the viscosity and thermal
conductivity properties for water vapor. These are the same equations used in our WinSteam
product.
There is little information available regarding the viscosity and conductivity of moist gases. In
most practical cases, the relatively small quantity of water vapor in gas mixtures has a small
effect on the overall transport properties, unlike the thermodynamic properties, which are
greatly affected by moisture. Nonetheless, we have selected a method to account for the
effects of moisture on viscosity based on kinetic theory as presented by Hirshfelder, Curtis and
Bird [4].
4.3.1 Viscosity
We treat the gas as a binary mixture between the non-polar gases (N2, O2, Ar and CO2) and
water vapor. For the non-polar gases, the viscosity of the mixture can be calculated as
follows:
@Gas for Windows Version 4.0 - User's Manual
Chapter 4 – Theoretical Basis of @Gas Functions
ηg =
H ii =
H 11
H 12
H 12
H 22
H 13
H 23
H 14
H 24
x1
x2
H 13
H 14
H 23
H 24
H 33
H 34
H 34
H 44
x3
x4
x1
x2
x3
x4
0
xi2
ηi
H ij = −
H 11
H 12
H 13
H 14
H 12
H 13
H 22
H 23
H 23
H 33
H 24
H 34
H 14
H 24
H 34
H 44
4
+∑
k =1
k ≠i
2 xi x j
η ij
2 xi x k
η ik
MiMk
(M i + M k )
MiM j
(M
+Mj)
2
i
2
Page 28
where
⎡ 5 Mk ⎤
⎢ *
⎥ and
M
A
3
i
ik
⎣
⎦
⎡ 5
⎤
⎢ * − 1⎥
⎢⎣ 3 Aij
⎥⎦
where,
η i = coefficient of viscosity of pure gas component i
η ij = 266.93 *10 − 7
Tij* = kT / ε ij
2 M i M j T /( M i + M j )
σ ij2 Ω ij( 2, 2)* (Tij* )
reduced temperature
σ ij , ε ij / T = parameters in the potential function characteristic of 1-2 interaction
xi = mole fraction of component i
M i = molecular weight of component i
A* = Ω ( 2, 2 )* / Ω (1,1)*
Ω ( i ,i )* = integrals for calculating the transport coefficients for the Leonard-Jones (6-12) potential
Once we have the viscosity of the non-polar gas mixture, we can use the equations for a
polar/non-polar mixture. The equation for viscosity of a binary mixture is as follows:
@Gas for Windows Version 4.0 - User's Manual
Chapter 4 – Theoretical Basis of @Gas Functions
1/η =
Page 29
X η + Yη
1 + Zη
where
η = viscosity of the mixture
Xη =
x g2
ηg
+
2 x g xw
η gw
+
x w2
ηw
2
2
⎛ M g ⎞ 2xg xw ⎛⎜ (M g + M w ) ⎞⎟⎛ ηgw ⎞ xw2 ⎛ M w ⎞⎤
⎜
⎟
⎟⎥
⎜
⎜
⎟
⎜ M ⎟ + η ⎜ 4M M ⎟⎜η η ⎟ + η ⎜ M ⎟⎥
g
g
w
g
w
w
g
⎝ w⎠
⎠⎦
⎝
⎠
⎝
⎠⎝
⎡ xg2
*
3
Yη = A12 ⎢
5 ⎢η
⎣ g
⎡ ⎛M ⎞
⎡⎛ (Mg + Mw)2 ⎞⎛ηgw ηgw ⎞⎤ ⎛ M ⎞⎤
g
*
2
3
⎟⎜ + −1⎟⎥ + xw2⎜ w ⎟⎥
⎢
Zη = A12 xg ⎜⎜ ⎟⎟ + 2xg xw⎢⎜
5 ⎢ M
⎢⎣⎜⎝ 4MgMw ⎟⎠⎜⎝ ηg ηw ⎟⎠⎥⎦ ⎜⎝ Mg ⎟⎠⎥⎦
⎣ ⎝ w⎠
η g = viscosity of dry gas mixture at the specified temperature
η w = viscosity of water vapor at the specified temperature
2 M g M wT / (M g + M w )
η gw = C1
( 2 , 2 )* *
2
(Tgw )
σ gw
Ω 12
and C1 = 266.93E-7
σgw = potential function parameter for mixture adjusted for one polar molecule
M g = weighted average molecular mass of the dry gas mixture
To correct for pressure, we use the method of Chung et al. as described in Reid, Prausnitz and
Poling [9]
4.3.2 Thermal Conductivity
In a similar manner, to calculate thermal conductivity we treat the gas as a binary mixture of
the non-polar gases and water vapor.
For the non-polar gas mixture, we use the Wassiljewa equation with the Mason and Saxena
modification described by Reid, Prausnitz and Poling [9].
xi λi
4
λg = ∑
i =1
4
∑x
j =1
j
where
Aij
λ g = thermal conductivity of the gas mixture
λi = thermal conductivity of component i
@Gas for Windows Version 4.0 - User's Manual
Chapter 4 – Theoretical Basis of @Gas Functions
Page 30
xi , x j = mole fraction of components i and j
Aii = 1.0
ε [1 + (λtri / λtrj )1 / 2 ( M i / M j )1 / 4 ]
2
Aij =
[8(1 + M
i
/M j)
]
1/ 2
ε = value that varies from 0.9 to 1.05 as a function of temperature
λtri / λtrj =
Γ j [exp(0.0464Tri ) − exp( −0.2412Tri )]
[
Γi exp(0.0464Trj ) − exp( −.2412Trj )
⎛T M 3 ⎞
Γ = 210⎜⎜ c 4 ⎟⎟
⎝ Pc ⎠
]
1/ 6
Tc , Pc = critical temperature and pressure
The equation for thermal conductivity of the moist gases is as follows:
1/ λ =
X λ + Yλ
1+ Zλ
where,
λ = thermal conductivity of the mixture
Xλ =
Yλ =
x g2
λg
x g2
λg
+
U
2 x g xw
(1)
λ gw
+
+
x w2
λw
2 x g xw
λ gw
U
(Y )
+
x w2
λw
U (2 )
Z λ = x g2U (1) + 2 x g x wU (Y ) + x w2 U (2 )
U
U
(1)
4 *
1 ⎛ 12
⎞ M g 1 (M g − M w )
=
+
A12 − ⎜ B12* + 1⎟
15
12 ⎝ 5
⎠ Mw 2 MgMw
(2 )
4
1 ⎛ 12
1 (M w − M g )
⎞M
= A12* − ⎜ B12* + 1⎟ w +
15
12 ⎝ 5
⎠ Mg 2 M gMw
2
2
@Gas for Windows Version 4.0 - User's Manual
Chapter 4 – Theoretical Basis of @Gas Functions
Page 31
2
2
2
4 ⎛(M +M ) ⎞ λ 1 ⎛12 * ⎞ 5 ⎛12 * ⎞(Mg −Mw)
+1⎟− * ⎜ B12−5⎟
U(Y) = A12* ⎜ g w ⎟ gw − ⎜ B12
15 ⎜⎝ 4MgMw ⎟⎠λgλw 12⎝ 5
⎠ 32A12⎝ 5
⎠ MgMw
U
(Z )
2
4 * ⎡⎛⎜ (Mg + Mw ) ⎞⎟⎛⎜ λgw λgw ⎞⎟ ⎤ 1 ⎛12 * ⎞
= A12 ⎢
+
−1⎥ − ⎜ B12 +1⎟
15 ⎢⎜⎝ 4Mg Mw ⎟⎠⎜⎝ λg λw ⎟⎠ ⎥ 12⎝ 5
⎠
⎣
⎦
λ g = Thermal conductivity of dry gas mixture at the specified temperature
λ w = Thermal conductivity of water vapor at the specified temperature
λgw = C2
T (M g + M w ) / 2M g M w
2
( 2, 2 )* *
σ gw
Ω12
(Tgw )
and C2 = 1989.1E-7
B12* = function of reduced temperature
To correct for pressure, we use the Stiel and Thodos modification as described in Reid,
Prausnitz and Poling [9].
@Gas for Windows Version 4.0 - User's Manual
Chapter 5 - Speed and Accuracy
Page 32
5
5.1
SPEED AND ACCURACY
SPEED OF CALCULATIONS
This section addresses the @Gas calculation speed as measured within Microsoft Excel.
Performance within other applications is similar.
The time required to recalculate a spreadsheet is a function of many features of the computer
system hardware and the nature of the spreadsheet. Since the supported spreadsheets use
double precision math exclusively, calculation time is sensitive to the number and complexity of
numerical equations used.
The time required to perform the calculations also varies depending on the specific functions.
Some calculations are more complex than others. Some require iterations. The simplest
functions run the fastest while those that are more complex and require iterations run slower.
The table below lists times required to calculate some typical @Gas functions from Microsoft
Excel.
Function
Calculation Time
GasPVXT
0.0002
GasPTXV
0.0002
GasPTXH
0.0002
GasPHXT
0.0003
Typical calculation times in seconds per calculation.
A calculation returns one property at one state point.
These times were measured on a computer using a 1.8 GHz Pentium IV processor.
Calculation times will vary depending on your particular computer.
Note that the recalculation options selected will also affect perceived calculation time.
5.2
ACCURACY OF CALCULATIONS
Thermodynamic properties for the pure gases calculated by @Gas have been checked against
the values published by NBS [1] and ASME [6] for water vapor. As shown on Tables 1 through
20, the calculated values show excellent agreement with the source data throughout most of
the valid range. Some small differences can be observed at low temperatures and high
pressures. This is due to the limitations of using a third order virial equation of state.
@Gas for Windows Version 4.0 - User's Manual
Chapter 5 - Speed and Accuracy
Page 33
There is little published data on the properties of mixed gases. One method to illustrate the
accuracy of the mixing equations is to compare the results of @Gas to data for dry air, which is
a mixture of Nitrogen, Oxygen, Argon and a small amount of Carbon Dioxide. Tables 21
through 24 show the comparison with air for the thermodynamic properties.
As with the pure components, small errors can be observed at low temperatures and high
pressures due to the limitations of the model. The tables show some differences in enthalpy,
entropy and specific heat occurring at 850 °K and growing with temperature. This initially, was
thought to be attributed to dissociation, but this was dismissed for two reasons. First,
dissociation effects were not included below 1500 °K in reference 1. Second, the error is much
greater than what can be attributed to dissociation above 1500 °K.
Further examination of the data tables suggests that the tables in reference 1 are in error. One
would expect the thermodynamic properties to approach the ideal gas properties as the
pressure is reduced to zero. While this is the case for temperatures up to 800 °K, it is not the
case above 800 °K. Curiously, at 800 °K, the tables in reference 1 change from a temperature
increment of 10 °K to 50 °K at the point where the error begins. Perhaps this change of
temperature increment was not handled properly.
Comparison of data from Vasserman et al [2] in the temperature range from 850 °K to 1300 °K
supports the conclusion that the tables from NBS [1] are in error. Unfortunately, the tables
from Vasserman et al [2] do not contain data for temperatures above 1300 °K.
Thermodynamic properties for moist air are presented by ASHRAE [10] at atmospheric
pressure for temperatures up to 200 deg C. The ASHRAE data is based on work done by
Hyland and Wexler [8], who provide tables of calculated data at pressures up to 50 bar.
Comparisons with this data are shown on Tables 29 through 40.
Data for Viscosity and Thermal Conductivity is taken from Vasserman et al [2] for the pure
gases except for water vapor which is taken from ASME [6]. Tables 41 and 42 show excellent
agreement with this data. As with the thermodynamic properties, the accuracy of the mixing
equations for the transport properties are illustrated by comparison with dry air. These
comparisons are shown in Table 43. The mixing equations for the transport properties are not
as precise as those for the thermodynamic properties; however, in most cases the errors are
less than 1%.
@Gas for Windows Version 4.0 - User's Manual
Chapter 5 - Speed and Accuracy
Page 34
COMPARISON OF RESULTS WITH NBS [1] DATA
TABLE 1 - COMPRESSIBILITY OF NITROGEN
Temperature
Range
From
To
Pressure
0.01 atm
deg K deg K
Avg
Error
Max
Error
1 atm
Avg
Error
10 atm
Max
Error
Avg
Error
Max
Error
40 atm
Avg
Error
Max
Error
180
250
0.000% 0.000% 0.001% 0.006% 0.006% 0.022% 0.056% 0.101%
260
300
0.000% 0.001% 0.001% 0.001% 0.005% 0.006% 0.011% 0.019%
310
350
0.000% 0.000% 0.000% 0.001% 0.004% 0.006% 0.016% 0.020%
360
400
0.000% 0.000% 0.000% 0.000% 0.001% 0.003% 0.005% 0.009%
410
500
0.000% 0.000% 0.000% 0.001% 0.001% 0.002% 0.005% 0.009%
510
600
0.000% 0.000% 0.000% 0.001% 0.001% 0.002% 0.007% 0.009%
610
700
0.000% 0.000% 0.000% 0.000% 0.001% 0.001% 0.003% 0.005%
710
800
0.000% 0.000% 0.000% 0.000% 0.001% 0.002% 0.002% 0.003%
850
1450
0.000% 0.000% 0.000% 0.001% 0.003% 0.006% 0.007% 0.012%
1500
2000
0.000% 0.000% 0.000% 0.000% 0.001% 0.002% 0.003% 0.006%
COMPARISON OF RESULTS WITH NBS [1] DATA
TABLE 2 - COMPRESSIBILITY OF OXYGEN
Temperature
Range
Pressure
From
To
0.01 atm
deg K
deg K
180
250
0.000% 0.000% 0.004% 0.012% 0.008% 0.034% 0.112% 0.199%
260
300
0.000% 0.000% 0.001% 0.001% 0.007% 0.008% 0.009% 0.021%
310
350
0.000% 0.000% 0.000% 0.000% 0.005% 0.006% 0.009% 0.010%
360
400
0.000% 0.000% 0.000% 0.000% 0.001% 0.002% 0.004% 0.006%
410
500
0.000% 0.000% 0.000% 0.001% 0.001% 0.002% 0.004% 0.006%
510
600
0.000% 0.000% 0.000% 0.001% 0.002% 0.002% 0.005% 0.006%
610
700
0.000% 0.000% 0.000% 0.001% 0.001% 0.001% 0.001% 0.003%
710
800
0.000% 0.000% 0.000% 0.000% 0.000% 0.001% 0.002% 0.004%
850
1450
0.000% 0.000% 0.000% 0.001% 0.001% 0.002% 0.006% 0.008%
1500
2000
0.000% 0.000% 0.000% 0.001% 0.001% 0.002% 0.002% 0.005%
Avg
Error
Max
Error
1 atm
Avg
Error
Max
Error
10 atm
Avg
Error
Max
Error
@Gas for Windows Version 4.0 - User's Manual
40 atm
Avg
Error
Max
Error
Chapter 5 - Speed and Accuracy
Page 35
COMPARISON OF RESULTS WITH NBS [1] DATA
TABLE 3 - COMPRESSIBILITY OF ARGON
Temperature
Range
Pressure
From
To
0.01 atm
deg K
Deg K
180
250
0.000% 0.001% 0.001% 0.002% 0.004% 0.007% 0.071% 0.213%
260
300
0.000% 0.000% 0.001% 0.001% 0.006% 0.007% 0.020% 0.030%
310
350
0.000% 0.001% 0.001% 0.001% 0.003% 0.005% 0.014% 0.020%
360
400
0.000% 0.000% 0.000% 0.001% 0.001% 0.002% 0.004% 0.012%
410
500
0.000% 0.000% 0.000% 0.000% 0.001% 0.003% 0.008% 0.012%
510
600
0.000% 0.000% 0.000% 0.001% 0.002% 0.002% 0.008% 0.013%
610
700
0.000% 0.000% 0.000% 0.001% 0.001% 0.002% 0.005% 0.010%
710
800
0.000% 0.000% 0.000% 0.001% 0.000% 0.001% 0.004% 0.007%
850
1450
0.000% 0.000% 0.000% 0.001% 0.001% 0.002% 0.006% 0.011%
1500
2000
0.000% 0.000% 0.000% 0.000% 0.001% 0.002% 0.002% 0.006%
Avg
Error
Max
Error
1 atm
Avg
Error
10 atm
Max
Error
Avg
Error
40 atm
Max
Error
Avg
Error
Max
Error
COMPARISON OF RESULTS WITH NBS [1] DATA
TABLE 4 - COMPRESSIBILITY OF CARBON DIOXIDE
Temperature
Range
From To
deg K Deg K
Pressure
0.01 atm
Avg
Error
Max
Error
1 atm
Avg
Error
Max
Error
Avg
Error
40 atm
Max
Error
Avg
Error
Max
Error
200
250
0.001% 0.001% NA
NA
NA
NA
NA
260
300
0.000% 0.001% 0.004% 0.005% NA
NA
NA
NA
310
350
0.000% 0.001% 0.003% 0.003% NA
NA
NA
NA
360
400
0.000% 0.001% 0.001% 0.002% NA
NA
NA
NA
410
500
0.000% 0.001% 0.001% 0.001% NA
NA
NA
NA
510
600
0.001% 0.001% 0.001% 0.001% NA
NA
NA
NA
610
700
0.001% 0.001% 0.001% 0.001% NA
NA
NA
NA
710
800
0.000% 0.000% 0.000% 0.001% NA
NA
NA
NA
850
1450
0.000% 0.000% 0.005% 0.008% NA
NA
NA
NA
0.000% 0.000% 0.005% 0.006% 0.011% 0.028% NA
NA
1500 2000
NA
10 atm
*NA indicates that CO2 is not in vapor state in this range.
@Gas for Windows Version 4.0 - User's Manual
Chapter 5 - Speed and Accuracy
Page 36
COMPARISON OF RESULTS WITH ASME [6] DATA
TABLE 5 - COMPRESSIBILITY OF WATER VAPOR
Temperature
Range
Pressure
From To
0.01 atm
deg K Deg K
Avg
Error
Max
Error
1 atm
Avg
Error
10 atm
Max
Error
Avg
Error
40 atm
Max
Error
Avg
Error
Max
Error
290
350
0.001% 0.002% NA
NA
NA
NA
NA
NA
360
400
0.002% 0.002% NA
NA
NA
NA
NA
NA
410
500
0.002% 0.002% 0.002% 0.003% NA
NA
NA
NA
510
600
0.002% 0.002% 0.003% 0.003% 0.003% 0.003% NA
NA
610
700
0.002% 0.002% 0.002% 0.002% 0.002% 0.002% 0.002% 0.005%
710
800
0.002% 0.002% 0.002% 0.002% 0.002% 0.002% 0.002% 0.002%
850
1450
0.002% 0.002% 0.002% 0.002% 0.002% 0.002% 0.002% 0.004%
1500 2000
0.002% 0.002% 0.002% 0.002% 0.002% 0.002% 0.002% 0.002%
COMPARISON OF RESULTS WITH NBS [1] DATA
TABLE 6 - ENTHALPY OF NITROGEN
Temperature
Range
Pressure
From To
1 atm
Max
Error
10 atm
Avg
Error
Max
Error
40 atm
deg K deg K
Avg
Error
Avg
Error
180
250
0.005% 0.022% 0.054% 0.221% 0.287% 1.235%
260
300
0.001% 0.002% 0.004% 0.009% 0.031% 0.074%
310
350
0.001% 0.001% 0.005% 0.006% 0.017% 0.024%
360
400
0.001% 0.001% 0.006% 0.006% 0.022% 0.025%
410
500
0.001% 0.001% 0.003% 0.005% 0.011% 0.019%
510
600
0.000% 0.001% 0.001% 0.005% 0.004% 0.007%
610
700
0.001% 0.001% 0.002% 0.005% 0.009% 0.009%
710
800
0.000% 0.001% 0.002% 0.002% 0.009% 0.010%
810
1450
0.000% 0.000% 0.001% 0.001% 0.004% 0.006%
1500
2000
0.000% 0.000% 0.002% 0.002% 0.008% 0.009%
@Gas for Windows Version 4.0 - User's Manual
Max
Error
Chapter 5 - Speed and Accuracy
Page 37
COMPARISON OF RESULTS WITH NBS [1] DATA
TABLE 7 - ENTHALPY OF OXYGEN
Temperature
Range
From To
Pressure
1 atm
deg K deg K
Avg
Error
Max
Error
10 atm
Avg
Error
Max
Error
40 atm
Avg
Error
Max
Error
180
250
0.005% 0.015% 0.041% 0.174% 0.287% 1.102%
260
300
0.002% 0.002% 0.005% 0.010% 0.028% 0.062%
310
350
0.001% 0.002% 0.009% 0.010% 0.018% 0.028%
360
400
0.001% 0.002% 0.006% 0.007% 0.025% 0.026%
410
500
0.001% 0.001% 0.003% 0.006% 0.010% 0.019%
510
600
0.000% 0.001% 0.001% 0.002% 0.006% 0.011%
610
700
0.000% 0.001% 0.002% 0.002% 0.007% 0.010%
710
800
0.000% 0.001% 0.002% 0.002% 0.006% 0.010%
810
1450
0.000% 0.001% 0.001% 0.001% 0.004% 0.007%
1500
2000
0.000% 0.000% 0.002% 0.002% 0.008% 0.009%
COMPARISON OF RESULTS WITH NBS [1] DATA
TABLE 8 - ENTHALPY OF ARGON
Temperature
Range
From To
Pressure
1 atm
deg K deg K
Avg
Error
Max
Error
10 atm
Avg
Error
Max
Error
40 atm
Avg
Error
Max
Error
180
250
0.049% 0.376% 0.082% 0.529% 0.075% 0.199%
260
300
0.001% 0.002% 0.004% 0.007% 0.015% 0.032%
310
350
0.002% 0.002% 0.008% 0.011% 0.038% 0.056%
360
400
0.001% 0.002% 0.007% 0.010% 0.015% 0.033%
410
500
0.001% 0.001% 0.002% 0.005% 0.012% 0.027%
510
600
0.001% 0.001% 0.002% 0.003% 0.007% 0.015%
610
700
0.000% 0.001% 0.003% 0.003% 0.013% 0.022%
710
800
0.000% 0.001% 0.002% 0.003% 0.010% 0.018%
810
1450
0.000% 0.000% 0.002% 0.004% 0.004% 0.007%
1500
2000
0.000% 0.001% 0.002% 0.003% 0.012% 0.014%
@Gas for Windows Version 4.0 - User's Manual
Chapter 5 - Speed and Accuracy
Page 38
COMPARISON OF RESULTS WITH NBS [1] DATA
TABLE 9 - ENTHALPY OF CARBON DIOXIDE
Temperature
Range
Pressure
From To
1 atm
deg K deg K
Avg
Error
Max
Error
NA
10 atm
Avg
Error
NA
Avg
Error
Max
Error
180
250
NA
NA
NA
260
300
0.019% 0.030% 0.023% 0.057% NA
NA
310
350
0.014% 0.021% 0.049% 0.064% 0.389% 0.864%
360
400
0.008% 0.011% 0.034% 0.041% 0.307% 0.436%
410
500
0.008% 0.011% 0.019% 0.027% 0.099% 0.153%
510
600
0.005% 0.009% 0.005% 0.010% 0.024% 0.064%
610
700
0.006% 0.011% 0.007% 0.012% 0.025% 0.035%
710
800
0.002% 0.003% 0.006% 0.012% 0.033% 0.037%
810
1450
0.002% 0.004% 0.003% 0.007% 0.012% 0.028%
1500
2000
**
**
NA
Max
Error
40 atm
**
**
**
**
** NBS data not available
COMPARISON OF RESULTS WITH ASME [6] DATA
TABLE 10 - ENTHALPY OF WATER VAPOR
Temperature
Range
Pressure
From To
1 atm
deg K deg K
Avg
Error
Max
Error
10 atm
Avg
Error
Max
Error
40 atm
Avg
Error
Max
Error
180
290
NA
NA
NA
NA
NA
NA
290
370
NA
NA
NA
NA
NA
NA
380
450
0.013% 0.015% NA
NA
NA
NA
460
530
0.017% 0.018% 0.013% 0.024% NA
NA
540
600
0.021% 0.021% 0.026% 0.030% 0.006% 0.012%
610
700
0.022% 0.023% 0.022% 0.023% 0.021% 0.024%
710
800
0.026% 0.028% 0.026% 0.028% 0.026% 0.028%
850
1450
0.047% 0.064% 0.047% 0.064% 0.048% 0.064%
1500
2000
0.082% 0.093% 0.082% 0.093% 0.082
@Gas for Windows Version 4.0 - User's Manual
0.093%
Chapter 5 - Speed and Accuracy
Page 39
COMPARISON OF RESULTS WITH NBS [1] DATA
TABLE 11 - ENTROPY OF NITROGEN
Temperature
Range
Pressure
From To
1 atm
deg K deg K
Avg
Error
Max
Error
10 atm
Avg
Error
Max
Error
40 atm
Avg
Error
Max
Error
180
250
0.001% 0.003% 0.009% 0.037% 0.049% 0.208%
260
300
0.000% 0.000% 0.001% 0.002% 0.006% 0.011%
310
350
0.000% 0.000% 0.001% 0.001% 0.002% 0.003%
360
400
0.000% 0.000% 0.001% 0.001% 0.003% 0.004%
410
500
0.000% 0.000% 0.001% 0.001% 0.002% 0.003%
510
600
0.000% 0.000% 0.000% 0.000% 0.001% 0.001%
610
700
0.000% 0.000% 0.001% 0.001% 0.001% 0.002%
710
800
0.000% 0.000% 0.000% 0.001% 0.001% 0.002%
810
1450
0.000% 0.000% 0.000% 0.001% 0.001% 0.001%
1500
2000
0.000% 0.000% 0.000% 0.000% 0.001% 0.001%
COMPARISON OF RESULTS WITH NBS [1] DATA
TABLE 12 - ENTROPY OF OXYGEN
Temperature
Range
From To
deg K deg K
Pressure
1
Atm
10
Atm
40
Atm
Avg
Error
Max
Error
Avg
Error
Max
Error
Avg
Error
Max
Error
180
250
0.005% 0.015% 0.041% 0.174% 0.287% 0.102%
260
300
0.002% 0.002% 0.005% 0.010% 0.028% 0.062%
310
350
0.001% 0.002% 0.009% 0.010% 0.018% 0.028%
360
400
0.001% 0.002% 0.006% 0.007% 0.025% 0.026%
410
500
0.001% 0.001% 0.003% 0.006% 0.010% 0.019%
510
600
0.000% 0.001% 0.001% 0.002% 0.006% 0.011%
610
700
0.000% 0.001% 0.002% 0.002% 0.007% 0.010%
710
800
0.000% 0.001% 0.002% 0.002% 0.006% 0.010%
810
1450
0.000% 0.001% 0.001% 0.001% 0.004% 0.007%
1500
2000
0.000% 0.000% 0.002% 0.002% 0.003% 0.009%
@Gas for Windows Version 4.0 - User's Manual
Chapter 5 - Speed and Accuracy
Page 40
COMPARISON OF RESULTS WITH NBS [1] DATA
TABLE 13 - ENTROPY OF ARGON
Temperature
Range
Pressure
From To
1 atm
deg K deg K
Avg
Error
Max
Error
10 atm
Avg
Error
Max
Error
40 atm
Avg
Error
Max
Error
180
250
0.000% 0.001% 0.006% 0.022% 0.129% 1.102%
260
300
0.000% 0.000% 0.000% 0.001% 0.005% 0.062%
310
350
0.000% 0.000% 0.001% 0.001% 0.006% 0.028%
360
400
0.000% 0.000% 0.001% 0.001% 0.004% 0.026%
410
500
0.000% 0.000% 0.000% 0.001% 0.001% 0.019%
510
600
0.000% 0.000% 0.000% 0.001% 0.001% 0.011%
610
700
0.000% 0.001% 0.001% 0.001% 0.002% 0.010%
710
800
0.000% 0.000% 0.001% 0.001% **
**
810
1450
0.000% 0.000% 0.000% 0.001% **
**
1500
2000
0.000% 0.000% 0.000% 0.000% **
**
** NBS data not available
COMPARISON OF RESULTS WITH NBS [1] DATA
TABLE 14 - ENTROPY OF CARBON DIOXIDE
Temperature
Range
Pressure
From To
1 atm
deg K deg K
Avg
Error
Max
Error
NA
10 atm
Avg
Error
Max
Error
250
NA
NA
NA
260
300
0.002% 0.003% 0.006% 0.014% NA
NA
310
350
0.001% 0.003% 0.003% 0.005% 0.033% 0.086%
360
400
0.002% 0.006% 0.006% 0.007% 0.038% 0.050%
410
500
0.003% 0.004% 0.004% 0.006% 0.020% 0.025%
510
600
0.003% 0.002% 0.002% 0.004% 0.010% 0.016%
610
700
0.003% 0.001% 0.001% 0.003% 0.003% 0.006%
710
800
0.003% 0.001% 0.001% 0.003% 0.001% 0.002%
810
1450
0.002% 0.002% 0.002% 0.004% 0.003% 0.006%
1500
2000
**
**
NA
Avg
Error
180
**
NA
Max
Error
40 atm
**
**
** NBS data not available
@Gas for Windows Version 4.0 - User's Manual
**
Chapter 5 - Speed and Accuracy
Page 41
COMPARISON OF RESULTS WITH ASME [6] DATA
TABLE 15 – ENTROPY OF WATER VAPOR
Temperature
Range
Pressure
From To
1 atm
10 atm
40 atm
deg K deg K
Avg
Error
Max
Error
Avg
Error
Max
Error
Avg
Error
Max
Error
180
290
NA
NA
NA
NA
NA
NA
290
370
NA
NA
NA
NA
NA
NA
380
450
0.017% 0.020% NA
NA
NA
NA
460
530
0.019% 0.020% 0.019% 0.030% NA
NA
540
600
0.021% 0.022% 0.028% 0.030% 0.013% 0.020%
610
700
0.022% 0.022% 0.025% 0.025% 0.026% 0.028%
710
800
0.023% 0.024% 0.026% 0.027% 0.029% 0.030%
850
1450
0.033% 0.041% 0.037% 0.045% 0.040% 0.048%
1500
2000
0.048% 0.052% 0.053% 0.058% 0.056
0.061%
COMPARISON OF RESULTS WITH NBS [1] DATA
TABLE 16 – SPECIFIC HEAT OF NITROGEN
Temperature
Range
From To
Pressure
1 atm
deg K deg K
Avg
Error
Max
Error
10 atm
Avg
Error
Max
Error
40 atm
Avg
Error
Max
Error
180
250
0.062% 0.182% 0.758% 2.899% 2.923% 9.543%
260
300
0.004% 0.005% 0.050% 0.057% 0.325% 0.368%
310
350
0.002% 0.003% 0.014% 0.029% 0.123% 0.206%
360
400
0.001% 0.002% 0.016% 0.022% 0.028% 0.053%
410
500
0.002% 0.003% 0.026% 0.027% 0.076% 0.084%
510
600
0.001% 0.003% 0.021% 0.024% 0.061% 0.076%
610
700
0.001% 0.002% 0.014% 0.017% 0.029% 0.041%
710
800
0.001% 0.001% 0.009% 0.011% 0.008% 0.015%
810
1450
0.001% 0.002% 0.004% 0.007% 0.013% 0.022%
1500
2000
0.001% 0.004% 0.006% 0.007% 0.005% 0.010%
@Gas for Windows Version 4.0 - User's Manual
Chapter 5 - Speed and Accuracy
Page 42
COMPARISON OF RESULTS WITH NBS [1] DATA
TABLE 17 – SPECIFIC HEAT OF OXYGEN
Temperature
Range
From To
Pressure
1 atm
deg K deg K
Avg
Error
Max
Error
10 atm
Avg
Error
Max
Error
40 atm
Avg
Error
Max
Error
180
250
0.043% 0.122% 0.466% 1.381% 2.495% 8.550%
260
300
0.001% 0.002% 0.047% 0.055% 0.326% 0.386%
310
350
0.001% 0.002% 0.011% 0.025% 0.111% 0.192%
360
400
0.002% 0.004% 0.014% 0.020% 0.023% 0.042%
410
500
0.002% 0.004% 0.020% 0.022% 0.062% 0.065%
510
600
0.001% 0.002% 0.012% 0.017% 0.044% 0.059%
610
700
0.001% 0.004% 0.004% 0.008% 0.015% 0.026%
710
800
0.001% 0.001% 0.001% 0.003% 0.004% 0.009%
810
1450
0.001% 0.001% 0.005% 0.008% 0.017% 0.029%
1500
2000
0.000% 0.001% 0.003% 0.004% 0.011% 0.016%
COMPARISON OF RESULTS WITH NBS [1] DATA
TABLE 18 – SPECIFIC HEAT OF ARGON
Temperature
Range
From To
Pressure
1 atm
deg K deg K
Avg
Error
Max
Error
10 atm
Avg
Error
Max
Error
40 atm
Avg
Error
Max
Error
180
250
0.031% 0.093% 0.517% 1.643% 1.574% 4.829%
260
300
0.005% 0.007% 0.073% 0.096% 0.307% 0.575%
310
350
0.001% 0.003% 0.014% 0.029% 0.259% 0.437%
360
400
0.003% 0.004% 0.020% 0.026% 0.158% 0.355%
410
500
0.003% 0.005% 0.026% 0.028% 0.095% 0.261%
510
600
0.001% 0.003% 0.017% 0.022% 0.049% 0.068%
610
700
0.001% 0.002% 0.007% 0.012% 0.023% 0.047%
710
800
0.001% 0.002% 0.004% 0.008% 0.015% 0.022%
810
1450
0.001% 0.002% 0.008% 0.014% 0.043% 0.066%
1500
2000
0.001% 0.001% 0.001% 0.003% 0.023% 0.039%
@Gas for Windows Version 4.0 - User's Manual
Chapter 5 - Speed and Accuracy
Page 43
COMPARISON OF RESULTS WITH NBS [1] DATA
TABLE 19 – SPECIFIC HEAT OF CARBON DIOXIDE
Temperature
Range
From
Pressure
To
1 atm
10 atm
40 atm
deg K deg K Avg
Error
Max
Error
Avg
Error
Max
Error
Avg
Error
Max
Error
180
250
NA
NA
NA
NA
NA
NA
260
300
0.040% 0.052% 1.336% 4.255% NA
NA
310
350
0.029% 0.097% 0.167% 0.229% 4.022% 9.111%
360
400
0.006% 0.008% 0.030% 0.052% 0.359% 0.849%
410
500
0.004% 0.007% 0.065% 0.078% 0.184% 0.286%
510
600
0.003% 0.007% 0.039% 0.051% 0.247% 0.328%
610
700
0.004% 0.007% 0.013% 0.023% 0.114% 0.178%
710
800
0.003% 0.007% 0.005% 0.017% 0.021% 0.043%
810
1450
0.006% 0.013% 0.009% 0.016% 0.072% 0.206%
1500
2000
**
**
**
**
**
**
** NBS data not available
COMPARISON OF RESULTS WITH ASME [6] DATA
TABLE 20 – SPECIFIC HEAT OF WATER VAPOR
Temperature
Range
From
Pressure
To
1 atm
deg K deg K
Avg
Error
Max
Error
10 atm
Avg
Error
Max
Error
40 atm
Avg
Error
Max
Error
180
290
NA
NA
NA
NA
NA
NA
290
370
NA
NA
NA
NA
NA
NA
380
450
0.102% 0.310% NA
NA
NA
NA
460
530
0.080% 0.155% 0.334% 0.778% NA
NA
540
600
0.065% 0.319% 0.414% 2.008% 0.731% 2.673%
610
700
0.065% 0.080% 0.045% 0.075% 0.146% 0.302%
710
800
0.093% 0.106% 0.093% 0.119% 0.087% 0.154%
850
1450
0.148% 0.197% 0.146% 0.276% 0.190% 0.693%
1500
2000
0.190% 0.218% 0.`90% 0.217% 0.189% 0.216%
@Gas for Windows Version 4.0 - User's Manual
Chapter 5 - Speed and Accuracy
Page 44
COMPARISON OF RESULTS WITH NBS [1] DATA
TABLE 21 - COMPRESSIBILITY OF DRY AIR
Temperature
Range
Pressure
From To
0.01 atm
Deg K deg K
Avg
Error
1 atm
Max
Error
Avg
Error
10 atm
Max
Error
Avg
Error
40 atm
Max
Error
Avg
Error
Max
Error
180
250
0.001% 0.001% 0.001% 0.002% 0.018% 0.027% 0.124% 0.278%
260
300
0.001% 0.001% 0.000% 0.001% 0.004% 0.007% 0.010% 0.014%
310
350
0.001% 0.001% 0.000% 0.000% 0.002% 0.002% 0.010% 0.014%
360
400
0.001% 0.001% 0.000% 0.001% 0.002% 0.003% 0.002% 0.003%
410
500
0.001% 0.001% 0.000% 0.001% 0.002% 0.003% 0.009% 0.012%
510
600
0.001% 0.001% 0.001% 0.001% 0.001% 0.002% 0.011% 0.012%
610
700
0.001% 0.001% 0.001% 0.001% 0.000% 0.001% 0.007% 0.009%
710
800
0.001% 0.001% 0.001% 0.002% 0.001% 0.002% 0.003% 0.005%
810
1450
0.001% 0.001% 0.001% 0.002% 0.002% 0.003% 0.003% 0.005%
1500
2000
0.0038
0.167% 0.005% 0.017% 0.005% 0.007% 0.004% 0.011%
COMPARISON OF RESULTS WITH NBS [1] DATA
TABLE 22 - ENTHALPY OF DRY AIR
Temperature
Range
Pressure
From To
1 atm
deg K deg K
Avg
Error
Max
Error
10 atm
Avg
Error
Max
Error
40 atm
Avg
Error
Max
Error
180
250
0.004% 0.016% 0.031% 0.119% 0.125% 0.262%
260
300
0.001% 0.002% 0.004% 0.009% 0.037% 0.070%
310
350
0.001% 0.003% 0.005% 0.008% 0.007% 0.011%
360
400
0.002% 0.005% 0.008% 0.009% 0.006% 0.009%
410
500
0.001% 0.002% 0.005% 0.007% 0.005% 0.011%
510
600
0.001% 0.002% 0.001% 0.003% 0.005% 0.007%
610
700
0.001% 0.002% 0.001% 0.001% 0.007% 0.008%
710
800
0.001% 0.004% 0.002% 0.004% 0.007% 0.010%
810
1450
* 0.03% * 0.10% * 0.03% * 0.09% * 0.03% * 0.10%
1500
2000
**
**
**
**
**
@Gas for Windows Version 4.0 - User's Manual
**
Chapter 5 - Speed and Accuracy
Page 45
COMPARISON OF RESULTS WITH NBS [1] DATA
TABLE 23 - ENTROPY OF DRY AIR
Temperature
Range
Pressure
From To
1 atm
deg K deg K
Avg
Error
10 atm
Max
Error
Avg
Error
40 atm
Max
Error
Avg
Error
Max
Error
180
250
0.002% 0.003% 0.006% 0.022% 0.020% 0.052%
260
300
0.001% 0.002% 0.001% 0.002% 0.005% 0.006%
310
350
0.003% 0.004% 0.001% 0.002% 0.006% 0.008%
360
400
0.002% 0.004% 0.002% 0.004% 0.004% 0.007%
410
500
0.001% 0.004% 0.001% 0.003% 0.003% 0.005%
510
600
0.002% 0.004% 0.002% 0.004% 0.001% 0.003%
610
700
0.002% 0.003% 0.002% 0.004% 0.001% 0.002%
710
800
0.001% 0.003% 0.001% 0.003% 0.002% 0.003%
850
1450
0.005% 0.014% 0.003% 0.005% 0.005% 0.009%
1500
2000
**
**
**
**
**
**
COMPARISON OF RESULTS WITH NBS [1] DATA
TABLE 24 - SPECIFIC HEAT OF DRY AIR
Temperature
Range
Pressure
From To
1 atm
deg K deg K
Avg
Error
Max
Error
10 atm
Avg
Error
Max
Error
40 atm
Avg
Error
Max
Error
180
250
0.036% 0.098% 0.352% 1.026% 1.046% 3.162%
260
300
0.004% 0.005% 0.049% 0.061% 0.294% 0.382%
310
350
0.005% 0.007% 0.020% 0.034% 0.096% 0.170%
360
400
0.001% 0.002% 0.004% 0.007% 0.016% 0.033%
410
500
0.001% 0.003% 0.009% 0.012% 0.044% 0.056%
510
600
0.002% 0.003% 0.005% 0.010% 0.028% 0.038%
610
700
0.001% 0.003% 0.003% 0.007% 0.008% 0.022%
710
800
0.001% 0.002% 0.005% 0.024% 0.012% 0.038%
850
1450
* 0.47% * 1.40% * 0.48% * 1.38% * 0.50% * 1.40%
1500
2000
**
**
**
**
**
Notes: *, ** - Questionable reference data
@Gas for Windows Version 4.0 - User's Manual
**
Chapter 5 - Speed and Accuracy
Page 46
COMPARISON OF RESULTS WITH HYLAND & WEXLER [8]
SATURATED HUMIDITY RATIO OF MOIST AIR
(kg of Water Vapor/kg of Dry Air)
TABLE 2 - Pressure = 1 bar
Temp deg C Hyland & Wexler
@Air
@Gas
0
0.00384
.00834
.00834
90
1.4833
1.4835
1.4833
TABLE 26 - Pressure = 5 bar
Temp deg C Hyland & Wexler
@Air
@Gas
0
0.000775
0.000777
0.000777
90
0.10368
0.10375
0.10374
100
0.16201
0.16207
0.16205
150
13.041
12.989
12.989
TABLE 27 - Pressure = 10 bar
Temp deg C Hyland & Wexler
@Air
@Gas
0
0.000394
0.000396
0.000396
90
0.04838
0.04844
0.04840
100
0.07251
0.07258
0.07257
150
0.5974
0.5069
0.5970
160
1.0718
1.0708
1.0709
170
2.5434
2.5400
2.5403
TABLE 28 - Pressure = 50 bar
Temp deg C Hyland & Wexler
@Air
@Gas
0
9.09E-5
9.25E-5
9.27E-5
90
0.00985
0.00988
0.00989
100
0.01430
0.01434
0.01435
150
0.0736
0.0732
0.0733
160
0.0993
0.0986
0.0987
170
0.1336
0.1324
0.1325
180
0.1796
0.1778
0.1779
200
0.3306
0.3263
0.3263
@Gas for Windows Version 4.0 - User's Manual
Chapter 5 - Speed and Accuracy
Page 47
COMPARISON OF RESULTS WITH HYLAND & WEXLER [8]
SPECIFIC VOLUME OF SATURATED MOIST AIR
(m3/kg of Dry Air)
TABLE 29
- Pressure = 1 bar
Temp
Hyland & Wexler
@Air
@Gas
Deg C
Value
Uncert
Value
Error
Value
Error
0
0.78846
0.00010
0.78847
0.00001
0.78846
0.00000
90
3.4974
0.00029
3.4973
-0.0001
3.4976
0.0002
TABLE 30 - Pressure = 5 bar
Temp
Hyland & Wexler
@Air
@Gas
Deg C
Value
Uncert
Value
Error
Value
Error
0
0.15657
0.00011
0.15657
0.00000
0.15657
0.00000
90
0.24273
0.00015
0.24270
-0.00003
0.24271
-0.00002
100
0.26904
0.00020
0.26902
-0.00002
0.26902
-0.00002
150
5.115
0.0063
5.117
0.002
5.116
0.001
TABLE 31 - Pressure = 10 bar
Temp
Hyland & Wexler
@Air
Deg C
Value
Uncert
0
0.078022
0.00015
0.078023 0.000001 0.078022
0.000000
90
0.11226
0.00017
0.11225
-0.00001
0.11225
-0.00001
100
0.11942
0.00022
0.11940
-0.00002
0.11940
-0.00002
150
0.23281
0.00165
0.23289
0.00008
0.23288
0.00007
160
0.32711
0.00120
0.32732
0.00021
0.32729
0.00018
170
0.61489
0.00152
0.61553
0.00064
0.61547
0.00058
Value
Error
@Gas
Value
Error
TABLE 32 - Pressure = 50 bar
Temp
Hyland & Wexler
@Air
deg C
Value
Uncert
0
0.015331
0.00077
0.015324 -0.000007 0.015324
-0.000007
90
0.021310
0.00050
0.021302 -0.000008 0.021301
-0.000009
100
0.022073
0.00053
0.022066 -0.000007 0.022065
-0.000008
150
0.02727
0.00186
0.02729
0.00002
0.02729
0.00002
160
0.02885
0.00256
0.02888
0.00003
0.02888
0.00003
170
0.03077
0.00346
0.03082
0.00005
0.03081
0.00004
180
0.03315
0.00459
0.03323
0.00008
0.03323
0.00008
200
0.0402
0.0076
0.0404
0.0012
0.0404
0.0002
Value
Error
@Gas
Value
@Gas for Windows Version 4.0 - User's Manual
Error
Chapter 5 - Speed and Accuracy
Page 48
The differences in saturated humidity ratios between @Air or @Gas and Hyland & Wexler can
be attributed mostly to the equations used to calculate the pressure of saturated vapor over
liquid water. @Air and @Gas use the latest equations provided by IAPWS [7].
In the following comparisons, the properties calculated by @Air and @Gas use the saturated
humidity ratio as calculated by Hyland & Wexler in order to show a comparison based on the
same composition.
@Gas for Windows Version 4.0 - User's Manual
Chapter 6 - References
Page 49
6
REFERENCES
1. Tables of Thermal Properties of Gases, NBS Circular 564, 1955
2. Vasserman, A. A., Kazavchinskii, Ya Z., and Rabinovich, V. A., Thermophysical
Properties of Air and Air Components, Nauka Press, Moscow, 1966; English translation
by Israel Program for Scientific Translations, Ltd., available from NTIS, Springfield, Va.,
1971,as TT70-50095.
3. Rabinovich, V. A., Beketov, V. G., Moist Gases: Thermodynamic Properties, Begell
House, Inc., New York, 1995.
4. Hirschfelder, J. O., Curtiss, C. F., and Bird, R. B., Molecular Theory of Liquids and
Gases, John Wiley and Sons, 1954.
5. Mangum, B. W., and Furukawa, G. T., Guidelines for Realizing the International
Temperature Scale of 1990 (ITS-90), NIST Technical Note 1265, 1990.
6. Thermodynamic and Transport Properties of Steam, ASME, New York, NY, 1993.
7. The IAPWS Formulation 1995 for the Thermodynamic Properties of Ordinary Water
Substance for General and Scientific Use, International Association for the Properties of
Water and Steam, Paris France, September 1995
8. R. W. Hyland, A. Wexler, 1983, “Formulations for the Thermodynamic Properties of Dry
Air from 173.15 K to 473.15 K, and of Saturated Moist Air from 173.25 K to 372.15 K, at
Pressures to 5 MPa”, ASHRAE Transactions 89(2A):520-35
9. Robert C. Reid, John M. Prausnitz, Bruce E. Poling, The Properties of Gases and
Liquids, Fourth Edition,McGraw Hill, Inc.
10. American Society of Heating, Refrigeration and Air-Conditioning Engineers (ASHRAE)
– Fundamentals 1993
@Gas for Windows Version 4.0 - User's Manual
Appendix I - @Gas Detailed Function Listing
Page 51
APPENDIX I
DETAILED FUNCTION LISTING
This section contains detailed descriptions of each of the @Gas functions which can be called
from the GASPRP32.DLL (or GASPROPS.DLL) as listed below:
•
GasPTXV
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
GasPVXT
GasTVXP
GasPTXH
GasPTXS
GasPTXHS
GasPTXSS
GasPTXC
GasPTXM
GasPTXK
GasPTXW
GasPXD
GasXW
GasWX
GasXMW
GasPHXT
GasPSXT
GasPTXL
GasVapPT
GasVapTP
GasCondPTH
GasCondPTS
GasVer
@Gas for Windows Version 4.0 - User's Manual
Appendix I - @Gas Detailed Function Listing
Page 52
GasPTXV
GasPTXV(pressure, temperature, XN2, XO2, XAr, XCO2, XH2O, [unit set]) returns the specific volume of the moist gas.
Arguments
pressure
Description
is a value representing the absolute total pressure of the gas in units consistent
with the selected unit set.
temperature
is a value representing the dry bulb temperature of the gas in units consistent
with the selected unit set.
XN2, XO2, XAr, XCO2, XH2O
the gas composition (N2, O2, Ar, CO2, H2O) of the gas. XN2, XO2, XAr and XCO2
are entered as mole fractions of the dry gas with XH2O entered as a humidity
ratio. All of the five arguments must be entered in order even if any are zero. If
32 is added to the unit set, all X values are entered as mole fractions of the wet
gas. If 64 is added to the unit set, mass fractions are substituted wherever mole
fractions are required.
unit set
0 or "ENG", 1 or “SI”, 2 or “EngG”, 3 or “SIF”, 4 or “SIK”, 5 or “MET”, 6 or “METF”
Return Value
Description
specific volume
is the specific volume per mass of dry gas in units consistent with the selected
unit set. If 16 is added to the unit set, output is per mass of wet gas.
Examples
P = 14.696 psia, T = 100 deg F, N2 = 0.740285, O2 = 0.198589, Ar = 0.008855,CO2 = 0.000298, H2O =
0.051973
GasPTXV(14.696,100,0.740285,0.198589,0.008855,0.000298,0.051973,48) = 14.387 [ft3/lbm of wet gas]
@Gas for Windows Version 4.0 - User's Manual
Appendix I - @Gas Detailed Function Listing
Page 53
GasPVXT
GasPVXT(pressure, volume, XN2, XO2, XAr, XCO2, XH2O, [unit set]) returns the temperature of the moist gas.
Arguments
pressure
Description
is a value representing the absolute total pressure of the gas in units consistent
with the selected unit set.
specific volume
is the specific volume per mass of dry gas in units consistent with the selected
unit set. If 16 is added to the unit set, specific volume is per mass of wet gas.
XN2, XO2, XAr, XCO2, XH2O
the gas composition (N2, O2, Ar, CO2, H2O) of the gas. XN2, XO2, XAr and XCO2
are entered as mole fractions of the dry gas with XH2O entered as a humidity
ratio. All of the five arguments must be entered in order even if any are zero. If
32 is added to the unit set, all X values are entered as mole fractions of the wet
gas. If 64 is added to the unit set, mass fractions are substituted wherever mole
fractions are required.
unit set
0 or "ENG", 1 or “SI”, 2 or “EngG”, 3 or “SIF”, 4 or “SIK”, 5 or “MET”, 6 or “METF”
.
Return Value
Description
temperature
is a value representing the dry bulb temperature of the gas in units consistent
with the selected unit set.
Examples
P = 14.696 psia, V = 14.387 [ft3/lbm], N2 = 0.740285, O2 = 0.198589, Ar = 0.008855,CO2 = 0.000298,
H2O = 0.051973
GasPVXT(14.696,14.387,0.740285,0.198589,0.008855,0.000298,0.051973,48) = 100 deg F
@Gas for Windows Version 4.0 - User's Manual
Appendix I - @Gas Detailed Function Listing
Page 54
GasTVXP
GasTVXP(temperature, volume, XN2, XO2, XAr, XCO2, XH2O, [unit set]) returns the pressure of the moist gas.
Arguments
temperature
Description
is a value representing the dry bulb temperature of the gas in units consistent
with the selected unit set.
specific volume
is the specific volume per mass of dry gas in units consistent with the selected
unit set. If 16 is added to the unit set, specific volume is per mass of wet gas.
XN2, XO2, XAr, XCO2, XH2O
the gas composition (N2, O2, Ar, CO2, H2O) of the gas. XN2, XO2, XAr and XCO2
are entered as mole fractions of the dry gas with XH2O entered as a humidity
ratio. All of the five arguments must be entered in order even if any are zero. If
32 is added to the unit set, all X values are entered as mole fractions of the wet
gas. If 64 is added to the unit set, mass fractions are substituted wherever mole
fractions are required.
unit set
0 or "ENG", 1 or “SI”, 2 or “EngG”, 3 or “SIF”, 4 or “SIK”, 5 or “MET”, 6 or “METF”
.
Return Value
Description
pressure
is a value representing the absolute total pressure of the gas in units consistent
with the selected unit set.
Examples
T = 100 deg F, V = 14.387 [ft3/lbm], N2 = 0.740285, O2 = 0.198589, Ar = 0.008855,CO2 = 0.000298,
H2O = 0.051973
GasTVXP(100,14.387,0.740285,0.198589,0.008855,0.000298,0.051973,48) = 14.696 [psia]
@Gas for Windows Version 4.0 - User's Manual
Appendix I - @Gas Detailed Function Listing
Page 55
GasPTXH
GasPTXH(pressure, temperature, XN2, XO2, XAr, XCO2, XH2O, [unit set]) returns the specific enthalpy of the moist
gas.
Arguments
pressure
temperature
XN2, XO2, XAr, XCO2, XH2O
unit set
Return Value
specific enthalpy
Description
is a value representing the absolute total pressure of the gas in units consistent
with the selected unit set.
is a value representing the dry bulb temperature of the gas in units consistent
with the selected unit set.
the gas composition (N2, O2, Ar, CO2, H2O) of the gas. XN2, XO2, XAr and XCO2
are entered as mole fractions of the dry gas with XH2O entered as a humidity
ratio. All of the five arguments must be entered in order even if any are zero. If
32 is added to the unit set, all X values are entered as mole fractions of the wet
gas. If 64 is added to the unit set, mass fractions are substituted wherever mole
fractions are required.
0 or "ENG", 1 or “SI”, 2 or “EngG”, 3 or “SIF”, 4 or “SIK”, 5 or “MET”, 6 or “METF”
.
Description
is the specific enthalpy per mass of dry gas in units consistent with the selected
unit set and ASHRAE reference point. If 16 is added to the unit set, output is per
mass of wet gas. If 8 is added to the unit set, enthalpy is referenced to absolute
zero temperature.
Examples
P = 14.696 psia, T = 100 deg F, N2 = 0.740285, O2 = 0.198589, Ar = 0.008855,CO2 = 0.000298, H2O =
0.051973
GasPTXH(14.696,100,0.740285,0.198589,0.008855,0.000298,0.051973,48) = 59.657[Btu/lbm of wet gas]
@Gas for Windows Version 4.0 - User's Manual
Appendix I - @Gas Detailed Function Listing
Page 56
GasPTXS
GasPTXS(pressure, temperature, XN2, XO2, XAr, XCO2, XH2O, [unit set]) returns the specific entropy of the moist gas.
Arguments
pressure
temperature
XN2, XO2, XAr, XCO2, XH2O
unit set
Return Value
specific entropy
Description
is a value representing the absolute total pressure of the gas in units consistent
with the selected unit set.
is a value representing the dry bulb temperature of the gas in units consistent
with the selected unit set.
the gas composition (N2, O2, Ar, CO2, H2O) of the gas. XN2, XO2, XAr and XCO2
are entered as mole fractions of the dry gas with XH2O entered as a humidity
ratio. All of the five arguments must be entered in order even if any are zero. If
32 is added to the unit set, all X values are entered as mole fractions of the wet
gas. If 64 is added to the unit set, mass fractions are substituted wherever mole
fractions are required.
0 or "ENG", 1 or “SI”, 2 or “EngG”, 3 or “SIF”, 4 or “SIK”, 5 or “MET”, 6 or “METF”
.
Description
is the specific entropy per mass of dry gas in units consistent with the selected
unit set and ASHRAE reference point If 16 is added to the unit set, output is per
mass of wet gas. If 8 is added to the unit set, entropy is referenced to absolute
zero temperature.
Examples
P = 14.696 psia, T = 100 deg F, N2 = 0.740285, O2 = 0.198589, Ar = 0.008855,CO2 = 0.000298, H2O =
0.051973
GasPTXS(14.696,100,0.740285,0.198589,0.008855,0.000298,0.051973,48) = 0.1154 [Btu/F/lbm of wet gas]
@Gas for Windows Version 4.0 - User's Manual
Appendix I - @Gas Detailed Function Listing
Page 57
GasPTXHs
GasPTXHs(pressure, temperature, XN2, XO2, XAr, XCO2, XH2O, [unit set]) returns the saturated specific enthalpy of
the moist gas.
Arguments
pressure
temperature
XN2, XO2, XAr, XCO2, XH2O
unit set
Return Value
specific enthalpy of gas
saturated with water vapor
Description
is a value representing the absolute total pressure of the gas in units consistent
with the selected unit set.
is a value representing the dry bulb temperature of the gas in units consistent
with the selected unit set.
the gas composition (N2, O2, Ar, CO2, H2O) of the gas. XN2, XO2, XAr and XCO2
are entered as mole fractions of the dry gas with XH2O entered as a humidity
ratio. All of the five arguments must be entered in order even if any are zero. If
32 is added to the unit set, all X values are entered as mole fractions of the wet
gas. If 64 is added to the unit set, mass fractions are substituted wherever mole
fractions are required.
0 or "ENG", 1 or “SI”, 2 or “EngG”, 3 or “SIF”, 4 or “SIK”, 5 or “MET”, 6 or “METF”
.
Description
is the specific enthalpy per mass of dry
gas in units consistent with the selected unit set and ASHRAE reference point If
16 is added to the unit set, output is per mass of wet gas. If 8 is added to the unit
set, enthalpy is referenced to absolute zero temperature.
Examples
P = 14.696 psia, T = 100 deg F, N2 = 0.740285, O2 = 0.198589, Ar = 0.008855,CO2 = 0.000298, H2O =
0.051973
GasPTXHs(14.696,100,0.740285,0.198589,0.008855,0.000298,0.051973) = 68.806 [Btu/lbm of wet gas]
@Gas for Windows Version 4.0 - User's Manual
Appendix I - @Gas Detailed Function Listing
Page 58
GasPTXSs
GasPTXSs(pressure, temperature, XN2, XO2, XAr, XCO2, XH2O, [unit set]) returns the saturated specific entropy of
the moist gas.
Arguments
pressure
temperature
XN2, XO2, XAr, XCO2, XH2O
unit set
Return Value
specific entropy of gas
saturated with water vapor
Description
is a value representing the absolute total pressure of the gas in units consistent
with the selected unit set.
is a value representing the dry bulb temperature of the gas in units consistent
with the selected unit set.
the gas composition (N2, O2, Ar, CO2, H2O) of the gas. XN2, XO2, XAr and XCO2
are entered as mole fractions of the dry gas with XH2O entered as a humidity
ratio. All of the five arguments must be entered in order even if any are zero. If
32 is added to the unit set, all X values are entered as mole fractions of the wet
gas. If 64 is added to the unit set, mass fractions are substituted wherever mole
fractions are required.
0 or "ENG", 1 or “SI”, 2 or “EngG”, 3 or “SIF”, 4 or “SIK”, 5 or “MET”, 6 or “METF”
.
Description
is the specific entropy per mass of dry
gas in units consistent with the selected unit set and ASHRAE reference point If
16 is added to the unit set, output is per mass of wet gas. If 8 is added to the unit
set, entropy is referenced to absolute zero temperature.
Examples
P = 14.696 psia, T = 100 deg F, N2 = 0.740285, O2 = 0.198589, Ar = 0.008855,CO2 = 0.000298, H2O =
0.051973
GasPTXSs(14.696,100,0.740285,0.198589,0.008855,0.000298,0.051973,48) = 0.1319 [Btu/F/lbm of wet gas]
@Gas for Windows Version 4.0 - User's Manual
Appendix I - @Gas Detailed Function Listing
Page 59
GasPTXC
GasPTXC(pressure, temperature, XN2, XO2, XAr, XCO2, XH2O, [unit set]) returns the specific heat of the moist gas.
Arguments
pressure
temperature
XN2, XO2, XAr, XCO2, XH2O
unit set
Return Value
specific heat
Description
is a value representing the absolute total pressure of the gas in units consistent
with the selected unit set.
is a value representing the dry bulb temperature of the gas in units consistent
with the selected unit set.
the gas composition (N2, O2, Ar, CO2, H2O) of the gas. XN2, XO2, XAr and XCO2
are entered as mole fractions of the dry gas with XH2O entered as a humidity
ratio. All of the five arguments must be entered in order even if any are zero. If
32 is added to the unit set, all X values are entered as mole fractions of the wet
gas. If 64 is added to the unit set, mass fractions are substituted wherever mole
fractions are required.
0 or "ENG", 1 or “SI”, 2 or “EngG”, 3 or “SIF”, 4 or “SIK”, 5 or “MET”, 6 or “METF”
.
Description
is the specific enthalpy per mass of dry gas in units consistent with the selected
unit set and ASHRAE reference point. If 16 is added to the unit set, output is per
mass of wet gas
Examples
P = 14.696 psia, T = 100 deg F, N2 = 0.740285, O2 = 0.198589, Ar = 0.008855,CO2 = 0.000298, H2O =
0.051973
GasPTXC(14.696,100,0.740285,0.198589,0.008855,0.000298,0.051973,48) = 0.24757[Btu/lbm/F of wet gas]
@Gas for Windows Version 4.0 - User's Manual
Appendix I - @Gas Detailed Function Listing
Page 60
GasPTXM
GasPTXM(pressure, temperature, XN2, XO2, XAr, XCO2, XH2O, [unit set]) returns the dynamic viscosity of the moist
gas.
Arguments
pressure
temperature
XN2, XO2, XAr, XCO2, XH2O
unit set
Return Value
viscosity
Description
is a value representing the absolute total pressure of the gas in units consistent
with the selected unit set.
is a value representing the dry bulb temperature of the gas in units consistent
with the selected unit set.
the gas composition (N2, O2, Ar, CO2, H2O) of the gas. XN2, XO2, XAr and XCO2
are entered as mole fractions of the dry gas with XH2O entered as a humidity
ratio. All of the five arguments must be entered in order even if any are zero. If
32 is added to the unit set, all X values are entered as mole fractions of the wet
gas. If 64 is added to the unit set, mass fractions are substituted wherever mole
fractions are required.
0 or "ENG", 1 or “SI”, 2 or “EngG”, 3 or “SIF”, 4 or “SIK”, 5 or “MET”, 6 or “METF”
.
Description
is the dynamic viscosity based on the flow of dry gas in units consistent with the
selected unit set and ASHRAE reference point. If 16 is added to the unit set,
output is based on the mass of wet gas
Examples
P = 14.696 psia, T = 100 deg F, N2 = 0.740285, O2 = 0.198589, Ar = 0.008855,CO2 = 0.000298, H2O =
0.051973
GasPTXM(14.696,100,0.740285,0.198589,0.008855,0.000298,0.051973,48) = 0.0457[lbm/hr/ft of wet gas]
@Gas for Windows Version 4.0 - User's Manual
Appendix I - @Gas Detailed Function Listing
Page 61
GasPTXK
GasPTXK(pressure, temperature, XN2, XO2, XAr, XCO2, XH2O, [unit set]) returns the thermal conductivity of the moist
gas.
Arguments
pressure
temperature
XN2, XO2, XAr, XCO2, XH2O
unit set
Return Value
conductivity
Description
is a value representing the absolute total pressure of the gas in units consistent
with the selected unit set.
is a value representing the dry bulb temperature of the gas in units consistent
with the selected unit set.
the gas composition (N2, O2, Ar, CO2, H2O) of the gas. XN2, XO2, XAr and XCO2
are entered as mole fractions of the dry gas with XH2O entered as a humidity
ratio. All of the five arguments must be entered in order even if any are zero. If
32 is added to the unit set, all X values are entered as mole fractions of the wet
gas. If 64 is added to the unit set, mass fractions are substituted wherever mole
fractions are required.
0 or "ENG", 1 or “SI”, 2 or “EngG”, 3 or “SIF”, 4 or “SIK”, 5 or “MET”, 6 or “METF”
.
Description
is the thermal conductivity of the gas mixture in units consistent with the selected
unit set.
Examples
P = 14.696 psia, T = 100 deg F, N2 = 0.740285, O2 = 0.198589, Ar = 0.008855,CO2 = 0.000298, H2O =
0.051973
GasPTXK(14.696,100,0.740285,0.198589,0.008855,0.000298,0.051973,32) = 0.01544[Btu/hr/ft/F]
@Gas for Windows Version 4.0 - User's Manual
Appendix I - @Gas Detailed Function Listing
Page 62
GasPTXW
GasPTXW(pressure, temperature, XN2, XO2, XAr, XCO2, XH2O, [unit set]) returns the saturated humidity ratio of the
moist gas.
Arguments
pressure
Description
is a value representing the absolute total pressure of the gas in units consistent
with the selected unit set.
temperature
is a value representing the dry bulb temperature of the gas in units consistent
with the selected unit set.
XN2, XO2, XAr, XCO2, XH2O
the gas composition (N2, O2, Ar, CO2, H2O) of the gas. XN2, XO2, XAr and XCO2
are entered as mole fractions of the dry gas with XH2O entered as a humidity
ratio. All of the five arguments must be entered in order even if any are zero. If
32 is added to the unit set, all X values are entered as mole fractions of the wet
gas. If 64 is added to the unit set, mass fractions are substituted wherever mole
fractions are required.
unit set
0 or "ENG", 1 or “SI”, 2 or “EngG”, 3 or “SIF”, 4 or “SIK”, 5 or “MET”, 6 or “METF”
.
Return Value
Description
humidity ratio of gas
saturated with water vapor
is the specific volume per mass of dry
gas in units consistent with the selected unit set. If 16 is added to the unit set,
output is per mass of wet gas.
Examples
P = 14.696 psia, T = 100 deg F, N2 = 0.740285, O2 = 0.198589, Ar = 0.008855,CO2 = 0.000298, H2O =
0.051973
GasPTXW(14.696,100,0.740285,0.198589,0.008855,0.000298,0.051973,32) = 0.04324 [lbm water vapor/lbm of
dry gas]
@Gas for Windows Version 4.0 - User's Manual
Appendix I - @Gas Detailed Function Listing
Page 63
GasPXD
GasPXD(pressure, XN2, XO2, XAr, XCO2, XH2O, [unit set])
returns the dew point temperature of the moist gas.
Arguments
pressure
Description
is a value representing the absolute total pressure of the gas in units consistent
with the selected unit set.
XN2, XO2, XAr, XCO2, XH2O
the gas composition (N2, O2, Ar, CO2, H2O) of the gas. XN2, XO2, XAr and XCO2
are entered as mole fractions of the dry gas with XH2O entered as a humidity
ratio. All of the five arguments must be entered in order even if any are zero. If
32 is added to the unit set, all X values are entered as mole fractions of the wet
gas. If 64 is added to the unit set, mass fractions are substituted wherever mole
fractions are required.
unit set
0 or "ENG", 1 or “SI”, 2 or “EngG”, 3 or “SIF”, 4 or “SIK”, 5 or “MET”, 6 or “METF”
.
Return Value
Description
dew point temperature
is a value representing the temperature, in units consistent with the selected unit
set, below which the moisture in the gas begins to condense.
Examples
P = 14.696 psia, N2 = 0.740285, O2 = 0.198589, Ar = 0.008855,CO2 = 0.000298, H2O = 0.051973
GasPXD(14.696,0.740285,0.198589,0.008855,0.000298,0.051973,48) = 92.68 [deg F]
@Gas for Windows Version 4.0 - User's Manual
Appendix I - @Gas Detailed Function Listing
Page 64
GasXW
GasXW(XN2, XO2, XAr, XCO2, XH2O, [unit set])
returns the humidity ratio of the moist gas.
Arguments
XN2, XO2, XAr, XCO2, XH2O
Description
the gas composition (N2, O2, Ar, CO2, H2O) of the gas. XN2, XO2, XAr and XCO2
are entered as mole fractions of the dry gas with XH2O entered as a humidity
ratio. All of the five arguments must be entered in order even if any are zero. If
32 is added to the unit set, all X values are entered as mole fractions of the wet
gas. If 64 is added to the unit set, mass fractions are substituted wherever mole
fractions are required.
unit set
0 or "ENG", 1 or “SI”, 2 or “EngG”, 3 or “SIF”, 4 or “SIK”, 5 or “MET”, 6 or “METF”
.
Return Value
Description
humidity ratio
is a value representing the ratio of the mass of water vapor in the gas to the
mass of all the other gas components.
Examples
N2 = 0.740285, O2 = 0.198589, Ar = 0.008855,CO2 = 0.000298, H2O = 0.051973
GasXW(0.740285,0.198589,0.008855,0.000298,0.051973,32) = 0.3409 [mass of water per mass of dry gas]
@Gas for Windows Version 4.0 - User's Manual
Appendix I - @Gas Detailed Function Listing
Page 65
GasWX
GasWX(XN2, XO2, XAr, XCO2, XH2O, [unit set])
returns the mole fraction of water vapor.
Arguments
XN2, XO2, XAr, XCO2, XH2O
Description
the gas composition (N2, O2, Ar, CO2, H2O) of the gas. XN2, XO2, XAr and XCO2
are entered as mole fractions of the dry gas with XH2O entered as a humidity
ratio. All of the five arguments must be entered in order even if any are zero. If
32 is added to the unit set, all X values are entered as mole fractions of the wet
gas. If 64 is added to the unit set, mass fractions are substituted wherever mole
fractions are required.
unit set
0 or "ENG", 1 or “SI”, 2 or “EngG”, 3 or “SIF”, 4 or “SIK”, 5 or “MET”, 6 or “METF”
.
Return Value
Description
water vapor mole fraction
is a value representing mole fraction of water vapor in the gas.
Examples
N2 = 0.740285, O2 = 0.198589, Ar = 0.008855,CO2 = 0.000298, W = 0.0310
GasWX(0.740285,0.198589,0.008855,0.000298,0.0309,0) = 0.05197 [mass of water per mass of dry gas]
@Gas for Windows Version 4.0 - User's Manual
Appendix I - @Gas Detailed Function Listing
Page 66
GasXMW
GasXMW(XN2, XO2, XAr, XCO2, XH2O, [unit set])
returns the molecular weight of the moist gas.
Arguments
XN2, XO2, XAr, XCO2, XH2O
Description
the gas composition (N2, O2, Ar, CO2, H2O) of the gas. XN2, XO2, XAr and XCO2
are entered as mole fractions of the dry gas with XH2O entered as a humidity
ratio. All of the five arguments must be entered in order even if any are zero. If
32 is added to the unit set, all X values are entered as mole fractions of the wet
gas. If 64 is added to the unit set, mass fractions are substituted wherever mole
fractions are required.
unit set
0 or "ENG", 1 or “SI”, 2 or “EngG”, 3 or “SIF”, 4 or “SIK”, 5 or “MET”, 6 or “METF”
.
Return Value
Description
molecular weight
is a value representing molecular weight of the dry gas. If 16 is added to the unit
set, the molecular weight is per mass of wet gas.
Examples
N2 = 0.740285, O2 = 0.198589, Ar = 0.008855,CO2 = 0.000298, H2O = 0.051973
GasXMW(0.740285,0.198589,0.008855,0.000298,0.051973,48) = 28.3957 [lbs per mole of wet gas]
@Gas for Windows Version 4.0 - User's Manual
Appendix I - @Gas Detailed Function Listing
Page 67
GasPHXT
GasPHXT(pressure, enthalpy, XN2, XO2, XAr, XCO2, XH2O, [unit set]) returns the temperature of the moist gas.
Arguments
pressure
specific enthalpy
XN2, XO2, XAr, XCO2, XH2O
unit set
Return Value
temperature
Description
is a value representing the absolute total pressure of the gas in units consistent
with the selected unit set.
is the specific enthalpy per mass of dry gas in units consistent with the selected
unit set and ASHRAE reference point. If 16 is added to the unit set, enthalpy is
per mass of wet gas. If 8 is added to the unit set, enthalpy is referenced to 0º K.
the gas composition (N2, O2, Ar, CO2, H2O) of the gas. XN2, XO2, XAr and XCO2
are entered as mole fractions of the dry gas with XH2O entered as a humidity
ratio. All of the five arguments must be entered in order even if any are zero. If
32 is added to the unit set, all X values are entered as mole fractions of the wet
gas. If 64 is added to the unit set, mass fractions are substituted wherever mole
fractions are required.
0 or "ENG", 1 or “SI”, 2 or “EngG”, 3 or “SIF”, 4 or “SIK”, 5 or “MET”, 6 or “METF”
. .
Description
is the gas’s dry bulb temperature in units consistent with the selected unit set. If
the resulting temperature is below the dew point, the value accounts for the
condensed water.
Examples
P = 14.696 psia, H = 59.657 Btu/lb, N2 = 0.740285, O2 = 0.198589, Ar = 0.008855,CO2 = 0.000298,
H2O = 0.051973
GasPHXT(14.696,59.657,0.740285,0.198589,0.008855,0.000298, 0.051973,48) = 100[deg F]
@Gas for Windows Version 4.0 - User's Manual
Appendix I - @Gas Detailed Function Listing
Page 68
GasPSXT
GasPSXT(pressure, entropy, XN2, XO2, XAr, XCO2, XH2O, [unit set]) returns the temperature of the moist gas.
Arguments
pressure
specific entropy
XN2, XO2, XAr, XCO2, XH2O
unit set
Return Value
temperature
Description
is a value representing the absolute total pressure of the gas in units consistent
with the selected unit set.
is the specific entropy per mass of dry gas in units consistent with the selected
unit set and ASHRAE reference point. If 16 is added to the unit set, entropy is
per mass of wet gas. If 8 is added to the unit set, entropy is referenced to 0º K.
the gas composition (N2, O2, Ar, CO2, H2O) of the gas. XN2, XO2, XAr and XCO2
are entered as mole fractions of the dry gas with XH2O entered as a humidity
ratio. All of the five arguments must be entered in order even if any are zero. If
32 is added to the unit set, all X values are entered as mole fractions of the wet
gas. If 64 is added to the unit set, mass fractions are substituted wherever mole
fractions are required.
0 or "ENG", 1 or “SI”, 2 or “EngG”, 3 or “SIF”, 4 or “SIK”, 5 or “MET”, 6 or “METF”
.
Description
is the gas’s dry bulb temperature in units consistent with the selected unit set. If
the resulting temperature is below the dew point, the value accounts for the
condensed water.
Examples
P = 14.696 psia, S = 0.1154 Btu/lb/F, N2 = 0.740285, O2 = 0.198589, Ar = 0.008855,CO2 = 0.000298,
H2O = 0.051973
GasPSXT(14.696,0.1154,0.740285,0.198589,0.008855,0.000298, 0.051973,48) = 100[deg F]
@Gas for Windows Version 4.0 - User's Manual
Appendix I - @Gas Detailed Function Listing
Page 69
GasPTXL
GasPTXL(pressure, temperature, XN2, XO2, XAr, XCO2, XH2O, [unit set]) returns the mass of water condensed per
mass of gas.
Arguments
pressure
temperature
XN2, XO2, XAr, XCO2, XH2O
unit set
Return Value
water condensed
Description
is a value representing the absolute total pressure of the gas in units consistent
with the selected unit set.
is a value representing the dry bulb temperature of the gas in units consistent
with the selected unit set.
the gas composition (N2, O2, Ar, CO2, H2O) of the gas. XN2, XO2, XAr and XCO2
are entered as mole fractions of the dry gas with XH2O entered as a humidity
ratio. All of the five arguments must be entered in order even if any are zero. If
32 is added to the unit set, all X values are entered as mole fractions of the wet
gas. If 64 is added to the unit set, mass fractions are substituted wherever mole
fractions are required.
0 or "ENG", 1 or “SI”, 2 or “EngG”, 3 or “SIF”, 4 or “SIK”, 5 or “MET”, 6 or “METF”
.
Description
is the mass of water condensed per mass of dry gas in units consistent with the
selected unit set and ASHRAE reference point. If 16 is added to the unit set,
output is per mass of wet gas. If temperature is above dew point, the function
returns 0.
Examples
P = 14.696 psia, T = 50 deg F, N2 = 0.740285, O2 = 0.198589, Ar = 0.008855,CO2 = 0.000298, H2O = 0.051973
GasPTXL(14.696,50,0.740285,0.198589,0.008855,0.000298,0.051973, 32) = 0.02556 [lbm of water/lbm of wet
gas]
@Gas for Windows Version 4.0 - User's Manual
Appendix I - @Gas Detailed Function Listing
Page 70
GasVapPT
GasVapPT(pressure, [unit set]) returns the saturation temperature of the water vapor.
Arguments
pressure
Description
is a value representing the absolute total pressure of gas in units consistent with
the selected unit set.
unit set
0 or "ENG", 1 or “SI”, 2 or “EngG”, 3 or “SIF”, 4 or “SIK”, 5 or “MET”, 6 or “METF”
.
Return Value
Description
temperature
is a value representing the saturation temperature of water vapor in units
consistent with the selected unit set.
Examples
P = 14.696 psia
GasVapPT(14.696,0) = 211.95 deg F
@Gas for Windows Version 4.0 - User's Manual
Appendix I - @Gas Detailed Function Listing
Page 71
GasVapTP
GasVapPT(temperature, [unit set]) returns the saturation temperature of the water vapor.
Arguments
temperature
Description
is a value representing the temperature of the gas in units consistent with the
selected unit set.
unit set
0 or "ENG", 1 or “SI”, 2 or “EngG”, 3 or “SIF”, 4 or “SIK”, 5 or “MET”, 6 or “METF”
.
Return Value
Description
pressure
is a value representing the saturation pressure of water vapor in units consistent
with the selected unit set.
Examples
T = 211.95 deg F
GasVapTP(211.95,0) = 14.696 psia
@Gas for Windows Version 4.0 - User's Manual
Appendix I - @Gas Detailed Function Listing
Page 72
GasCondPTH
GasCondPTH(pressure, temperature, [unit set]) returns the specific enthalpy of compressed water.
Arguments
pressure
Description
is a value representing the absolute total pressure in units consistent with the
selected unit set.
temperature
is a value representing the temperature of the water in units consistent with the
selected unit set.
unit set
0 or "ENG", 1 or “SI”, 2 or “EngG”, 3 or “SIF”, 4 or “SIK”, 5 or “MET”, 6 or “METF”
.
Return Value
Description
specific enthalpy
is the specific enthalpy per mass of water in units consistent with the selected
unit set and referenced to saturated liquid water at the triple point.
Examples
P = 14.696 psia, T = 100 deg F
GasCondPTH(14.696, 100, 0) = 68.052 Btu/lbm
@Gas for Windows Version 4.0 - User's Manual
Appendix I - @Gas Detailed Function Listing
Page 73
GasCondPTS
GasCondPTS(pressure, temperature, [unit set]) returns the specific entropy of compressed water.
Arguments
pressure
Description
is a value representing the absolute total pressure in units consistent with the
selected unit set.
temperature
is a value representing the temperature of the water in units consistent with the
selected unit set.
unit set
0 or "ENG", 1 or “SI”, 2 or “EngG”, 3 or “SIF”, 4 or “SIK”, 5 or “MET”, 6 or “METF”
.
Return Value
Description
specific entropy
is the specific entropy per mass of water in units consistent with the selected unit
set and referenced to saturated liquid water at the triple point.
Examples
P = 14.696 psia, T = 100 deg F
GasCondPTS(14.696, 100, 0) = 0.1296 Btu/F/lbm
@Gas for Windows Version 4.0 - User's Manual
Appendix I - @Gas Detailed Function Listing
Page 74
GasVer
GasVer() returns the @Gas version and serial number.
Arguments
None
Return Value
Description
Version and Serial Number
is a floating-point number whose integer part represents the major version
number of the DLL. The first digit to the right of the decimal point represents the
minor version number. The remaining digits represent the serial number.
Examples
GasVer = 4.081234
The version number is 4.0. The serial number is 81234.
@Gas for Windows Version 4.0 - User's Manual
Appendix II - @Gas Error Codes
Page 75
APPENDIX II
@GAS ERROR CODES
If an error is encountered by an @Gas function during calculation of a gas property, the
function returns a negative value (-1000 or lower). This Appendix presents the error numbers
together with an explanation of each possible error condition. The header file GASERR.H
defines mnemonic constants for the error codes. The mnemonics are listed below also.
The error codes listed below are accessible only from Windows programming languages such
as Visual C++ or Visual BASIC. The interfaces provided for Excel, Mathcad, and 1-2-3
intercept these error numbers and return appropriate Excel, Mathcad, or 1-2-3 error values.
This is done to avoid inadvertent use of an error value in a cell equation.
ERR_OUTOFRANGE(-1002):
Out of Range
The input values represent a state point that is outside of the @Gas pressure or temperature
range.
ERR_NOTAVAILABLE(-1003): Not Available
The property requested is not available at these conditions.
ERR_NOTDEFINED(-1004):
Not Defined
The property requested is not defined at these conditions.
ERR_NOSAT(-1100):
No Saturation
The temperature of the gas is above the saturation temperature of the water vapor.
ERR_H2O(-1200):
H2O composition error
The H2O component is less than 0.
ERR_N2(-1300):
N2 composition error
The Nitrogen component is less than 0.
ERR_O2(-1400):
O2 composition error
The Oxygen component is less than 0.
ERR_CO2(-1500):
CO2 composition error
The CO2 component is less than 0.
ERR_AR(-1600):
AR composition error
The Argon component is less than 0.
ERR_MF(-1800):
mole fraction error
None of the gas components entered were greater than 0.
ERR_THIGH(-2000):
Temperature Too High
@Gas will accept a maximum temperature of 2000 deg K.
@Gas for Windows Version 4.0 - User's Manual
Appendix II - @Gas Error Codes
Page 76
ERR_TLOW(-2100):
Temperature Too Low
@Gas will accept a minimum temperature of 180 deg K.
ERR_PHIGH(-3000):
Pressure Too High
@Gas will accept a maximum pressure of 50 bar.
ERR_PLOW(-3100):
Pressure Too Low
@Gas will accept a minimum pressure of 1 Pascal.
ERR_VOLLOW(-4100):
Volume Too Low
Specific volume is below the minimum allowed by @Gas.
ERR_WHIGH(-7000):
Humidity Ratio Too High
The humidity ratio specified is above the saturated humidity ratio for the gas pressure and
temperature.
ERR_WLOW(-7100):
Humidity Ratio Too Low
The humidity ratio specified is below 0.
ERR_HHIGH(-9000}:
Enthalpy Too High
The enthalpy specified represents a state point above the @Gas pressure and temperature
limits.
ERR_HLOW(-9100}:
Enthalpy Too Low
The enthalpy specified represents a state point below the @Gas pressure and temperature
limits.
ERR_SHIGH(-9200}:
Entropy Too High
The entropy specified represents a state point outside the @Gas pressure and temperature
limits.
ERR_SLOW(-9300}:
Entropy Too Low
The entropy specified represents a state point outside the @Gas pressure and
temperature limits.
ERR_INTERNAL (-9999}:
Internal Error
One of the iteration schemes has failed to converge. Contact Techware for support.
@Gas for Windows Version 4.0 - User's Manual
Download PDF