{ "cells": [ { "cell_type": "markdown", "id": "940cc903", "metadata": {}, "source": [ "# Model Potentials\n", "\n", "These EOS for model potentials are useful for understanding theory, and capture some (but perhaps not all) of the physics of \"real\" fluids." ] }, { "cell_type": "code", "execution_count": 1, "id": "f5463428", "metadata": { "execution": { "iopub.execute_input": "2024-03-15T22:40:52.217143Z", "iopub.status.busy": "2024-03-15T22:40:52.216980Z", "iopub.status.idle": "2024-03-15T22:40:52.231043Z", "shell.execute_reply": "2024-03-15T22:40:52.230591Z" } }, "outputs": [ { "data": { "text/plain": [ "'0.19.1'" ] }, "execution_count": 1, "metadata": {}, "output_type": "execute_result" } ], "source": [ "import teqp\n", "teqp.__version__" ] }, { "cell_type": "markdown", "id": "bf22ac3d", "metadata": {}, "source": [ "## Square-well\n", "\n", "The potential is defined by\n", "\n", "$$\n", "V(r) = \\left\\lbrace \\begin{array}{cc}\n", " \\infty & r < \\sigma \\\\\n", " -\\varepsilon & \\sigma < r < \\lambda\\sigma \\\\\n", " 0 & r > \\lambda \\sigma\n", " \\end{array}\\right. \n", "$$\n", "\n", "from which an EOS can be developed by correlating results from molecular simulation. The EOS is from:\n", "\n", " Rodolfo Espíndola-Heredia, Fernando del Río and Anatol Malijevsky\n", " Optimized equation of the state of the\n", " square-well fluid of variable range based on\n", " a fourth-order free-energy expansion\n", " J. Chem. Phys. 130, 024509 (2009); https://doi.org/10.1063/1.3054361\n", " " ] }, { "cell_type": "code", "execution_count": 2, "id": "435a84a9", "metadata": { "execution": { "iopub.execute_input": "2024-03-15T22:40:52.233061Z", "iopub.status.busy": "2024-03-15T22:40:52.232897Z", "iopub.status.idle": "2024-03-15T22:40:52.235488Z", "shell.execute_reply": "2024-03-15T22:40:52.235094Z" } }, "outputs": [], "source": [ "model = teqp.make_model({ \n", " \"kind\": \"SW_EspindolaHeredia2009\", \n", " \"model\": {\n", " \"lambda\": 1.3\n", " }\n", "})" ] }, { "cell_type": "markdown", "id": "f0caf9ea", "metadata": {}, "source": [ "## EXP-6" ] }, { "cell_type": "code", "execution_count": 3, "id": "dc38b705", "metadata": { "execution": { "iopub.execute_input": "2024-03-15T22:40:52.237416Z", "iopub.status.busy": "2024-03-15T22:40:52.237257Z", "iopub.status.idle": "2024-03-15T22:40:52.239795Z", "shell.execute_reply": "2024-03-15T22:40:52.239384Z" } }, "outputs": [], "source": [ "model = teqp.make_model({ \n", " \"kind\": \"EXP6_Kataoka1992\", \n", " \"model\": {\n", " \"alpha\": 12\n", " }\n", "})" ] }, { "cell_type": "markdown", "id": "b87cbd05", "metadata": {}, "source": [ "## Lennard-Jones Fluid\n", "\n", "The Lennard-Jones potential is given by\n", "$$\n", "V(r) = 4\\varepsilon\\left((\\sigma/r)^{12}-(\\sigma/r)^{6}\\right)\n", "$$\n", "\n", "and EOS are available from many authors. teqp includes the EOS from Thol, Kolafa-Nezbeda, and Johnson." ] }, { "cell_type": "code", "execution_count": 4, "id": "739e3e2b", "metadata": { "execution": { "iopub.execute_input": "2024-03-15T22:40:52.241560Z", "iopub.status.busy": "2024-03-15T22:40:52.241406Z", "iopub.status.idle": "2024-03-15T22:40:52.246065Z", "shell.execute_reply": "2024-03-15T22:40:52.245648Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "LJ126_TholJPCRD2016 (1.3035125549100017, 0.3103860327864468) (1.32, 0.31)\n", "LJ126_KolafaNezbeda1994 (1.3396478193468193, 0.3108038977722935) (1.3396, 0.3108)\n", "LJ126_Johnson1993 (1.3130000571792173, 0.3099999768607838) (1.313, 0.31)\n" ] } ], "source": [ "for kind, crit in [\n", " [\"LJ126_TholJPCRD2016\", (1.32, 0.31)], # Note the true critical point was not used\n", " [\"LJ126_KolafaNezbeda1994\", (1.3396, 0.3108)],\n", " [\"LJ126_Johnson1993\", (1.313, 0.310)]]:\n", " \n", " j = { \"kind\": kind, \"model\": {} }\n", " model = teqp.make_model(j)\n", " print(kind, model.solve_pure_critical(1.3, 0.3), crit)" ] }, { "cell_type": "markdown", "id": "fad87158", "metadata": {}, "source": [ "## Two-Center Lennard-Jones Fluid" ] }, { "cell_type": "code", "execution_count": 5, "id": "ae5646de", "metadata": { "execution": { "iopub.execute_input": "2024-03-15T22:40:52.247834Z", "iopub.status.busy": "2024-03-15T22:40:52.247679Z", "iopub.status.idle": "2024-03-15T22:40:52.252722Z", "shell.execute_reply": "2024-03-15T22:40:52.252268Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "(2.8282972062188056, 0.2005046666634018)\n", "(2.832574303561834, 0.2003194655463274)\n" ] } ], "source": [ "model = teqp.make_model({ \n", " 'kind': '2CLJF-Dipole', \n", " 'model': {\n", " \"author\": \"2CLJF_Lisal\",\n", " 'L^*': 0.5,\n", " '(mu^*)^2': 0.1\n", " }\n", "})\n", "print(model.solve_pure_critical(1.3, 0.3))\n", "\n", "model = teqp.make_model({ \n", " 'kind': '2CLJF-Quadrupole', \n", " 'model': {\n", " \"author\": \"2CLJF_Lisal\",\n", " 'L^*': 0.5,\n", " '(Q^*)^2': 0.1\n", " }\n", "})\n", "print(model.solve_pure_critical(1.3, 0.3))" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.11.0" } }, "nbformat": 4, "nbformat_minor": 5 }