Difference between revisions of "Advanced EOS Library"

From DWSIM - Open Source Chemical Process Simulator
Jump to navigation Jump to search
(Created page with "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...")
 
m
 
(4 intermediate revisions by the same user not shown)
Line 5: Line 5:
 
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).
 
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).
  
Contents
+
= Available Equations of State =
1 Available Equations of State
+
* Perturbed-Chain Statistical Associating Fluid Theory (PC-SAFT) with associating compounds [1]
2 Calculated Properties
+
* Statistical Associating Fluid Theory (Original) [2]
3 Download
+
* Perturbed Hard-Sphere-Chain (PHSC) [3]
4 Installation and Usage
+
* Peng-Robinson with Wong-Sandler mixing rules (PRWS) [4]
5 References
+
* Valderrama-Patel-Teja (VPT) [5]
[edit] Available Equations of State
+
= Calculated Properties =
Perturbed-Chain Statistical Associating Fluid Theory (PC-SAFT) with associating compounds [1]
+
* Fugacity Coefficient
Statistical Associating Fluid Theory (Original) [2]
+
* Density
Perturbed Hard-Sphere-Chain (PHSC) [3]
+
* Compressibility Factor
Peng-Robinson with Wong-Sandler mixing rules (PRWS) [4]
+
* Enthalpy, Entropy and Heat Capacity (optional, with Lee-Kesler model as the default selection)
Valderrama-Patel-Teja (VPT) [5]
+
= Download =
[edit] Calculated Properties
+
* ZIP Package for Windows and Linux: [https://gum.co/XDTlk version 1.5]
Fugacity Coefficient
+
= Installation and Usage =
Density
+
1. This library requires DWSIM 5.2 or newer and '''GNU Octave''' in order to work correctly. Download Octave from [https://www.gnu.org/software/octave/ here]. Debian-based Linux distros can install Octave with
Compressibility Factor
+
 
Enthalpy, Entropy and Heat Capacity (optional, with Lee--Kesler model as the default selection)
+
sudo apt-get install octave
[edit] Download
 
ZIP Package for Windows and Linux: version 1.3.1
 
Debian Installer Package for Linux: version 1.3.1
 
[edit] Installation and Usage
 
1. This library requires DWSIM 5.2 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
 
 
2. Install:
 
2. Install:
  
The installation procedure depends on which package you've downloaded:
+
Unpack the contents of the ZIP file into DWSIM's current installation directory, overwriting existing files.
  
ZIP package: unpack the contents of the ZIP file into DWSIM's current installation directory, overwriting existing files.
 
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:
 
3. Open DWSIM and setup the bridge with Octave on Edit > General Settings > Other > DWSIM/Octave Bridge:
  
Octavebridge.png
+
[[File:Octavebridge.png]]
  
 
Octave Binaries Path: select the path to the "bin" folder where Octave is installed. This is for Windows systems only.
 
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:
 
4. Create a new simulation or open the Simulation Settings window. You should see the new Property Packages at the end of the list:
  
Adveos.png
+
[[File:Adveos.png]]
  
 
5. Important: always check if the model has the required parameters for the added compounds. Failing to do this can result in undesirable behavior...
 
5. Important: always check if the model has the required parameters for the added compounds. Failing to do this can result in undesirable behavior...
  
Adveosparam.png
+
[[FIle:Adveosparam.png]]
  
 
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.
 
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.
  
Octaverunning.png
+
[[FIle:Octaverunning.png]]
  
 
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.
 
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.
  
[edit]References
+
= References =
Gross, J., Sadowski, G., 2001. Perturbed-Chain SAFT: An equation of state based on a perturbation theory for chain molecules. Ind. Eng. Chem. Res. 40, 1244-1260.
+
# Gross, J., Sadowski, G., 2001. Perturbed-Chain SAFT: An equation of state based on a perturbation theory for chain molecules. Ind. Eng. Chem. Res. 40, 1244-1260.
Chapman, W. G., Gubbins, K. E., Jackson, G., Radosz, M., 1990. New reference equation of state for associating liquids. Ind. Eng. Chem. Res. 29, 1709-1721).
+
# Chapman, W. G., Gubbins, K. E., Jackson, G., Radosz, M., 1990. New reference equation of state for associating liquids. Ind. Eng. Chem. Res. 29, 1709-1721).
Song, Y., Lambert, S. M., Prausnitz, J. M., 1994. A Perturbed Hard-Sphere-Chain equation of state for normal fluids and polymers. Ind. Eng. Chem. Res. 33, 1047-1057
+
# Song, Y., Lambert, S. M., Prausnitz, J. M., 1994. A Perturbed Hard-Sphere-Chain equation of state for normal fluids and polymers. Ind. Eng. Chem. Res. 33, 1047-1057
Wong, S. S. H., Sandler, S. I., 1992. A Theoretically correct mixing rule for cubic equations of state. AIChE J. 38, 671-680
+
# Wong, S. S. H., Sandler, S. I., 1992. A Theoretically correct mixing rule for cubic equations of state. AIChE J. 38, 671-680
Valderrama, J.O., 1990. A Generalized Patel-Teja Equation of State for Polar and Nonpolar Fluids and Their Mixtures. JOURNAL OF CHEMICAL ENGINEERING OF JAPAN 23, No. 1, 87-91
+
# Valderrama, J.O., 1990. A Generalized Patel-Teja Equation of State for Polar and Nonpolar Fluids and Their Mixtures. JOURNAL OF CHEMICAL ENGINEERING OF JAPAN 23, No. 1, 87-91

Latest revision as of 14:04, 12 August 2020

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).

Available Equations of State

  • Perturbed-Chain Statistical Associating Fluid Theory (PC-SAFT) with associating compounds [1]
  • Statistical Associating Fluid Theory (Original) [2]
  • Perturbed Hard-Sphere-Chain (PHSC) [3]
  • Peng-Robinson with Wong-Sandler mixing rules (PRWS) [4]
  • Valderrama-Patel-Teja (VPT) [5]

Calculated Properties

  • Fugacity Coefficient
  • Density
  • Compressibility Factor
  • Enthalpy, Entropy and Heat Capacity (optional, with Lee-Kesler model as the default selection)

Download

Installation and Usage

1. This library requires DWSIM 5.2 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

2. Install:

Unpack the contents of the ZIP file into DWSIM's current installation directory, overwriting existing files.

3. Open DWSIM and setup the bridge with Octave on Edit > General Settings > Other > DWSIM/Octave Bridge:

Octavebridge.png

Octave Binaries Path: select the path to the "bin" folder where Octave is installed. This is for Windows systems only.

4. Create a new simulation or open the Simulation Settings window. You should see the new Property Packages at the end of the list:

Adveos.png

5. Important: always check if the model has the required parameters for the added compounds. Failing to do this can result in undesirable behavior...

Adveosparam.png

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.

Octaverunning.png

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.

References

  1. Gross, J., Sadowski, G., 2001. Perturbed-Chain SAFT: An equation of state based on a perturbation theory for chain molecules. Ind. Eng. Chem. Res. 40, 1244-1260.
  2. Chapman, W. G., Gubbins, K. E., Jackson, G., Radosz, M., 1990. New reference equation of state for associating liquids. Ind. Eng. Chem. Res. 29, 1709-1721).
  3. Song, Y., Lambert, S. M., Prausnitz, J. M., 1994. A Perturbed Hard-Sphere-Chain equation of state for normal fluids and polymers. Ind. Eng. Chem. Res. 33, 1047-1057
  4. Wong, S. S. H., Sandler, S. I., 1992. A Theoretically correct mixing rule for cubic equations of state. AIChE J. 38, 671-680
  5. Valderrama, J.O., 1990. A Generalized Patel-Teja Equation of State for Polar and Nonpolar Fluids and Their Mixtures. JOURNAL OF CHEMICAL ENGINEERING OF JAPAN 23, No. 1, 87-91