Skip to content

Commit

Permalink
Merge pull request #92 from usnistgov/assocmix
Browse files Browse the repository at this point in the history
Add association for mixtures
  • Loading branch information
ianhbell authored Feb 28, 2024
2 parents 4f2b404 + 0c48701 commit 2927e3c
Show file tree
Hide file tree
Showing 7 changed files with 636 additions and 60 deletions.
60 changes: 58 additions & 2 deletions doc/source/models/CPA.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,64 @@
"source": [
"# Cubic Plus Association (CPA)\n",
"\n",
"The combination of a cubic EOS with association"
"The combination of a cubic EOS with association with the association term. The sum of the terms goes like:\n",
"$$\n",
"\\alpha^{\\rm r} = \\alpha^{\\rm r}_{\\rm cub} + \\alpha^{\\rm r}_{\\rm assoc}\n",
"$$\n",
"\n",
"## Cubic part\n",
"\n",
"The residual contribution to $\\alpha$ is expressed as the sum :\n",
"$$\n",
"\\alpha^{\\rm r}_{\\rm cub,rep} +\\alpha^{\\rm r}_{\\rm cub,att}\n",
"$$ where the cubic parts come from\n",
"\n",
"The repulsive part of the cubic EOS contribution:\n",
"$$\n",
"\\alpha^{\\rm r}_{\\rm cub,rep} = -\\ln(1 - b_{\\rm mix}\\rho) \n",
"$$\n",
"The attractive part of the cubic EOS contribution:\n",
"$$\n",
"\\alpha^{\\rm r}_{\\rm cub,att} = -\\frac{a_{\\rm mix}}{RT}\\dfrac{\\ln\\left(\\frac{\\Delta_1 b_{\\rm mix}\\rho + 1}{\\Delta_2b_{\\rm mix}\\rho + 1}\\right)}{b_{\\rm mix}\\cdot(\\Delta_1 - \\Delta_2)}\n",
"$$\n",
"with the coefficients depending on the cubic type:\n",
"\n",
"SRK: $\\Delta_1=1$, $\\Delta_2=0$\n",
"\n",
"PR: $\\Delta_1=1+\\sqrt{2}$, $\\Delta_2=1-\\sqrt{2}$\n",
"\n",
"The mixture models used for the $a_{\\rm mix}$ and $b_{\\rm mix}$ are the classical ones:\n",
"\n",
"$$\n",
"a_{\\rm mix} = \\sum_i\\sum_jx_ix_j(1-k_{ij})a_{ij}(T)\n",
"$$\n",
"with x the mole fraction, $k_{ij}$ a weighting parameter\n",
"$$\n",
"a_{ij}(T) = \\sqrt{a_ia_j}\n",
"$$\n",
"and\n",
"$$\n",
"a_{i}(T) = a_{0i}\\left[1+c_{1i}(1-\\sqrt{T/T_{{\\rm crit},i}})\\right]^2\n",
"$$\n",
"and for $b$:\n",
"$$\n",
"b_{\\rm mix} = \\sum_ix_ib_i\n",
"$$\n",
"so there are three cubic parameters per fluid that need to be obtained though fitting: $b_{i}$, $a_{0i}$, $c_{1i}$. The value of $a_{\\rm ij}$ depends on temperature while $b_{\\rm mix}$ does not.\n",
"\n",
"## Association part\n",
"\n",
"For the association, one must have a solid understanding of the association approach that is being applied. To this end, a short discussion of the general approach is required. \n",
"\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "2180ef67",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand All @@ -27,7 +83,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.4"
"version": "3.10.13"
}
},
"nbformat": 4,
Expand Down
4 changes: 4 additions & 0 deletions doc/source/models/Molecule.drawio.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 2927e3c

Please sign in to comment.