Skip to content

Commit

Permalink
Two typo in ideal gas docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ianhbell committed Mar 14, 2024
1 parent 62ecba9 commit fb240c2
Showing 1 changed file with 35 additions and 7 deletions.
42 changes: 35 additions & 7 deletions doc/source/models/IdealGas.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -165,11 +165,11 @@
"\n",
"$$ \\alpha = \\ln(\\rho) - \\ln(\\rho_r) + a_1^* + a_2^*\\left(\\frac{T_r}{T}\\right) $$ so that $a_1 = a_1^*-\\ln(\\rho_r)$ and $a_2=a_2^*T_r$\n",
"\n",
"In some cases reconstitutions of terms are required, as the supported terms in the libraries are somewhat different. The term used in CoolProp do do the offsets to enthalpy and entropy is of the form \n",
"In some cases reconstitutions of terms are required, as the supported terms in the libraries are somewhat different. The term used in CoolProp to do the offsets to enthalpy and entropy is of the form \n",
"$$\n",
"\\alpha = a_1^* + a_2^*\\tau = a_1^* + a_2^*\\left(\\frac{T_r}{T}\\right)\n",
"$$\n",
"so that term can be rewritten as a ``IdealHelmholtzPowerT`` with coefficients of $a_1^*$ and $a_2^*T_r$ and exponents of 0 and -1.\n",
"so that term can be rewritten as an ``IdealHelmholtzPowerT`` with coefficients of $a_1^*$ and $a_2^*T_r$ and exponents of 0 and -1.\n",
"\n",
"Most of the remaining terms can be converted in a straightforward fashion, except for some of GERG formulations that are a bit trickier. Mostly, the only conversion required is to multiply or divide by reducing temperatures so that all arguments are in terms of temperature as independent variable.\n",
"\n",
Expand All @@ -188,7 +188,14 @@
"cell_type": "code",
"execution_count": null,
"id": "65569f64",
"metadata": {},
"metadata": {
"execution": {
"iopub.execute_input": "2024-03-13T21:50:15.105464Z",
"iopub.status.busy": "2024-03-13T21:50:15.105077Z",
"iopub.status.idle": "2024-03-13T21:50:15.184335Z",
"shell.execute_reply": "2024-03-13T21:50:15.184043Z"
}
},
"outputs": [],
"source": [
"import teqp, os, numpy as np, json\n",
Expand All @@ -199,7 +206,14 @@
"cell_type": "code",
"execution_count": null,
"id": "3c4fb9fc",
"metadata": {},
"metadata": {
"execution": {
"iopub.execute_input": "2024-03-13T21:50:15.185934Z",
"iopub.status.busy": "2024-03-13T21:50:15.185810Z",
"iopub.status.idle": "2024-03-13T21:50:15.188886Z",
"shell.execute_reply": "2024-03-13T21:50:15.188610Z"
}
},
"outputs": [],
"source": [
"path = teqp.get_datapath()+'/dev/fluids/n-Propane.json'\n",
Expand All @@ -223,7 +237,14 @@
"cell_type": "code",
"execution_count": null,
"id": "ac7bec1b-40f9-47c6-8ec0-0085681867a7",
"metadata": {},
"metadata": {
"execution": {
"iopub.execute_input": "2024-03-13T21:50:15.190333Z",
"iopub.status.busy": "2024-03-13T21:50:15.190245Z",
"iopub.status.idle": "2024-03-13T21:50:15.192612Z",
"shell.execute_reply": "2024-03-13T21:50:15.192332Z"
}
},
"outputs": [],
"source": [
"# As an worked example, the conversions can be carried out like so, with the values from Lemmon given name of b instead of a\n",
Expand All @@ -244,7 +265,14 @@
"cell_type": "code",
"execution_count": null,
"id": "3b8c17de",
"metadata": {},
"metadata": {
"execution": {
"iopub.execute_input": "2024-03-13T21:50:15.194007Z",
"iopub.status.busy": "2024-03-13T21:50:15.193923Z",
"iopub.status.idle": "2024-03-13T21:50:15.196873Z",
"shell.execute_reply": "2024-03-13T21:50:15.196619Z"
}
},
"outputs": [],
"source": [
"aig = teqp.IdealHelmholtz([jig])\n",
Expand All @@ -269,7 +297,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.13"
"version": "3.10.6"
}
},
"nbformat": 4,
Expand Down

0 comments on commit fb240c2

Please sign in to comment.