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 www.prosim.net 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 – 2007 AIChE Annual Meeting - Salt Lake City - November 4-9, 2007 SIMULIS® THERMODYNAMICS www.prosim.net Software component for computing thermophysical properties and phase equilibria on pure components or mixtures in Microsoft® Excel, Matlab® or other applications Simulis Thermodynamics – 2007 AIChE Annual Meeting - Salt Lake City - November 4-9, 2007 THERMO-PHYSICAL PROPERTIES SUPPORTED www.prosim.net 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 Simulis Thermodynamics – 2007 AIChE Annual Meeting - Salt Lake City - November 4-9, 2007 FLASHES SUPPORTED www.prosim.net 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-Vapor equilibria Bubble temperature Liquid-Liquid equilibria Flash at given enthalpy and pressure Flash at given temperature and pressure Flash at given temperature and pressure Flash at given vaporization ratio and pressure Simulis Thermodynamics – 2007 AIChE Annual Meeting - Salt Lake City - November 4-9, 2007 PURE COMPONENT PROPERTIES www.prosim.net 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,… Simulis Thermodynamics – 2007 AIChE Annual Meeting - Salt Lake City - November 4-9, 2007 A WIDE SET OF THERMODYNAMIC MODELS www.prosim.net Equations of State Soave-Redlich-Kwong (SRK) Peng-Robinson (PR) Lee-Kesler-Plöcker (LKP) 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… Simulis Thermodynamics – 2007 AIChE Annual Meeting - Salt Lake City - November 4-9, 2007 www.prosim.net EXAMPLE OF CALCULATION PERFORMED WITH SIMULIS® THERMODYNAMICS Phase envelope and hydrate line of a natural gas mixture with PR EOS Pressure (psi) 2200 Tc=222.876 Pc=1 871.646 2000 1800 1600 1400 1200 1000 800 Temp.=60.000 Pres.=600.000 600 400 200 0 -300 -200 -100 0 100 Temperature (°F) Simulis Thermodynamics – 2007 AIChE Annual Meeting - Salt Lake City - November 4-9, 2007 200 300 A FULL SET OF SERVICES AVAILABLE www.prosim.net 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 Simulis Thermodynamics – 2007 AIChE Annual Meeting - Salt Lake City - November 4-9, 2007 OUTLINE www.prosim.net 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 – 2007 AIChE Annual Meeting - Salt Lake City - November 4-9, 2007 WITHIN MICROSOFT® EXCEL www.prosim.net 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 Simulis Thermodynamics – 2007 AIChE Annual Meeting - Salt Lake City - November 4-9, 2007 www.prosim.net EXAMPLE OF A MCCABE & THIELE METHOD FOR BINARY DISTILLATION IN EXCEL Simulis Thermodynamics – 2007 AIChE Annual Meeting - Salt Lake City - November 4-9, 2007 OUTLINE www.prosim.net 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 – 2007 AIChE Annual Meeting - Salt Lake City - November 4-9, 2007 SEAMLESS INTEGRATION IN ANY CODE www.prosim.net 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 Simulis Thermodynamics – 2007 AIChE Annual Meeting - Salt Lake City - November 4-9, 2007 CO THERMODYNAMIC SOCKET www.prosim.net www.colan.org Ability to use an external thermodynamic model (CAPE-OPEN "Property Package") Implementation Thermo 1.0 Thermo 1.1 (Nov. 2007) External software able to generate CO packages (Aspen Properties, Multiflash, PPDS,…) External CAPE-OPEN Property Package Successfully tested with Multiflash (Infochem) PPDS (TUV-NEL) Aspen Properties (AspenTech) COM Thermo (AspenTech) IVCSEPThermoSystem (IVC-SEP) COCO TEA (AmsterCHEM), etc… Simulis® Client Software Thermodynamics MS-Excel ProSimPlus, MATLAB, etc If required, a third party thermo package can be used within any application embedding Simulis® Thermodynamics Simulis Thermodynamics – 2007 AIChE Annual Meeting - Salt Lake City - November 4-9, 2007 CO THERMODYNAMIC PLUG www.prosim.net Successfully tested in www.colan.org Ability to generate CAPE-OPEN Aspen Plus (2004 and v12.1) "Property Packages" to be used within Aspen Hysys (2004 and v3.2) PRO/II (v7.1) compliant modeling tools gPROMS® Implementation Xist (HTRI) Thermo 1.0 UNISIM Design Thermo 1.1 (Nov. 2007) etc… Client Software Simulis® Microsoft® Excel ProSimPlus, Thermodynamics MATLAB, etc CO Property Package generated by Simulis® Thermodynamics 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,…) Simulis Thermodynamics – 2007 AIChE Annual Meeting - Salt Lake City - November 4-9, 2007 www.prosim.net 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 Simulis Thermodynamics – 2007 AIChE Annual Meeting - Salt Lake City - November 4-9, 2007 INTEGRATION IN PROSIMPLUS www.prosim.net 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) Unit Operations Thermodynamics Chemical Reactions GUI Simulis® Thermodynamics ProSimPlus also implements CO Unit Socket Simulis Thermodynamics – 2007 AIChE Annual Meeting - Salt Lake City - November 4-9, 2007 Numerical Methods OUTLINE www.prosim.net 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 – 2007 AIChE Annual Meeting - Salt Lake City - November 4-9, 2007 THE "EXPERT MODE" www.prosim.net 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 Simulis Thermodynamics – 2007 AIChE Annual Meeting - Salt Lake City - November 4-9, 2007 VBSCRIPT MODELS www.prosim.net Code is directly entered in Simulis® Thermodynamics A skeleton is provided Many available functions Function parameters must satisfy a predefined syntax (name, type) Simulis Thermodynamics – 2007 AIChE Annual Meeting - Salt Lake City - November 4-9, 2007 EXTERNAL DLL MODELS www.prosim.net An external DLL is plugged User parameters are supported Many available functions Function parameters must satisfy a predefined syntax (name, type) Simulis Thermodynamics – 2007 AIChE Annual Meeting - Salt Lake City - November 4-9, 2007 VBSCRIPT MODELS VS DLL MODELS www.prosim.net 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,… Simulis Thermodynamics – 2007 AIChE Annual Meeting - Salt Lake City - November 4-9, 2007 THE "EXPERT MODE" www.prosim.net 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 Simulis Thermodynamics – 2007 AIChE Annual Meeting - Salt Lake City - November 4-9, 2007 THE "EXPERT MODE" www.prosim.net 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) Simulis Thermodynamics – 2007 AIChE Annual Meeting - Salt Lake City - November 4-9, 2007 However, no "true re-entrance" between different modes THE "EXPERT MODE" www.prosim.net Both VBScript and external DLL models can be used in CAPE-OPEN thermodynamic packages built with Simulis® Thermodynamics "Expert Mode" of Simulis® Thermodynamics vs CAPEOPEN 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) Simulis Thermodynamics – 2007 AIChE Annual Meeting - Salt Lake City - November 4-9, 2007 CONCLUDING REMARKS www.prosim.net 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") Simulis Thermodynamics – 2007 AIChE Annual Meeting - Salt Lake City - November 4-9, 2007 CONCLUDING REMARKS www.prosim.net 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 Simulis Thermodynamics – 2007 AIChE Annual Meeting - Salt Lake City - November 4-9, 2007 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