diff --git a/doc/source/models/PCSAFT.ipynb b/doc/source/models/PCSAFT.ipynb index 3eea54b01350fe51b1fc0d837cc48e4422b7ed51..973f43bd867d0fefdfb2d68d33553a5f96c9a32a 100644 --- a/doc/source/models/PCSAFT.ipynb +++ b/doc/source/models/PCSAFT.ipynb @@ -24,13 +24,23 @@ }, { "cell_type": "code", - "execution_count": 1, - "id": "7bbd7129", + "execution_count": null, + "id": "984925ce", "metadata": {}, "outputs": [], "source": [ "import teqp\n", - "\n", + "import numpy as np\n", + "teqp.__version__" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "7bbd7129", + "metadata": {}, + "outputs": [], + "source": [ "TeXkey = 'Gross-IECR-2001'\n", "ms = [1.0, 1.6069, 2.0020]\n", "eoverk = [150.03, 191.42, 208.11]\n", @@ -57,23 +67,10 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": null, "id": "d4e47e54", "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "(array([1. , 1.6069, 2.002 ]),\n", - " array([150.03, 191.42, 208.11]),\n", - " array([3.7039, 3.5206, 3.6184]))" - ] - }, - "execution_count": 2, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "model.get_m(), model.get_epsilon_over_k_K(), model.get_sigma_Angstrom()" ] @@ -90,21 +87,10 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": null, "id": "a32c41b5", "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "<teqp.teqp.PCSAFTEOS at 0x26ec5dde870>" - ] - }, - "execution_count": 3, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "k_01 = 0.01; k_10 = k_01\n", "kmat = [[0,k_01,0],[k_10,0,0],[0,0,0]]\n", @@ -118,7 +104,29 @@ "source": [ "## Superancillary\n", "\n", - "The superancillary equation for PC-SAFT has been developed, and is much more involved than that of the cubic EOS. As a consequence, the superancillary equation has been provided as a separate package rather than integrating it into to teqp to minimize the computational overhead. It can be installed from PYPI with: ``pip install PCSAFTsuperanc``" + "The superancillary equation for PC-SAFT has been developed, and is much more involved than that of the cubic EOS. As a consequence, the superancillary equation has been provided as a separate package rather than integrating it into to teqp to minimize the binary size of teqp. It can be installed from PYPI with: ``pip install PCSAFTsuperanc``" + ] + }, + { + "cell_type": "markdown", + "id": "0bdf568f", + "metadata": {}, + "source": [ + "## Maximum density\n", + "\n", + "The maximum number density allowed by the EOS is defined based on the packing fraction. To get a molar density, divide by Avogadro's number. The function is conveniently exposed in Python:" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "3c8491a9", + "metadata": {}, + "outputs": [], + "source": [ + "max_rhoN = teqp.PCSAFTEOS(coeffs).max_rhoN(130.0, np.array([0.3, 0.3, 0.4]))\n", + "display(max_rhoN)\n", + "max_rhoN/6.022e23 # the maximum molar density in mol/m^3" ] } ],