2007 AIChE Annual Meeting Salt Lake City, Utah #459e CAPE-OPEN Thermodynamic & Physical Properties Interface (TD002) SIMULIS THERMODYNAMICS A CAPE-OPEN COMPLIANT FRAMEWORK FOR USERS AND DEVELOPERS Olivier Baudouin, Alain Vacher, Stéphane Déchelotte ProSim SA Stratège Bâtiment A BP 27210 F-31672 LABEGE Cedex France E-mail: info@prosim.net Web: www.prosim.net
OUTLINE Simulis Thermodynamics overview Its different levels of use Within Microsoft EXCEL Integrated in other codes As a framework to develop new thermodynamic models or to welcome existing ones Concluding remarks
SIMULIS THERMODYNAMICS Software component for computing thermophysical properties and phase equilibria on pure components or mixtures in Microsoft Excel, Matlab or other applications
THERMO-PHYSICAL PROPERTIES SUPPORTED Transport properties Isobaric specific heat (Cp) Dynamic viscosity Thermal conductivity Density Molar Volume Molar density Surface tension Molecular weight Compressibility properties Compressibility factor Gamma (Cp/Cv ratio) Sound speed Thermodynamic properties Enthalpy (H) Entropy (S) Internal energy (U) Isochoric specific heat (Cv) Enthalpy of vaporization Non-ideal properties Activity coefficients Fugacity coefficients and Fugacity Ln of fugacity coefficients Derivatives of the properties with respect to temperature, pressure and number of moles are also provided
FLASHES SUPPORTED Liquid-Vapor equilibria Bubble and dew temperatures and pressures Flash at given temperature (T) and pressure (P) Flash at given vaporization ratio (ω) and P (or T) Flash at given enthalpy (H) and P (or T, or V, or U) Flash at given entropy (S) and P (or T, or V, or H, or U) Flash at given internal energy (U) and P (or T, or V) Flash at given volume (V) and P (or T) T P ω V H S U T P ω V H S U Liquid-Liquid equilibria Flash at given temperature and pressure Liquid-Liquid-Vapor equilibria Bubble temperature Flash at given enthalpy and pressure Flash at given temperature and pressure Flash at given vaporization ratio and pressure
PURE COMPONENT PROPERTIES Supplied with a database of over 2 000 components including AIChE's DIPPR database New components can be added and properties modified Estimation methods are included A regression of experimental data tool is provided Existing in-house property databases can be included All the properties of pure components can be accessed, modified, plotted,
Equations of State Soave-Redlich-Kwong (SRK) Peng-Robinson (PR) Lee-Kesler-Plöcker (LKP) A WIDE SET OF THERMODYNAMIC MODELS Benedict-Webb-Rubin modified Starling (BWRS) Nakamura etc Activity coefficients models NRTL UNIQUAC UNIFAC (Larsen, Dortmund, ) Wilson etc BIP databases included New methods are continuously implemented to cover a wide field of applications: oil & gas, fine chemicals, etc Combined approach models MHV2 MHV1 PSRK etc Specific systems Pure Water (NBS/NRC steam tables - IAPS,1984) Amines Sour-Water etc Electrolytes Edwards UNIQUAC electrolyte ULPDHS etc
EXAMPLE OF CALCULATION PERFORMED WITH SIMULIS THERMODYNAMICS Phase envelope and hydrate line of a natural gas mixture with PR EOS Pressure (psi) 2200 2000 Tc=222.876 Pc=1 871.646 1800 1600 1400 1200 1000 800 600 Temp.=60.000 Pres.=600.000 400 200 0-300 -200-100 0 100 200 300 Temperature ( F)
A FULL SET OF SERVICES AVAILABLE Data regression of pure components experimental properties Graphical display of properties on temperature, pressure or composition ranges Generation and export of property tables (PSF files to HTFS, PVT files to OLGA ) Estimation of pure component properties Link with DPP Calculation of petroleum fractions properties Unit conversions etc All these services become automatically available in any software embedding Simulis Thermodynamics
OUTLINE Simulis Thermodynamics overview Its different levels of use Within Microsoft EXCEL Integrated in other codes As a framework to develop new thermodynamic models or to welcome existing ones Concluding remarks
WITHIN MICROSOFT EXCEL Thermodynamic functions are added to Microsoft Excel and used in spreadsheets as native Excel functions to perform more or less complex engineering calculations but with rigorous thermodynamics
EXAMPLE OF A MCCABE & THIELE METHOD FOR BINARY DISTILLATION IN EXCEL
OUTLINE Simulis Thermodynamics overview Its different levels of use Within Microsoft EXCEL Integrated in other codes As a framework to develop new thermodynamic models or to welcome existing ones Concluding remarks
SEAMLESS INTEGRATION IN ANY CODE Thanks to its component based architecture, Simulis Thermodynamics can be easily embedded in any application that supports the COM/DCOM technology: Visual Basic or VBA (Microsoft Excel) MATLAB C++ Delphi FORTRAN C# etc However, the interface between the embedding application and Simulis Thermodynamics must be coded
CO THERMODYNAMIC SOCKET Ability to use an external thermodynamic model (CAPE-OPEN "Property Package") Successfully tested with Multiflash (Infochem) PPDS (TUV-NEL) Aspen Properties (AspenTech) www.colan.org Implementation Thermo 1.0 Thermo 1.1 (Nov. 2007) COM Thermo (AspenTech) IVCSEPThermoSystem (IVC-SEP) COCO TEA (AmsterCHEM), etc External software able to generate CO packages (Aspen Properties, Multiflash, PPDS, ) External CAPE-OPEN Property Package Simulis Thermodynamics Client Software MS-Excel ProSimPlus, MATLAB, etc If required, a third party thermo package can be used within any application embedding Simulis Thermodynamics
CO THERMODYNAMIC PLUG Ability to generate CAPE-OPEN "Property Packages" to be used within compliant modeling tools Implementation Thermo 1.0 Thermo 1.1 (Nov. 2007) Client Software Microsoft Excel ProSimPlus, MATLAB, etc Simulis Thermodynamics Successfully tested in Aspen Plus (2004 and v12.1) Aspen Hysys (2004 and v3.2) PRO/II (v7.1) gproms Xist (HTRI) UNISIM Design etc CO Property Package generated by Simulis Thermodynamics www.colan.org Modeling tool implementing CO Thermo Socket (AspenPlus, HTRI, ProSimPlus, etc) The thermo of ProSim can be used in software without satisfactory thermo routines A thermo expert can prepare with Simulis Thermodynamics the model for a complex system, and provide it to its colleagues for further "safe" use in their traditional simulation tool (AspenPlus, ProSimPlus, )
IMPLEMENTS THE STANDARDIZED CAPE-OPEN INTERFACES www.colan.org Any application that embeds Simulis Thermodynamics automatically inherits from its CAPE-OPEN standard compliance Seamless integration of Simulis Thermodynamics in many codes is allowed
INTEGRATION IN PROSIMPLUS Thermodynamics Chemical Reactions Unit Operations Numerical Methods GUI Conventional simulator Monolithic program (generally divided into several source files and DLLs) ProSimPlus Thermodynamic calculations are performed within a component (Simulis Thermodynamics) This component implements CAPE-OPEN interfaces (Plug & Socket) ProSimPlus also implements CO Unit Socket Thermodynamics Simulis Thermodynamics Unit Operations Chemical Reactions GUI Numerical Methods
OUTLINE Simulis Thermodynamics overview Its different levels of use Within Microsoft EXCEL Integrated in other codes As a framework to develop new thermodynamic models or to welcome existing ones Concluding remarks
THE "EXPERT MODE" For users who want: to develop their own new thermodynamic models or to integrate in Simulis Thermodynamics exiting models taking advantage of Simulis Thermodynamics environment (pure components properties, unit conversions and management, ) in view to use these developments in other applications (commercial software, Excel, legacy codes, ) Two possibilities are offered: 1. VBScript models 2. External DLL models
VBSCRIPT MODELS Code is directly entered in Simulis Thermodynamics A skeleton is provided Many available functions Function parameters must satisfy a predefined syntax (name, type)
EXTERNAL DLL MODELS An external DLL is plugged User parameters are supported Many available functions Function parameters must satisfy a predefined syntax (name, type)
VBSCRIPT MODELS VS DLL MODELS VBScript models: Interpreted language not very efficient Useful for prototyping or simple functions (Cp, ) Can be a first step DLL models: Can be built using any language (FORTRAN, C++, ) Allows re-use of existing codes (with some modifications) More efficient In both cases access to pure component properties, units management,
THE "EXPERT MODE" VBScript, external DLL and native models can be mixed (each one computing a different property) Priorities must be given Native models will be used except when a VBScript model or a DLL model is available
THE "EXPERT MODE" Combination of VBScript, external DLL and native models is supported User DLL for calculation of H and Cp H (Cp) Cp H (Cp) Native DLL for calculation of H and Cp H (Cp) Cp H (Cp) However, no "true re-entrance" between different modes
THE "EXPERT MODE" Both VBScript and external DLL models can be used in CAPE-OPEN thermodynamic packages built with Simulis Thermodynamics "Expert Mode" of Simulis Thermodynamics vs CAPE- OPEN Thermo Wizard Easy configuration (access to standard pure components databases, ) Predefined access to pure components properties User-friendly existing GUIs to access parameters Full rewriting is not required (possibility to mix with native existing models)
CONCLUDING REMARKS Simulis Thermodynamics allows several levels of use Within Microsoft Excel to perform more or less complex engineering calculations Embedded in other applications taking advantage of the CAPE-OPEN standard interfaces implemented (plug & socket) As a framework to welcome existing thermodynamic models or to develop new ones in view to use them in other applications ("Expert Mode")
CONCLUDING REMARKS These levels of use can coexist in the same organization allowing: Minimization of learning time Consistency of data & results between several applications Reusability of available expertise Permanence of internal knowledge The "Expert Mode" of Simulis Thermodynamics can be an alternative to CO Thermo Wizard in order to make thermo legacy codes CAPE-OPEN compliant No knowledge of CAPE OPEN technology required Reduced development time
2007 AIChE Annual Meeting Salt Lake City, Utah #459e CAPE-OPEN Thermodynamic & Physical Properties Interface (TD002) SIMULIS THERMODYNAMICS A CAPE-OPEN COMPLIANT FRAMEWORK FOR USERS AND DEVELOPERS Olivier Baudouin, Alain Vacher, Stéphane Déchelotte ProSim SA Stratège Bâtiment A BP 27210 F-31672 LABEGE Cedex France E-mail: info@prosim.net Web: www.prosim.net