Skip to content

Commit

Permalink
deploy: 0dd101c
Browse files Browse the repository at this point in the history
  • Loading branch information
prehner committed May 21, 2024
1 parent 7eb6790 commit 25d0a05
Show file tree
Hide file tree
Showing 5 changed files with 84 additions and 84 deletions.
Binary file modified .doctrees/environment.pickle
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
"id": "66e7f957",
"id": "e140cdb9",
"metadata": {},
"source": [
"# Surface tension using PC-SAFT Helmholtz energy functionals\n",
Expand All @@ -16,7 +16,7 @@
{
"cell_type": "code",
"execution_count": 1,
"id": "4c66151f",
"id": "727c862c",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -38,7 +38,7 @@
},
{
"cell_type": "markdown",
"id": "f120a8a0",
"id": "5c2bfab0",
"metadata": {},
"source": [
"### Water parameters for PC-SAFT \n",
Expand All @@ -49,7 +49,7 @@
{
"cell_type": "code",
"execution_count": 2,
"id": "a78c8711",
"id": "07c1c5a8",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -63,7 +63,7 @@
},
{
"cell_type": "markdown",
"id": "fef7d168",
"id": "128d8eac",
"metadata": {},
"source": [
"Let's first compute the critical point. We will make use of the critical temperature later."
Expand All @@ -72,7 +72,7 @@
{
"cell_type": "code",
"execution_count": 3,
"id": "9f604c99",
"id": "8d1d60e5",
"metadata": {},
"outputs": [
{
Expand All @@ -98,15 +98,15 @@
},
{
"cell_type": "markdown",
"id": "e1699ab2",
"id": "c0bf4f9a",
"metadata": {},
"source": [
"As you can see, the model overestimates the critical temperature."
]
},
{
"cell_type": "markdown",
"id": "19d0e707",
"id": "170a291f",
"metadata": {},
"source": [
"## Surface tension for single VLE\n",
Expand All @@ -120,7 +120,7 @@
},
{
"cell_type": "markdown",
"id": "b71068d0",
"id": "88e53181",
"metadata": {},
"source": [
"For the VLE, we use the `PhaseEquilibrium.pure` method. Here for $T = 300$ Kelvin."
Expand All @@ -129,7 +129,7 @@
{
"cell_type": "code",
"execution_count": 4,
"id": "262805d4",
"id": "3d5cbec5",
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -157,7 +157,7 @@
},
{
"cell_type": "markdown",
"id": "e9d7d50b",
"id": "ea94b15b",
"metadata": {},
"source": [
"Next, we initialize the density profile. For the surface tension, a 1D DFT calculation in Cartesian coordinates is conducted. Thus, the density profile will be an 1D array (we have a single substance). \n",
Expand All @@ -172,7 +172,7 @@
{
"cell_type": "code",
"execution_count": 5,
"id": "fb5ea466",
"id": "69fd32bf",
"metadata": {},
"outputs": [
{
Expand All @@ -197,7 +197,7 @@
},
{
"cell_type": "markdown",
"id": "3bb00e80",
"id": "0b28a382",
"metadata": {},
"source": [
"The above method does not yet run a calculation. If we try to extract the surface tension, it will return `None`. Let's store the initial density profile for a later comparison."
Expand All @@ -206,7 +206,7 @@
{
"cell_type": "code",
"execution_count": 6,
"id": "38c7ba62",
"id": "6ec2df3c",
"metadata": {},
"outputs": [
{
Expand All @@ -226,7 +226,7 @@
},
{
"cell_type": "markdown",
"id": "f6693727",
"id": "03c33303",
"metadata": {},
"source": [
"To calculate the equilibrium density profile, we have to call the `solve()` method:"
Expand All @@ -235,7 +235,7 @@
{
"cell_type": "code",
"execution_count": 7,
"id": "f5a9c402",
"id": "017dcda0",
"metadata": {},
"outputs": [
{
Expand All @@ -254,7 +254,7 @@
},
{
"cell_type": "markdown",
"id": "efb3f54b",
"id": "08ef2bba",
"metadata": {},
"source": [
"`solve()` calculates the equilibrium density profile and returns the `PlanarInterface` object so that we can readily extract the `surface_tension`.\n",
Expand All @@ -265,7 +265,7 @@
{
"cell_type": "code",
"execution_count": 8,
"id": "50ada380",
"id": "e8657d99",
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -294,7 +294,7 @@
},
{
"cell_type": "markdown",
"id": "baaa4438",
"id": "039f8d95",
"metadata": {},
"source": [
"## Comparison to NIST data using `SurfaceTensionDiagram`\n",
Expand All @@ -305,7 +305,7 @@
{
"cell_type": "code",
"execution_count": 9,
"id": "2c9a86c8",
"id": "243eb06c",
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -543,7 +543,7 @@
},
{
"cell_type": "markdown",
"id": "38aafe0a",
"id": "76a5cf35",
"metadata": {},
"source": [
"For the `SurfaceTensionDiagram`, we need to provide the VLE's. We compute those using the `PhaseDiagram` object (here for 50 temperatures between 275 Kelvin and the critical temperature) from which we get a list of `PhaseEquilibrium`s via the `states` filed. The `SurfaceTensionDiagram` is nice, because we can reuse equilibrium density profiles from prior iterations as input for the next iteration. It's therefore typically faster and more stable than an \"naive\" implementation by hand.\n",
Expand All @@ -554,7 +554,7 @@
{
"cell_type": "code",
"execution_count": 10,
"id": "8018e515",
"id": "431e6c0c",
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -584,7 +584,7 @@
},
{
"cell_type": "markdown",
"id": "555ce7f6",
"id": "428fee01",
"metadata": {},
"source": [
"We now can extract all surface tensions via `surface_tension` as well as the liquid and vapor states via the `liquid` and `vapor` getters, respectively. Let's store the results in a pandas `DataFrame` to make plotting easier."
Expand All @@ -593,7 +593,7 @@
{
"cell_type": "code",
"execution_count": 11,
"id": "a7589cb1",
"id": "01f2a90d",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -609,7 +609,7 @@
{
"cell_type": "code",
"execution_count": 12,
"id": "c4c91889",
"id": "83688c87",
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -640,7 +640,7 @@
},
{
"cell_type": "markdown",
"id": "a2cf6862",
"id": "b364026c",
"metadata": {},
"source": [
"## Concluding remkars\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
"id": "afa36bbf",
"id": "ce022811",
"metadata": {},
"source": [
"# Entropy scaling of pure substances\n",
Expand All @@ -19,7 +19,7 @@
{
"cell_type": "code",
"execution_count": 1,
"id": "d6568f7f",
"id": "d5155765",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -38,7 +38,7 @@
},
{
"cell_type": "markdown",
"id": "79d6e276",
"id": "c46a8ea5",
"metadata": {},
"source": [
"## PC-SAFT (individual component parameters)\n",
Expand All @@ -49,7 +49,7 @@
{
"cell_type": "code",
"execution_count": 2,
"id": "c332910d",
"id": "a4c329cd",
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -82,7 +82,7 @@
},
{
"cell_type": "markdown",
"id": "aaa9cf27",
"id": "a685a457",
"metadata": {},
"source": [
"## PC-SAFT homo-GC\n",
Expand All @@ -93,7 +93,7 @@
{
"cell_type": "code",
"execution_count": 3,
"id": "c118a3ff",
"id": "1dc38bae",
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -160,7 +160,7 @@
},
{
"cell_type": "markdown",
"id": "8a55063d",
"id": "0be520d0",
"metadata": {},
"source": [
"### Build equations of state\n",
Expand All @@ -171,7 +171,7 @@
{
"cell_type": "code",
"execution_count": 4,
"id": "53adb559",
"id": "cf30e20b",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -185,7 +185,7 @@
},
{
"cell_type": "markdown",
"id": "8caaac76",
"id": "0a516d6c",
"metadata": {},
"source": [
"### Compare parameters"
Expand All @@ -194,7 +194,7 @@
{
"cell_type": "code",
"execution_count": 5,
"id": "0e4165f4",
"id": "d052d20e",
"metadata": {},
"outputs": [
{
Expand All @@ -213,7 +213,7 @@
},
{
"cell_type": "markdown",
"id": "020b35f2",
"id": "d41018ae",
"metadata": {},
"source": [
"## Compare methods to NIST data (T = 450 K)\n",
Expand All @@ -224,7 +224,7 @@
{
"cell_type": "code",
"execution_count": 6,
"id": "5a6255f9",
"id": "aeab111a",
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -396,7 +396,7 @@
},
{
"cell_type": "markdown",
"id": "e721ecdd",
"id": "a385ae1e",
"metadata": {},
"source": [
"We loop through experimental data, read temperature, pressure and the phase (liquid or vapor) and generate `State` objects for the experimental conditions. Then, we compute the residual molar entropy and the logarithmic reduced viscosity."
Expand All @@ -405,7 +405,7 @@
{
"cell_type": "code",
"execution_count": 7,
"id": "514bd571",
"id": "1497cb8e",
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -560,7 +560,7 @@
{
"cell_type": "code",
"execution_count": 8,
"id": "57a7fdc4",
"id": "6082e25a",
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -591,7 +591,7 @@
{
"cell_type": "code",
"execution_count": 9,
"id": "b197132c",
"id": "b5f9cec7",
"metadata": {},
"outputs": [
{
Expand Down
Loading

0 comments on commit 25d0a05

Please sign in to comment.