HE2MATH v. 1.0
This is the first release which I am going to call “stable”. I will keep the syntax back-compatible with this version for all the minor upgrades of version
This version is not back-compatible with
0.2, all the HE2MATH function calls have to be rewritten when you upgrade from
The distribution script: he2math_1.0.zip.
- Operating System: Windows XP; Windows 7; Windows 8. I have not tested with Windows 10 yet. Let me know if you have!
- Microsoft Office: MS Office 2007; MS Office 2010; MS Office 2013.
- Mathcad: The only supported version is Mathcad 15.
- HEPAK: any version supporting MS Excel function calls (
Download and unpack
HE2MATH script file anywhere you can easily find it later (e.g. your
How to Use HE2MATH
IMPORTANT: this manual applies to a version
Add the reference to HE2MATH Mathcad file in the worksheet:
As soon as the reference is added,
HE2MATH functions can be called within the worksheet. The following are few simple examples describing the syntax of
The first example case defines the density of helium at atmospheric pressure (
101325 Pa) and ambient temperature (
- First two lines define the pressure and temperature of helium at the point of interest. Defined variables
t.1could be then used as parameters of the
- Third line calls
he2math_densityfunction which returns the density of helium at
- The order of inputs is as follows:
- The first and third input parameters of the function correspond to the first and second input codes as per hepak manual. Input codes can be entered as numbers or special variables starting with
property_can be used (e.g.
- The second and forth parameters are input values describing the state of the fluid at the point of interest.
- Syntax of
he2mathscripts is similar to syntax of HEPAK for MS Excel. There are two main differences: the unit system (it’s always SI, see the Units section below for detailed explanation) and the phase calculation code (since
0covers all the scenarios, it’s hard-coded into the script).
- Input codes describe the properties to be entered as the second and forth parameters. In the example above,
property_pressureinput code indicates that the second parameter is pressure,
property_temperatureinput code indicates that the forth parameter is temperature.
- Input codes can be entered as numbers,
property_temperatureare usual Mathcad variables containing values
- The list of possible input codes is defined by
he2math_propertiesvariable and can be displayed using equal sign anywhere in the worksheet.
- All the fluid properties (pressure, temperature, density, enthalpy, etc) inside of
HE2MATHfunctions can be defined with units. Unitless variables are assumed to be in SI system.
HE2MATHdoes not verify the validity of units, i.e. replacement of
kgwould lead to the exact same result. That is because
HE2MATHonly rescales all the units to their corresponding SI representations. Since
kgis a standard SI unit, it is not rescaled after
- All the values are returned by
HE2MATHfunctions with units. Returned values can be rescaled in a standard Mathcad-way by placing a unit next to the variable.
- Avoid, if possible, working with unitless variables.
- The name of the function defines the property to be returned.
- All the functions start with
he2math_and are followed by the name of the property to be calculated.
- The list of the valid function names is defined by
he2math_functionsvariable and can be displayed using equal sign anywhere in the worksheet.
- Calculations of fluid properties in case if they are fully defined by one variable (i.e. saturated temperature at a given pressure) could have been done using special input codes (e.g.
property_saturated_liquid) followed by any value. HEPAK constants (accessible using
heconst()function in Excel) are not yet available.
- The example below shows the calculation of temperature for saturated liquid helium at atmospheric pressure.
In order to use
HE2MATH functions within Mathcad worksheet, it is necessary to have HEPAK macro installed in MS Excel. If HEPAK is already installed (i.e. something like
=hecalc("d",0,"p",101325,"T",300,1) in excel spreadsheet returns a valid result), ignore this part.
HEPAK installation includes the only step of copying HEPAK distribution file (it is usually named
XLSTART folder. This allows to load HEPAK plug-in automatically every time Excel is started.
Open Microsoft Office directory (usually
C:\Program Files\Microsoft Office for Windows 32-bit version and
C:\Program Files (x86)\Microsoft Office for Windows 64-bit version).
Depending from the version of MS Office installed, open the corresponding folder:
|Office Version||Folder Path|
|MS Office 2007 ||
|MS Office 2010 ||
|MS Office 2013 ||
HePak.xla file received from HEPAK distributor there.
To verify that you are done with HEPAK installation, open a new Excel document and type
=hecalc("d",0,"p",101325,"T",300,1) in any cell (or just copy-paste that).
If everything is OK you should see
0.162522. The value shows density of helium in
101325Pa pressure and