ThermoSystemAdapter
Applications that use thermodynamics and that only implement the better, more mature and more efficient
CAPE-OPEN thermodynamics version 1.1 standard are unable to deal with thermodynamic server implementations
that merely provide support for the older and deprecated CAPE-OPEN version 1.0 standard.
CAPE-OPEN thermodynamic standard version 1.0 was deprecated December 31, 2017.
ThermoSystemAdapter provides a solution simply by detecting CAPE-OPEN version 1.0 Thermo Systems
installed on the system, and for those for which no version 1.1 Property Package Manager equivalent is detected,
all packages will be exposed.
How does it work
ThermoSystemAdapter contains a version 1.0 Material Object implementation that talks to the CAPE-OPEN version 1.0
Property Package. It exposes all property package version 1.1 functionality by making equivalent calls to the version 1.0
property package, where the version 1.0 Material Object is used to catch and translate the results. Some results are simply
directly forwarded to the version 1.1 context Material Object, while others require some caching and processing. A flash calculation
for example requires in version 1.1 that the collection of equilibrium phases is made known to the version 1.1 context Material Object
before setting any of the equilibrium phase properties. This is resolved by buffering temperature, pressure, phase fraction
and composition before returning the results to the version 1.1 context Material Object.
Limitations
- Although the CAPE-OPEN version 1.1 standard specification can be more efficient, particularly by elimination of the
compound list at each and every calculation by using a context material, the property package under the hood is still of
version 1.0 and efficiency is limited to the version 1.
- CAPE-OPEN version 1.1 has much better defined two-phase definitions; these are not available for 1.0. Only two-phase properties
for the Vapor/Liquid combination are supported (using the version 1.0 phase label "VaporLiquid" and a special attempt for liquid only
calculations in the case of surface tension) and composition derivatives are not supported.
- CAPE-OPEN version 1.1 supplies a list of present compound constants, CAPE-OPEN version 1.0 does not. The list is generated
by attempting to obtain all known compound constants for all compounds in the package, and adding all compound constants to the list
of available compound constants for which at least one call succeeded. This implies no compound constants are supported that does
not appear in the CO-LaN specification tables. Also this incurs a small performance overhead upon loading a version 1.0 document.
- CAPE-OPEN version 1.1 allows for checking whether a particular property can be calculated for a particular phase. CAPE-OPEN
version 1.0 implementations do not support this functionality, and it is assumed that all properties in the property list are
available for all phases.
- CAPE-OPEN version 1.1 allows for checking whether a particular flash calculation is supported. CAPE-OPEN version 1.0 does not.
It is assumed that all flash condition combinations (e.g. overall pressure and overall temperature) for which the ThermoSystemAdapter
can make up a version 1.0 flash string (e.g. "TP") are supported by the version 1.0 property package. If a flash is not actually
supported, all attempts to evaluate a flash will fail.
- CAPE-OPEN version 1.1 allows for specifying which phases are to be considered in a flash calculation. CAPE-OPEN version 1.0
does not. Hence, only flashes that include all defined phases are supported.
- CAPE-OPEN version 1.1 allows for "normal" and "retrograde" flashes. As CAPE-OPEN version 1.0 does not, "normal" and "retrograde" flashes
are not supported.
- CAPE-OPEN version 1.1 allows for passing the existing phases as initial guess to the flash calculation. As CAPE-OPEN version 1.0
does not, initial guesses are never forwarded to the underlying flash calculations.
Note for thermodynamic software vendors: it is advised to provide support for CAPE-OPEN version 1.1. It is not
advised to merely support version 1.0 and point customers to this page. This tool is intended to bridge a gap in existing
implementations, not to provide a long term solution.
Source Code
The ThermoSystemAdapter property package manager is written in Visual Studio 2013, using C++ and ATL. The source code is available, and is included
in the ThermoSystemAdapter installer.
Availability
The ThermoSystemAdapter installer is available from the Downloads Page.
The ThermoSystemAdapter package is open-source and free-of-charge.
Change log
Version 1.0.1
- renamed String.h to StringUtils.h to avoid clashes
- using unordered_map instead of hash_map
- replaced all scope occurrences with __FUNCTIONW__
- partial implementation of get_phaseIds to work around specific issues with one particular implementation
Version 1.0.2
- corrected problem with current user registration
Version 1.0.3
- removed dependencies on runtime libraries (static link)
Version 1.0.4
- changed elimination method of 1.1 packages vs 1.0 packages for Aspen Properties not to get shadowed by Aspen COM Thermo
Version 1.0.5
Version 1.0.6
- fixed issues with phase labels
- fixed marshalling problems with [out] non-cleared VARIANT values
Version 1.0.7
Version 1.0.8
- changed default installation folder for current user
Version 1.0.9
- updated NSIS to 2.5
- fixed problem with property count GetTDependentProperty/GetPDependentProperty
- worked around problems with invalid entries in phase list in 3rd party applications
Version 1.0.10
- resolved problem with compound constants
- resolved problem with flash that uses an extensive flash condition
Version 1.0.11
- work around issue with PP not setting vapor fraction in case of vapor fraction flash
Version 1.0.12
- fix to work around PP not setting vapor fraction in case of vapor fraction flash