From ba1092100ecdbed92d7abb2353f950f27614e4cf Mon Sep 17 00:00:00 2001 From: Ferran Brosa Planella Date: Sun, 23 Jun 2024 18:27:46 +0100 Subject: [PATCH] #3844 fix a few typos --- .../creating_models/1-an-ode-model.ipynb | 28 ++++++++----------- 1 file changed, 11 insertions(+), 17 deletions(-) diff --git a/docs/source/examples/notebooks/creating_models/1-an-ode-model.ipynb b/docs/source/examples/notebooks/creating_models/1-an-ode-model.ipynb index 1f39b66d37..8faf834849 100644 --- a/docs/source/examples/notebooks/creating_models/1-an-ode-model.ipynb +++ b/docs/source/examples/notebooks/creating_models/1-an-ode-model.ipynb @@ -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" ] }, { @@ -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" ] }, { @@ -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})" ] }, { @@ -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", @@ -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", ")" ] @@ -439,7 +433,7 @@ { "data": { "application/vnd.jupyter.widget-view+json": { - "model_id": "6010f8d88e4544dd973089a9bc96fb60", + "model_id": "1607597bd6774b51b66b0f11f7f68404", "version_major": 2, "version_minor": 0 }, @@ -453,7 +447,7 @@ { "data": { "text/plain": [ - "" + "" ] }, "execution_count": 14,