From 2936575adc8d82eb73bf2a00665329dbb4d2113e Mon Sep 17 00:00:00 2001 From: Ian Bell <ian.bell@nist.gov> Date: Wed, 6 Jul 2022 21:26:29 -0400 Subject: [PATCH] Temperature derivs of virial coeffs --- doc/source/derivs/derivs.ipynb | 74 ++++++++++++++++++++++++++++------ 1 file changed, 61 insertions(+), 13 deletions(-) diff --git a/doc/source/derivs/derivs.ipynb b/doc/source/derivs/derivs.ipynb index 408013f..6ff4997 100644 --- a/doc/source/derivs/derivs.ipynb +++ b/doc/source/derivs/derivs.ipynb @@ -29,7 +29,7 @@ }, { "cell_type": "code", - "execution_count": 1, + "execution_count": 2, "id": "ca35cc29", "metadata": { "execution": { @@ -47,7 +47,7 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": 3, "id": "8d254c40", "metadata": { "execution": { @@ -67,7 +67,7 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": 4, "id": "49ee3453", "metadata": { "execution": { @@ -84,7 +84,7 @@ "-0.06836660379313926" ] }, - "execution_count": 3, + "execution_count": 4, "metadata": {}, "output_type": "execute_result" } @@ -104,7 +104,7 @@ }, { "cell_type": "code", - "execution_count": 12, + "execution_count": 5, "id": "3ae755e1", "metadata": {}, "outputs": [ @@ -120,7 +120,7 @@ " 3.8259258513417917e-07]" ] }, - "execution_count": 12, + "execution_count": 5, "metadata": {}, "output_type": "execute_result" } @@ -139,7 +139,7 @@ }, { "cell_type": "code", - "execution_count": 13, + "execution_count": 6, "id": "4e0609ae", "metadata": {}, "outputs": [ @@ -147,8 +147,8 @@ "name": "stdout", "output_type": "stream", "text": [ - "1.93 µs ± 32.9 ns per loop (mean ± std. dev. of 7 runs, 1,000,000 loops each)\n", - "2.13 µs ± 36.7 ns per loop (mean ± std. dev. of 7 runs, 100,000 loops each)\n" + "2.57 µs ± 152 ns per loop (mean ± std. dev. of 7 runs, 100,000 loops each)\n", + "2.67 µs ± 87.5 ns per loop (mean ± std. dev. of 7 runs, 100,000 loops each)\n" ] } ], @@ -183,12 +183,12 @@ "\t(\\alpha^r)^{(i)} = \\lim_{\\rho \\to 0} \\left(\\frac{\\partial^{i}\\alpha^r}{\\partial \\rho^{i}}\\right)_{T,\\vec{x}}\n", "$$\n", "\n", - "teqp supports the virial coefficient directly, there is the ``get_B2vir`` for the second virial coefficient:" + "teqp supports the virial coefficient directly, there is the ``get_B2vir`` method for the second virial coefficient:" ] }, { "cell_type": "code", - "execution_count": 9, + "execution_count": 7, "id": "720e120c", "metadata": {}, "outputs": [ @@ -198,7 +198,7 @@ "-0.00023661263734465424" ] }, - "execution_count": 9, + "execution_count": 7, "metadata": {}, "output_type": "execute_result" } @@ -246,8 +246,56 @@ "id": "d50998b1", "metadata": {}, "source": [ - "The ``get_Bnvir`` function was implemented because when doing automatic differentiation, all the intermediate derivatives are also retained." + "The ``get_Bnvir`` method was implemented because when doing automatic differentiation, all the intermediate derivatives are also retained." + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "id": "7c79029d", + "metadata": {}, + "outputs": [ + { + "ename": "SyntaxError", + "evalue": "invalid syntax (2241282538.py, line 1)", + "output_type": "error", + "traceback": [ + "\u001b[1;36m Input \u001b[1;32mIn [9]\u001b[1;36m\u001b[0m\n\u001b[1;33m There is also a method to calculate temperature derivatives of a given virial coefficient\u001b[0m\n\u001b[1;37m ^\u001b[0m\n\u001b[1;31mSyntaxError\u001b[0m\u001b[1;31m:\u001b[0m invalid syntax\n" + ] + } + ], + "source": [ + "There is also a method to calculate temperature derivatives of a given virial coefficient" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "id": "fa4ff386", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "1.0095625628421257e-10" + ] + }, + "execution_count": 11, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "model.get_dmBnvirdTm(2, 3, 300, z) # third temperature derivative of the " ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "34e918f8", + "metadata": {}, + "outputs": [], + "source": [] } ], "metadata": { -- GitLab