Notes and Discussions About DWSIM Development...
DWSIM 3.2 was released, featuring lots of enhancements and one breaking change to the thermo subsystem. The main feature of this version is the new phase identification algorithm (http://www.sciencedirect.com/science/article/pii/S0378381210005935), which can change the equilibrium calculation results of existing simulations, hence the version number increase.
New content will be added soon to the wiki to explain the new features and detail the flash algorithms.
- [NEW] Enhanced Phase Envelope Utility now shows hydrate curves, dry-basis dew points for wet natural gas mixtures and phase identification boundary for PR and SRK EOS
- [NEW] Added Motor Octane Number (MON) and Methane Number (MN) properties to the Natural Gas Properties Plugin
- [NEW] New flash calculation spec added to the Separator Vessel model - [CHG] Enhanced NRTL/UNIQUAC interaction parameter estimation procedures, can now estimate temperature dependency
- [CHG] Enhanced flash algorithm initialization
- [CHG] All three-phase flash algorithms now calculate true tree-phase saturation points if required
- [CHG] Enhanced Hydrate Formation Utility with faster calculation times and ChemSep compound support
- [CHG] Updated UNIFAC/MODFAC Property Packages' configuration dialog with UNIFAC group information
- [FIX] Fixed reporting tool
DWSIM 3.0 Build 5031 was released for Windows, Linux and OS X. This is a major release with a number of new features and enhancements.
Changes since 2.1 Build 4819:
- [NEW] New Unit Operations for Solid-handling simulations: Solids Separator and Continuous Cake Filter
- [NEW] Unified code base and single executable for .NET/Mono, compiled for CLR v4.0
- [NEW] New XML simulation file format for full compatibility between platforms (Windows/Linux/OS X)
- [NEW] New Parallel Calculations engine with support for multicore CPUs and CUDA/OpenCL-capable GPUs
- [NEW] 'Copy Data to Clipboard' function added to flowsheet objects
- [CHG] Stability enhancements to Rigorous Column model and Boston-Britt Inside-Out solver
- [CHG] Report tool now fully supports Excel Spreadsheet file format
- [CHG] Added more material stream composition input options: Mass/Mole Flows, Standard Liquid Volumetric Fractions, Molarity and Molality (for electrolyte simulations)
- [CHG] Mixer and Separator Vessel models now supports up to six inlet streams
- [CHG] NRTL/UNIQUAC Interaction Parameters are now temperature-dependent
- [CHG] All Activity coefficient models now include an option to model the Vapor Phase as ideal. The Data Regression utility also supports this option in order to regress data to find the interaction parameters accordingly
- [CHG] The Compound Creator was enhanced to include more Joback/UNIFAC groups, Element information and Solid Phase properties estimation, including temperature-dependent ones (Cp, Density). The regression graphs now show calculated properties for every temperature dependent property
- [CHG] Phase Envelope utilities now have cancellation support
- [CHG] The Binary Envelope Utility was enhanced to show every kind of equilibrium line supported by DWSIM (VLE, LLE, SLE and Critical)
- [CHG] The Data Regression utility now supports fixing some interaction parameters, enhanced LLE /SLE regression
- [CHG] The Pure Compound Property viewer now includes molecular properties, solid properties and property tables
The GPU (Graphics Processing Unit) is a piece of hardware that is suitable for massively parallel, simple calculations. Taking this in consideration in the context of a GPU-enabled process simulator like DWSIM, the more compounds a simulation has, the higher the speed gain will be when comparing CPU vs. GPU calculation times.
For instance, taking a very common example of a simulation involving an oil characterization where 50 pseudocomponents were generated, using the Lee-Kesler-Plöcker Property Package to calculate stream properties. In this case, a simple equilibrium calculation at 400 K and 1 atm takes almost 29 seconds on an AMD Phenom II X4 965 CPU to finish, while a GeForce GTX 550 Ti GPU takes only 6 seconds to do the same job. And that's with only the fugacity calculation being done in the GPU in the latter case.
This is only an example of what can be done in DWSIM with a CUDA or OpenCL-enabled graphics card. As I wrote in the above, the more compounds we have in the simulation, the higher the speed gains will be.
Here's what is new on this latest build (remember, this is WORK IN PROGRESS... accuracy/reliability is not guaranteed at any level):
- The Data Regression Utility was enhanced to better support LLE calculations. Now it also shows a y/x chart (McCabe-Thiele type) and a table with the regression statistics. I also added multicore processor support here (make sure to enable this option in the General Settings window):
- The Pure Compound Property Viewer now includes a 'Molecular' tab, which displays molecular structure info and a 2D molecule render:
- The Binary Envelope Utility now supports LLE. It will display the equilibrium lines in red, together with calculated VLE data. For this to work, you'll have to choose from one of the three-phase flash algorithms, selecting the second compound as the key one for the second liquid phase search. You can also use the gibbs minimization algorithm for this, it works now.
- Electrolyte support is getting better. I was able to code the Extended UNIQUAC model and it works nicely, but with some small differences in calculated activities when compared to the LIQUAC model. To use the electrolyte models, add Water from the ChemSep database and the compounds from the Electrolyte database. Define the salt dissociation equilibrium reactions accordingly and DWSIM will automatically read the information from the default set of reactions, calculating the phase and chemical equilibria simultaneously for every stream on the flowsheet.
I'm currently working on adding electrolyte support to DWSIM, complete with SVLE equilibrium calculations and two new property packages (LIQUAC2 and Extended UNIQUAC).
The database and model data are ready and in place. Now I'll work on the models themselves and on modifying the Gibbs Minimization algorithm to support solid phases. There will be also support for speciation and hydration reactions on the flash calculation, in order to fully describe the chemical equilibria of the electrolyte system.
This week I started working on DWSIM 3. You might be asking yourself why such a big jump in the versioning scheme, but that's because there are some deep changes in the way DWSIM will work from now on. The main ones are:
- Unified code base for .NET and Mono
DWSIM 3 will have a single code base which will run on .NET and Mono when compiled to CIL binaries. No more separate sources and binaries. This is already done, but needs more testing.
- New XML simulation file format
The new XML file format will enable true interoperability between platforms. A simulation saved on Windows will be loadable on Linux / OS X and vice-versa. This is what I'm working on currently.
- Compiled for CLR 4.0
DWSIM 3 is being compiled under .NET 4.0 (Visual Basic 2010 Express) so we can take advantage of the language enhancements (XML, LINQ, Parallel classes). The Mono Runtime already has support for these so that's not a big deal.
Speaking of the new XML file format, I'm finishing the code for the write functions, with only the unit ops code waiting to be done. I've defined a new interface called ICustomXMLSerialization that all classes that must be persisted should implement.
Implementation of the functions defined in this interface varies, depending on the classes. For instance, the GraphicObjects implementation is explicit, while for other classes I chose to use quick and dirty Reflection.
The resulting XML file for the Extractive Distillation sample, for instance, will be something like this => test.xml
Latest Public Build: v3.3 Build 5517
Download latest binaries @ SOFTPEDIA
DWSIM is an open-source CAPE-OPEN compliant chemical process simulator for Windows, Linux and OS X. Built for Microsoft .NET and Mono Platforms and featuring a rich Graphical User Interface (GUI), DWSIM allows chemical engineering students and chemical engineers to better understand the behavior of their chemical systems by using rigorous thermodynamic and unit operations' models with no cost at all. Since DWSIM is open source, they can see how the calculations are actually being done by inspecting the code behind during execution using free tools available elsewhere.
DWSIM has many of the features present in commercial simulators:
CAPE-OPEN features: Thermo 1.0/1.1 Property Package Socket, Thermo 1.1 Property Package Server, Unit Operation Socket and Flowsheet Monitoring Object support. Additionally, DWSIM exposes its IronPython/IronRuby Script (Custom) Unit Operation for all CAPE-OPEN compliant simulators.
Thermodynamic models: FPROPS, PC-SAFT, Peng-Robinson, Peng-Robinson with Volume Translation and Immiscible Water, Soave-Redlich-Kwong, Lee-Kesler, Lee-Kesler-Plöcker, UNIFAC, Modified UNIFAC (Dortmund), UNIQUAC, NRTL, COSMO-SAC, Chao-Seader, Grayson-Streed, Ideal Gas, Extended UNIQUAC and LIQUAC*;
Unit Operations: Mixer, Splitter, Separator, Pump, Compressor, Expander, Heater, Cooler, Valve, Pipe Segment, Shortcut Column, Heat Exchanger, Reactors, Component Separator, Orifice Plate, Distillation/Absorption Columns, Solids Separator, Cake Filter, Custom, Excel and Flowsheet Unit Operations;
Utilities: Phase Envelope, Hydrate Calculations, Pure Component Properties, Critical Point, PSV Sizing, Vessel Sizing, Spreadsheet and Petroleum Cold Flow Properties;
Tools: Hypothetical Components Generator, Bulk C7+ and Distillation Curves Petroleum Characterization, Petroleum Assay Manager, Reactions Manager and Component Creator;
Process Analysis: Multivariate Constrained Optimization and Sensitivity Analysis utility;
Extras: Binary VLE/LLE/SLE Data Regression Utility, Scripting System, Plugin Interface.