{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Changing the Reference Electrode"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"import pyPourbaix as pb"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"In the previous tutorial, we generated a simple Pourbaix diagram featuring 2 potential- and pH-dependent reactions, the Hydrogen Evolution Reaction (HER) and the Oxygen Evolution Reaction (OER). It was apparent that the plotted standard potentials $E_0$ versus the standard hydrogen electrode of both reactions yielded the desired values. This tutorial will showcase how the reference electrode can be changed. Recall, we define a generic System by defining its .temperature, .pressure, .pHs and .electrode_potentials:"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
"reference_system = pb.System()\n",
"reference_system.temperature = 298.15 \n",
"reference_system.pressure = 1.00\n",
"reference_system.pHs = (0,10)\n",
"reference_system.electrode_potentials = (-1.5,1.5)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We have previously also specified the system reference electrode as:"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [],
"source": [
"reference_system.reference_electrode = (\"SHE\",0.00)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Suppose we want to shift the reference potential of the reactive system by $\\Delta E = 0.241$ V, equivalent to the potential difference between the standard hydrogen and the copper sulfate electrode. This can be done by specifying the electrode_abbreviation as CSE and the potential_difference as 0.241:"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [],
"source": [
"reference_system.reference_electrode = (\"CSE\",0.241)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We can also define the silver-chlorde elecrode as SCE, or, in fact, any other custom electrode with a new user-defined abbreviation:"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [],
"source": [
"reference_system.reference_electrode = (\"custom_RE\",0.420)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"To keep track of your reference system, the electrode abbreviation specified will automatically appear on the y-axis of your Pourbaix diagram."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"