This repository contains a reference implementation of pairwise interacting surface activity coefficient (SAC) equations. There are two accompanying papers showing the derivation of all equations used:
- Ref. 1 - Beyond activity coefficients with pairwise interacting surface (COSMO-type) models.
- Ref. 2 - Unraveling Order and Entropy with Modern Quasi-Chemical Models.
All the relevant SAC equations are implemented in the pysac.py module favoring readability over efficiency. The base code is not dependent on how the surface interaction energies are actually calculated and then it can be adapted to work as a COSMO-RS/SAC, F-SAC, COSMO-SAC-Phi, etc. implementation.
In addition to the SAC equations implementation, there are many jupyter interactive notebooks.
Notebooks related to Ref. 1:
- List all microstates for a given number of segments
- Nonrandom factors for a five compund mixture
- Excess properties for a size-symmetric nonideal mixture
- Excess properties for a size-symmetric nonideal mixture, adjusted UNIQUAC parameters
- Excess properties for a size-asymmetric nonideal mixture
- Study on the interaction probabylities of a size-symmetric mixture
- Study on the interaction probabylities of a size-asymmetric mixture
- Study on the interaction probabylities of a nearly ideal mixture
- Excess properties with temperature dependent interaction energies
- Numerical check for excess energy with temperature dependent interaction energies
Notebooks related to Ref. 2:
- Model polar/inert system
- Model hydrogen bonding/inert system
- Excess properties for the chloroform/methanol mixture
- Excess properties for the n-butanol/n-hexane mixture
- Excess properties for the tetrahydrofuran/water mixture
You will need a jupyter installation on your machine.
Clone this repository using git or download the code and extract the zip contents.
Enter the root directory of the project and run:
jupter-notebook
This should start the notebook app and open your web browser so that you can run and edit the notebooks.
Another option is simply to open the project directory with Visual Studio Code and install the suggested Python extensions.
The reader might be also interested in the following related projects: