Skip to content

Commit

Permalink
#3844 fix a few typos
Browse files Browse the repository at this point in the history
  • Loading branch information
brosaplanella committed Jun 23, 2024
1 parent cfe2a7c commit ba10921
Showing 1 changed file with 11 additions and 17 deletions.
28 changes: 11 additions & 17 deletions docs/source/examples/notebooks/creating_models/1-an-ode-model.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"$$\n",
"where $x_n$ and $x_p$ are the dimensionless stochiometries of the negative and positive electrodes, $I(t)$ is the current, $Q_\\mathrm{n}$ and $Q_\\mathrm{p}$ are the capacities of the negative and positive electrodes, $U_\\mathrm{p}(x_\\mathrm{p})$ and $U_\\mathrm{n}(x_\\mathrm{n})$ are the open circuit potentials of the positive and negative electrodes, and $R$ is the internal resistance of the battery.\n",
"\n",
"We begin by importing the PyBaMM library into this notebook, along with NumPy and Matplotlib, which we use for plotting:\n"
"We begin by importing the PyBaMM library into this notebook:\n"
]
},
{
Expand All @@ -38,23 +38,15 @@
"output_type": "stream",
"text": [
"\n",
"\u001b[1m[\u001b[0m\u001b[34;49mnotice\u001b[0m\u001b[1;39;49m]\u001b[0m\u001b[39;49m A new release of pip is available: \u001b[0m\u001b[31;49m23.3.1\u001b[0m\u001b[39;49m -> \u001b[0m\u001b[32;49m24.0\u001b[0m\n",
"\u001b[1m[\u001b[0m\u001b[34;49mnotice\u001b[0m\u001b[1;39;49m]\u001b[0m\u001b[39;49m A new release of pip is available: \u001b[0m\u001b[31;49m23.3.1\u001b[0m\u001b[39;49m -> \u001b[0m\u001b[32;49m24.1\u001b[0m\n",
"\u001b[1m[\u001b[0m\u001b[34;49mnotice\u001b[0m\u001b[1;39;49m]\u001b[0m\u001b[39;49m To update, run: \u001b[0m\u001b[32;49mpip install --upgrade pip\u001b[0m\n",
"Note: you may need to restart the kernel to use updated packages.\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"An NVIDIA GPU may be present on this machine, but a CUDA-enabled jaxlib is not installed. Falling back to cpu.\n"
]
}
],
"source": [
"%pip install \"pybamm[plot,cite]\" -q # install PyBaMM if it is not installed\n",
"import pybamm\n",
"import numpy as np"
"import pybamm"
]
},
{
Expand Down Expand Up @@ -138,8 +130,8 @@
"outputs": [],
"source": [
"i = pybamm.FunctionParameter(\"Current function [A]\", {\"Time [s]\": pybamm.t})\n",
"U_p = pybamm.FunctionParameter(\"Positive electrode OCV\", {\"x_p\": x_p})\n",
"U_n = pybamm.FunctionParameter(\"Negative electrode OCV\", {\"x_n\": x_n})"
"U_p = pybamm.FunctionParameter(\"Positive electrode OCP [V]\", {\"x_p\": x_p})\n",
"U_n = pybamm.FunctionParameter(\"Negative electrode OCP [V]\", {\"x_n\": x_n})"
]
},
{
Expand Down Expand Up @@ -367,6 +359,8 @@
"metadata": {},
"outputs": [],
"source": [
"import numpy as np\n",
"\n",
"def graphite_LGM50_ocp_Chen2020(sto):\n",
" u_eq = (\n",
" 1.9793 * np.exp(-39.3631 * sto)\n",
Expand Down Expand Up @@ -399,8 +393,8 @@
" \"Negative electrode capacity [A.h]\": 1.2,\n",
" \"Positive electrode capacity [A.h]\": 1,\n",
" \"Electrode resistance [Ohm]\": 0.1,\n",
" \"Positive electrode OCV\": nmc_LGM50_ocp_Chen2020,\n",
" \"Negative electrode OCV\": graphite_LGM50_ocp_Chen2020,\n",
" \"Positive electrode OCP [V]\": nmc_LGM50_ocp_Chen2020,\n",
" \"Negative electrode OCP [V]\": graphite_LGM50_ocp_Chen2020,\n",
" }\n",
")"
]
Expand Down Expand Up @@ -439,7 +433,7 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "6010f8d88e4544dd973089a9bc96fb60",
"model_id": "1607597bd6774b51b66b0f11f7f68404",
"version_major": 2,
"version_minor": 0
},
Expand All @@ -453,7 +447,7 @@
{
"data": {
"text/plain": [
"<pybamm.plotting.quick_plot.QuickPlot at 0x7f5caa0a54d0>"
"<pybamm.plotting.quick_plot.QuickPlot at 0x7f86a086a510>"
]
},
"execution_count": 14,
Expand Down

0 comments on commit ba10921

Please sign in to comment.