diff --git a/electrochemistry/lithium_ion_battery.ipynb b/electrochemistry/lithium_ion_battery.ipynb
index 20437bd..9ccb2ed 100644
--- a/electrochemistry/lithium_ion_battery.ipynb
+++ b/electrochemistry/lithium_ion_battery.ipynb
@@ -24,7 +24,7 @@
" \n",
"In this example we will illustrate how to calculate the open circuit voltage (voltage when the external applied current is 0) for a lithium ion battery. The thermodynamics are based on a graphite anode and a LiCoO2 cathode (the typical/standard active materials for commercial batteries, as of 2019), and are modeled using the 'BinarySolutionTabulatedThermo' class.\n",
"\n",
- "For the sake of simplicity, we're going to assume that the anode and cathode capacities are perfectly balanced (i.e. if the cathode lithium content is X percent of it's max possible (i.e. its capacity), then we will assume that the anode is at 1-X percent. Without loss of generality, we will define the anode composition:\n",
+ "For the sake of simplicity, we're going to assume that the anode and cathode capacities are perfectly balanced (i.e. if the cathode lithium content is X percent of its max possible (i.e. its capacity), then we will assume that the anode is at 1-X percent. Without loss of generality, we will define the anode composition.\n",
"\n",
"The routine below returns the cell voltage (in Volt) of a lithium-ion cell for a given cell current and active material lithium stoichiometries.\n",
"\n",
@@ -59,7 +59,7 @@
"The Faradaic current for this model is calculated using Butler-Volmer kinetics. For a Li-ion battery, this is:\n",
"\n",
"\\begin{equation}\n",
- "i = S_{\\rm elde}i_\\circ\\left[\\exp\\left(\\frac{F\\beta\\eta}{RT}\\right) - \\exp\\left(-\\frac{F\\beta\\eta}{RT}\\right) \\right]\n",
+ "i = S_{\\rm elde}i_\\circ\\left[\\exp\\left(\\frac{F\\beta\\eta}{RT}\\right) - \\exp\\left(-\\frac{F(1-\\beta)\\eta}{RT}\\right) \\right]\n",
"\\end{equation}\n",
"\n",
"where $S_{\\rm elde}$ is the specific surface area of the electrode in question, $F$ is Faraday's constant, $\\beta$ is the charge-transfer symmetry parameter, $R$ the universal gas constant, $T$ the temperature, and $\\eta$ the overpotential, which is the electric potential difference between the electrode and electrolyte, $\\Delta \\phi = \\phi_{\\rm elde} - \\phi_{\\rm elyte}$, relative to that at equilibrium, $\\Delta \\phi_{\\rm eq}$:\n",
@@ -289,7 +289,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
- "49 cell voltages calculated in 0.32 seconds.\n"
+ "49 cell voltages calculated in 0.61 seconds.\n"
]
}
],
@@ -416,7 +416,7 @@
" };\n",
"\n",
" this.imageObj.onunload = function() {\n",
- " fig.ws.close();\n",
+ " this.ws.close();\n",
" }\n",
"\n",
" this.ws.onmessage = this._make_on_message_function(this);\n",
@@ -891,7 +891,7 @@
"mpl.figure.prototype.toolbar_button_onmouseover = function(tooltip) {\n",
" this.message.textContent = tooltip;\n",
"};\n",
- "mpl.toolbar_items = [[\"Home\", \"Reset original view\", \"fa fa-home icon-home\", \"home\"], [\"Back\", \"Back to previous view\", \"fa fa-arrow-left icon-arrow-left\", \"back\"], [\"Forward\", \"Forward to next view\", \"fa fa-arrow-right icon-arrow-right\", \"forward\"], [\"\", \"\", \"\", \"\"], [\"Pan\", \"Pan axes with left mouse, zoom with right\", \"fa fa-arrows icon-move\", \"pan\"], [\"Zoom\", \"Zoom to rectangle\", \"fa fa-square-o icon-check-empty\", \"zoom\"], [\"\", \"\", \"\", \"\"], [\"Download\", \"Download plot\", \"fa fa-floppy-o icon-save\", \"download\"]];\n",
+ "mpl.toolbar_items = [[\"Home\", \"Reset original view\", \"fa fa-home icon-home\", \"home\"], [\"Back\", \"Back to previous view\", \"fa fa-arrow-left icon-arrow-left\", \"back\"], [\"Forward\", \"Forward to next view\", \"fa fa-arrow-right icon-arrow-right\", \"forward\"], [\"\", \"\", \"\", \"\"], [\"Pan\", \"Pan axes with left mouse, zoom with right\", \"fa fa-arrows icon-move\", \"pan\"], [\"Zoom\", \"Zoom to rectangle\", \"fa fa-square-o icon-check-empty\", \"zoom\"], [\"\", \"\", \"\", \"\"], [\"Download\", \"Download plot\", \"fa fa-floppy-o icon-save\", \"download\"]];\n",
"\n",
"mpl.extensions = [\"eps\", \"pdf\", \"png\", \"ps\", \"raw\", \"svg\"];\n",
"\n",
@@ -911,7 +911,7 @@
" // Register the callback with on_msg.\n",
" comm.on_msg(function(msg) {\n",
" //console.log('receiving', msg['content']['data'], msg);\n",
- " // Pass the mpl event to the overridden (by mpl) onmessage function.\n",
+ " // Pass the mpl event to the overriden (by mpl) onmessage function.\n",
" ws.onmessage(msg['content']['data'])\n",
" });\n",
" return ws;\n",
@@ -1063,12 +1063,9 @@
" // Check for shift+enter\n",
" if (event.shiftKey && event.which == 13) {\n",
" this.canvas_div.blur();\n",
- " event.shiftKey = false;\n",
- " // Send a \"J\" for go to next cell\n",
- " event.which = 74;\n",
- " event.keyCode = 74;\n",
- " manager.command_mode();\n",
- " manager.handle_keydown(event);\n",
+ " // select the cell after this one\n",
+ " var index = IPython.notebook.find_cell_index(this.cell_info[0]);\n",
+ " IPython.notebook.select(index + 1);\n",
" }\n",
"}\n",
"\n",
@@ -1117,7 +1114,7 @@
{
"data": {
"text/html": [
- "
"
+ "
"
],
"text/plain": [
""
@@ -1175,7 +1172,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
- "49 cell voltages calculated in 0.02 seconds.\n"
+ "49 cell voltages calculated in 0.03 seconds.\n"
]
}
],
@@ -1301,7 +1298,7 @@
" };\n",
"\n",
" this.imageObj.onunload = function() {\n",
- " fig.ws.close();\n",
+ " this.ws.close();\n",
" }\n",
"\n",
" this.ws.onmessage = this._make_on_message_function(this);\n",
@@ -1776,7 +1773,7 @@
"mpl.figure.prototype.toolbar_button_onmouseover = function(tooltip) {\n",
" this.message.textContent = tooltip;\n",
"};\n",
- "mpl.toolbar_items = [[\"Home\", \"Reset original view\", \"fa fa-home icon-home\", \"home\"], [\"Back\", \"Back to previous view\", \"fa fa-arrow-left icon-arrow-left\", \"back\"], [\"Forward\", \"Forward to next view\", \"fa fa-arrow-right icon-arrow-right\", \"forward\"], [\"\", \"\", \"\", \"\"], [\"Pan\", \"Pan axes with left mouse, zoom with right\", \"fa fa-arrows icon-move\", \"pan\"], [\"Zoom\", \"Zoom to rectangle\", \"fa fa-square-o icon-check-empty\", \"zoom\"], [\"\", \"\", \"\", \"\"], [\"Download\", \"Download plot\", \"fa fa-floppy-o icon-save\", \"download\"]];\n",
+ "mpl.toolbar_items = [[\"Home\", \"Reset original view\", \"fa fa-home icon-home\", \"home\"], [\"Back\", \"Back to previous view\", \"fa fa-arrow-left icon-arrow-left\", \"back\"], [\"Forward\", \"Forward to next view\", \"fa fa-arrow-right icon-arrow-right\", \"forward\"], [\"\", \"\", \"\", \"\"], [\"Pan\", \"Pan axes with left mouse, zoom with right\", \"fa fa-arrows icon-move\", \"pan\"], [\"Zoom\", \"Zoom to rectangle\", \"fa fa-square-o icon-check-empty\", \"zoom\"], [\"\", \"\", \"\", \"\"], [\"Download\", \"Download plot\", \"fa fa-floppy-o icon-save\", \"download\"]];\n",
"\n",
"mpl.extensions = [\"eps\", \"pdf\", \"png\", \"ps\", \"raw\", \"svg\"];\n",
"\n",
@@ -1796,7 +1793,7 @@
" // Register the callback with on_msg.\n",
" comm.on_msg(function(msg) {\n",
" //console.log('receiving', msg['content']['data'], msg);\n",
- " // Pass the mpl event to the overridden (by mpl) onmessage function.\n",
+ " // Pass the mpl event to the overriden (by mpl) onmessage function.\n",
" ws.onmessage(msg['content']['data'])\n",
" });\n",
" return ws;\n",
@@ -1948,12 +1945,9 @@
" // Check for shift+enter\n",
" if (event.shiftKey && event.which == 13) {\n",
" this.canvas_div.blur();\n",
- " event.shiftKey = false;\n",
- " // Send a \"J\" for go to next cell\n",
- " event.which = 74;\n",
- " event.keyCode = 74;\n",
- " manager.command_mode();\n",
- " manager.handle_keydown(event);\n",
+ " // select the cell after this one\n",
+ " var index = IPython.notebook.find_cell_index(this.cell_info[0]);\n",
+ " IPython.notebook.select(index + 1);\n",
" }\n",
"}\n",
"\n",
@@ -2002,7 +1996,7 @@
{
"data": {
"text/html": [
- "
"
+ "
"
],
"text/plain": [
""
@@ -2059,7 +2053,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
- "version": "3.7.2"
+ "version": "3.6.8"
}
},
"nbformat": 4,