© 2019 Jasper van Baten, AmsterCHEM
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 CAPE-OPEN version 1.0 standard.
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.
- 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.
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.
The ThermoSystemAdapter installer is available from the Downloads Page.
The ThermoSystemAdapter package is open-source and free-of-charge.
- 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
- corrected problem with current user registration
- removed dependencies on runtime libraries (static link)
- changed elimination method of 1.1 packages vs 1.0 packages for Aspen Properties not to get shadowed by Aspen COM Thermo
- fixed issues with phase labels
- fixed marshalling problems with [out] non-cleared VARIANT values
- changed default installation folder for current user
- 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
- resolved problem with compound constants
- resolved problem with flash that uses an extensive flash condition
- work around issue with PP not setting vapor fraction in case of vapor fraction flash
- fix to work around PP not setting vapor fraction in case of vapor fraction flash