Skip to content

Commit

Permalink
deploy: cfa539b
Browse files Browse the repository at this point in the history
  • Loading branch information
prehner committed Dec 19, 2023
1 parent f6a8e40 commit 78310af
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": "16a7d560",
"id": "c66055ff",
"metadata": {},
"source": [
"# Surface tension using PC-SAFT Helmholtz energy functionals\n",
Expand All @@ -16,7 +16,7 @@
{
"cell_type": "code",
"execution_count": 1,
"id": "3c1ed425",
"id": "8fcf3d0d",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -38,7 +38,7 @@
},
{
"cell_type": "markdown",
"id": "ec59aa33",
"id": "6e1dfc0c",
"metadata": {},
"source": [
"### Water parameters for PC-SAFT \n",
Expand All @@ -49,7 +49,7 @@
{
"cell_type": "code",
"execution_count": 2,
"id": "27129d01",
"id": "7f172679",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -63,7 +63,7 @@
},
{
"cell_type": "markdown",
"id": "4efc3eac",
"id": "584b145e",
"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": "64ded721",
"id": "1085f237",
"metadata": {},
"outputs": [
{
Expand All @@ -98,15 +98,15 @@
},
{
"cell_type": "markdown",
"id": "3a45573b",
"id": "ec9e2724",
"metadata": {},
"source": [
"As you can see, the model overestimates the critical temperature."
]
},
{
"cell_type": "markdown",
"id": "a186e0e8",
"id": "8b0add42",
"metadata": {},
"source": [
"## Surface tension for single VLE\n",
Expand All @@ -120,7 +120,7 @@
},
{
"cell_type": "markdown",
"id": "9ad19ef6",
"id": "51eb7452",
"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": "dc0a0f56",
"id": "689f241a",
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -157,7 +157,7 @@
},
{
"cell_type": "markdown",
"id": "6a618c41",
"id": "a205893a",
"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": "007e6533",
"id": "4eb3d0df",
"metadata": {},
"outputs": [
{
Expand All @@ -197,7 +197,7 @@
},
{
"cell_type": "markdown",
"id": "63f49b08",
"id": "7c2fd870",
"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": "4c1a91ad",
"id": "b83af443",
"metadata": {},
"outputs": [
{
Expand All @@ -226,7 +226,7 @@
},
{
"cell_type": "markdown",
"id": "9b0606ab",
"id": "f9545874",
"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": "1e41f007",
"id": "fa8a5c4a",
"metadata": {},
"outputs": [
{
Expand All @@ -254,7 +254,7 @@
},
{
"cell_type": "markdown",
"id": "89211448",
"id": "90a73e6d",
"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": "383dfc4b",
"id": "8baff1ce",
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -294,7 +294,7 @@
},
{
"cell_type": "markdown",
"id": "2ab84a9c",
"id": "a6bacd2d",
"metadata": {},
"source": [
"## Comparison to NIST data using `SurfaceTensionDiagram`\n",
Expand All @@ -305,7 +305,7 @@
{
"cell_type": "code",
"execution_count": 9,
"id": "23b6cf12",
"id": "14280138",
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -543,7 +543,7 @@
},
{
"cell_type": "markdown",
"id": "6cfcd066",
"id": "58c413af",
"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": "3244d39d",
"id": "10494745",
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -584,7 +584,7 @@
},
{
"cell_type": "markdown",
"id": "cb8b93a3",
"id": "99bd90d5",
"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": "7c932d51",
"id": "85c5e087",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -609,7 +609,7 @@
{
"cell_type": "code",
"execution_count": 12,
"id": "a840b80d",
"id": "00d5570b",
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -640,7 +640,7 @@
},
{
"cell_type": "markdown",
"id": "6188826d",
"id": "2c61b405",
"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": "893415b9",
"id": "f437cf7d",
"metadata": {},
"source": [
"# Entropy scaling of pure substances\n",
Expand All @@ -19,7 +19,7 @@
{
"cell_type": "code",
"execution_count": 1,
"id": "6be1196b",
"id": "1a6971cb",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -38,7 +38,7 @@
},
{
"cell_type": "markdown",
"id": "4b16e5e5",
"id": "b2c8e9c3",
"metadata": {},
"source": [
"## PC-SAFT (individual component parameters)\n",
Expand All @@ -49,7 +49,7 @@
{
"cell_type": "code",
"execution_count": 2,
"id": "d7984a43",
"id": "3492281b",
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -82,7 +82,7 @@
},
{
"cell_type": "markdown",
"id": "243cfb9c",
"id": "7c4bd042",
"metadata": {},
"source": [
"## PC-SAFT homo-GC\n",
Expand All @@ -93,7 +93,7 @@
{
"cell_type": "code",
"execution_count": 3,
"id": "cc69ecb8",
"id": "43832393",
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -160,7 +160,7 @@
},
{
"cell_type": "markdown",
"id": "4e03aac6",
"id": "95856d39",
"metadata": {},
"source": [
"### Build equations of state\n",
Expand All @@ -171,7 +171,7 @@
{
"cell_type": "code",
"execution_count": 4,
"id": "35c85b7a",
"id": "11ae54a4",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -185,7 +185,7 @@
},
{
"cell_type": "markdown",
"id": "b0cbd864",
"id": "67b2fbd6",
"metadata": {},
"source": [
"### Compare parameters"
Expand All @@ -194,7 +194,7 @@
{
"cell_type": "code",
"execution_count": 5,
"id": "53abec38",
"id": "e2ac7495",
"metadata": {},
"outputs": [
{
Expand All @@ -213,7 +213,7 @@
},
{
"cell_type": "markdown",
"id": "78626e29",
"id": "8c9f7784",
"metadata": {},
"source": [
"## Compare methods to NIST data (T = 450 K)\n",
Expand All @@ -224,7 +224,7 @@
{
"cell_type": "code",
"execution_count": 6,
"id": "bca09ee5",
"id": "36bb725d",
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -396,7 +396,7 @@
},
{
"cell_type": "markdown",
"id": "c291b262",
"id": "81a3630d",
"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": "d970a215",
"id": "7bf1f1a3",
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -560,7 +560,7 @@
{
"cell_type": "code",
"execution_count": 8,
"id": "8029d1c7",
"id": "d5514ad8",
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -591,7 +591,7 @@
{
"cell_type": "code",
"execution_count": 9,
"id": "5eae3d3a",
"id": "2ec639c4",
"metadata": {},
"outputs": [
{
Expand Down
Loading

0 comments on commit 78310af

Please sign in to comment.