Advanced EOS Library
The Advanced EOS Library is a bridge which connects DWSIM on Windows and Linux to a collection of open-source MATLAB/Octave routines which implement various Equations of State, including PC-SAFT with support for associating compounds and Perturbed-Hard-Sphere-Chain (PHSC).
The original project (http://hpp.uva.es/open-source-software-eos/) consists in a set of MATLAB programs for the calculation of phase equilibrium and other thermodynamic properties using different equations of state (classical cubic equations, cubic equations with excess Gibbs energy mixing rules, group contribution equations and SAFT equations). All programs are open-source and have been designed to be easily reusable using an object-oriented programming methodology.
This library exposes these programs to DWSIM as fully-implemented Property Packages by running them in Octave (https://www.gnu.org/software/octave/) and reading the results through a C# interface (https://www.codeproject.com/Articles/342007/OctaveSharp-Running-GNU-Octave-with-Csharp).
Installation and Usage
1. This library requires DWSIM 5.2 with Update 18 or newer and GNU Octave in order to work correctly. Download Octave from here. Debian-based Linux distros can install Octave with
sudo apt-get install octave
The installation procedure depends on which package you've downloaded:
- ZIP package: unpack the contents of the ZIP file into DWSIM's current installation directory, overwriting existing files.
If you get the "An attempt was made to load an assembly from a network location which would have caused the assembly to be sandboxed in previous versions of the .NET Framework" error message, unblock the downloaded ZIP file (right-mouse button click > 'Properties') and extract it again to DWSIM's folder.
- Debian package: install the package as usual. Make sure that DWSIM is already up-to-date (at least v4.2 with Update 3) before installing the package.
3. Open DWSIM and setup the bridge with Octave on Edit > General Settings > Other > DWSIM/Octave Bridge:
- Octave Binaries Path: select the path to the "bin" folder where Octave is installed. This is for Windows systems only.
- [Deprecated] Temporary Scripts Folder: select any folder where you have write access, so DWSIM can save the .m files and call Octave to run them. Those files are deleted as soon as the calculation ends.
4. Create a new simulation or open the Simulation Settings window. You should see the new Property Packages at the end of the list:
5. Important: always check if the model has the required parameters for the added compounds. Failing to do this can result in undesirable behavior...
6. If everything is correctly configured, you should see some messages in the Information Window about the Octave processes running the .m files to calculate the required properties.