From 7f9b081574034dedc060cd761ab25ef6dc4e03e0 Mon Sep 17 00:00:00 2001
From: Ian Bell <ian.bell@nist.gov>
Date: Thu, 7 Jul 2022 10:33:44 -0400
Subject: [PATCH] k_ij for PCSAFT too

---
 doc/source/models/PCSAFT.ipynb | 39 +++++++++++++++++++++++++++++++---
 1 file changed, 36 insertions(+), 3 deletions(-)

diff --git a/doc/source/models/PCSAFT.ipynb b/doc/source/models/PCSAFT.ipynb
index fa4a409..17122e9 100644
--- a/doc/source/models/PCSAFT.ipynb
+++ b/doc/source/models/PCSAFT.ipynb
@@ -14,7 +14,7 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 7,
+   "execution_count": 1,
    "id": "7bbd7129",
    "metadata": {},
    "outputs": [],
@@ -47,7 +47,7 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 6,
+   "execution_count": 2,
    "id": "d4e47e54",
    "metadata": {},
    "outputs": [
@@ -59,7 +59,7 @@
        " array([3.7039, 3.5206, 3.6184]))"
       ]
      },
-     "execution_count": 6,
+     "execution_count": 2,
      "metadata": {},
      "output_type": "execute_result"
     }
@@ -68,6 +68,39 @@
     "model.get_m(), model.get_epsilon_over_k_K(), model.get_sigma_Angstrom()"
    ]
   },
+  {
+   "cell_type": "markdown",
+   "id": "5cbb382d",
+   "metadata": {},
+   "source": [
+    "## Adjusting k_ij\n",
+    "\n",
+    "Fine-tuned values of $k_{ij}$ can be provided when instantiating the model, for Peng-Robinson and SRK.  A complete matrix of all the $k_{ij}$ values must be provided. This allows for asymmetric mixing models in which $k_{ij}\\neq k_{ji}$."
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 3,
+   "id": "a32c41b5",
+   "metadata": {},
+   "outputs": [
+    {
+     "data": {
+      "text/plain": [
+       "<teqp.teqp.PCSAFTEOS at 0x19478910bf0>"
+      ]
+     },
+     "execution_count": 3,
+     "metadata": {},
+     "output_type": "execute_result"
+    }
+   ],
+   "source": [
+    "k_01 = 0.01; k_10 = k_01\n",
+    "kmat = [[0,k_01,0],[k_01,0,0],[0,0,0]]\n",
+    "teqp.PCSAFTEOS(coeffs, kmat)"
+   ]
+  },
   {
    "cell_type": "markdown",
    "id": "ca52e844",
-- 
GitLab