Skip to content

Commit

Permalink
deploy: a0221b4
Browse files Browse the repository at this point in the history
  • Loading branch information
prehner committed Jan 8, 2024
1 parent 78310af commit 481bd9c
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": "c66055ff",
"id": "a23757a8",
"metadata": {},
"source": [
"# Surface tension using PC-SAFT Helmholtz energy functionals\n",
Expand All @@ -16,7 +16,7 @@
{
"cell_type": "code",
"execution_count": 1,
"id": "8fcf3d0d",
"id": "2051a55f",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -38,7 +38,7 @@
},
{
"cell_type": "markdown",
"id": "6e1dfc0c",
"id": "72030caf",
"metadata": {},
"source": [
"### Water parameters for PC-SAFT \n",
Expand All @@ -49,7 +49,7 @@
{
"cell_type": "code",
"execution_count": 2,
"id": "7f172679",
"id": "ee696152",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -63,7 +63,7 @@
},
{
"cell_type": "markdown",
"id": "584b145e",
"id": "ecc28e14",
"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": "1085f237",
"id": "e36c2533",
"metadata": {},
"outputs": [
{
Expand All @@ -98,15 +98,15 @@
},
{
"cell_type": "markdown",
"id": "ec9e2724",
"id": "1c19fbb3",
"metadata": {},
"source": [
"As you can see, the model overestimates the critical temperature."
]
},
{
"cell_type": "markdown",
"id": "8b0add42",
"id": "c7aa7b0c",
"metadata": {},
"source": [
"## Surface tension for single VLE\n",
Expand All @@ -120,7 +120,7 @@
},
{
"cell_type": "markdown",
"id": "51eb7452",
"id": "f8b23fbd",
"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": "689f241a",
"id": "bac5d696",
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -157,7 +157,7 @@
},
{
"cell_type": "markdown",
"id": "a205893a",
"id": "f8bcf1fc",
"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": "4eb3d0df",
"id": "8853b4ff",
"metadata": {},
"outputs": [
{
Expand All @@ -197,7 +197,7 @@
},
{
"cell_type": "markdown",
"id": "7c2fd870",
"id": "2d0c48a7",
"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": "b83af443",
"id": "055832fa",
"metadata": {},
"outputs": [
{
Expand All @@ -226,7 +226,7 @@
},
{
"cell_type": "markdown",
"id": "f9545874",
"id": "be90b06e",
"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": "fa8a5c4a",
"id": "f5d14e7f",
"metadata": {},
"outputs": [
{
Expand All @@ -254,7 +254,7 @@
},
{
"cell_type": "markdown",
"id": "90a73e6d",
"id": "e982eb80",
"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": "8baff1ce",
"id": "be7372ae",
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -294,7 +294,7 @@
},
{
"cell_type": "markdown",
"id": "a6bacd2d",
"id": "b0424c33",
"metadata": {},
"source": [
"## Comparison to NIST data using `SurfaceTensionDiagram`\n",
Expand All @@ -305,7 +305,7 @@
{
"cell_type": "code",
"execution_count": 9,
"id": "14280138",
"id": "9b725757",
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -543,7 +543,7 @@
},
{
"cell_type": "markdown",
"id": "58c413af",
"id": "bc501f80",
"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": "10494745",
"id": "81b319f2",
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -584,7 +584,7 @@
},
{
"cell_type": "markdown",
"id": "99bd90d5",
"id": "6244c100",
"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": "85c5e087",
"id": "732e258f",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -609,7 +609,7 @@
{
"cell_type": "code",
"execution_count": 12,
"id": "00d5570b",
"id": "5d18024b",
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -640,7 +640,7 @@
},
{
"cell_type": "markdown",
"id": "2c61b405",
"id": "d255ce74",
"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": "f437cf7d",
"id": "728d248a",
"metadata": {},
"source": [
"# Entropy scaling of pure substances\n",
Expand All @@ -19,7 +19,7 @@
{
"cell_type": "code",
"execution_count": 1,
"id": "1a6971cb",
"id": "9b3504cd",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -38,7 +38,7 @@
},
{
"cell_type": "markdown",
"id": "b2c8e9c3",
"id": "1a5515d9",
"metadata": {},
"source": [
"## PC-SAFT (individual component parameters)\n",
Expand All @@ -49,7 +49,7 @@
{
"cell_type": "code",
"execution_count": 2,
"id": "3492281b",
"id": "07a20552",
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -82,7 +82,7 @@
},
{
"cell_type": "markdown",
"id": "7c4bd042",
"id": "e03098d2",
"metadata": {},
"source": [
"## PC-SAFT homo-GC\n",
Expand All @@ -93,7 +93,7 @@
{
"cell_type": "code",
"execution_count": 3,
"id": "43832393",
"id": "1c4308df",
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -160,7 +160,7 @@
},
{
"cell_type": "markdown",
"id": "95856d39",
"id": "e6e3f77b",
"metadata": {},
"source": [
"### Build equations of state\n",
Expand All @@ -171,7 +171,7 @@
{
"cell_type": "code",
"execution_count": 4,
"id": "11ae54a4",
"id": "8dcef469",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -185,7 +185,7 @@
},
{
"cell_type": "markdown",
"id": "67b2fbd6",
"id": "4dc75e3a",
"metadata": {},
"source": [
"### Compare parameters"
Expand All @@ -194,7 +194,7 @@
{
"cell_type": "code",
"execution_count": 5,
"id": "e2ac7495",
"id": "72324b6c",
"metadata": {},
"outputs": [
{
Expand All @@ -213,7 +213,7 @@
},
{
"cell_type": "markdown",
"id": "8c9f7784",
"id": "9286677d",
"metadata": {},
"source": [
"## Compare methods to NIST data (T = 450 K)\n",
Expand All @@ -224,7 +224,7 @@
{
"cell_type": "code",
"execution_count": 6,
"id": "36bb725d",
"id": "e726c28e",
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -396,7 +396,7 @@
},
{
"cell_type": "markdown",
"id": "81a3630d",
"id": "af204c10",
"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": "7bf1f1a3",
"id": "3f81992e",
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -560,7 +560,7 @@
{
"cell_type": "code",
"execution_count": 8,
"id": "d5514ad8",
"id": "1dc1e1e9",
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -591,7 +591,7 @@
{
"cell_type": "code",
"execution_count": 9,
"id": "2ec639c4",
"id": "081d5666",
"metadata": {},
"outputs": [
{
Expand Down
Loading

0 comments on commit 481bd9c

Please sign in to comment.