nernst_cell
Electrochemical cell thermodynamics: two half-reactions (standard reduction potentials as inputs), electrons, activities, pH and temperature give the standard and actual cell voltage (Nernst), free energy and equilibrium constant; a temperature coefficient gives entropy, enthalpy and thermoneutral voltage; Faraday's law gives charge, mass and specific capacity for electrolysis.
- Field
- Electrochemistry and batteries
- Version
- 0.1.0
- Runs as
- Compiled (Rust)
- Typical run
- 0.05 s
Compiled from source: run sh packs/install.sh once before admitting it.
Known answers it must pass
r0001Daniell cell, spec known answer: Cu₂+/Cu +0.34 V, Zn₂+/Zn -0.76 V, n=2, 25 C → E₀ = 1.10 V, dG0 = -nFE0 = -212.27 kJ/mol, log10 K = nFE0/(RT ln10) = 37.19 (closed forms with exact SI e, k, N_A; rel 10⁻⁹)passed
e_standard_V1.1 ± 10⁻¹²1.1lockedunder 0.01 % of the tolerance usede_cell_V1.1 ± 10⁻¹²1.1lockedunder 0.01 % of the tolerance useddg_standard_kJ_per_mol-212.268 ± 2.1 × 10⁻⁷-212.268lockedunder 0.01 % of the tolerance usedlog10_k37.1877 ± 3.7 × 10⁻⁸37.1877lockedunder 0.01 % of the tolerance usedln_k85.6278 ± 8.6 × 10⁻⁸85.6278lockedunder 0.01 % of the tolerance usedspontaneous= truetruelockedexact matchr0002Nernst slope, spec known answer: R T ln10 / F = 59.159 mV and R T / F = 25.693 mV at 298.15 K; F = e N_A = 96485.33212 C/mol, R = k N_A = 8.314462618 J/mol/K (CODATA exact; rel 10⁻⁹)passed
nernst_slope_mV59.1593 ± 5.9 × 10⁻⁸59.1593lockedunder 0.01 % of the tolerance usedthermal_voltage_mV25.6926 ± 2.6 × 10⁻⁸25.6926lockedunder 0.01 % of the tolerance usedfaraday_C_per_mol96485.3 ± 9.6 × 10⁻⁸96485.3lockedunder 0.01 % of the tolerance usedgas_constant_J_per_mol_K8.31446 ± 8.3 × 10⁻¹²8.31446lockedunder 0.01 % of the tolerance usedtemperature_K298.15 ± 10⁻⁹298.15lockedunder 0.01 % of the tolerance usedr0003Concentration cell, spec known answer: same half-cell both sides, activities 1.0 (cathode) and 0.1 (anode), n=1, 25 C → E₀ = 0, E = (RT ln10/F) log10(10) = 59.16 mV (closed form; rel 10⁻⁹)passed
e_standard_V0 ± 10⁻¹²0lockedunder 0.01 % of the tolerance usedlog10_q-1 ± 10⁻¹²-1lockedunder 0.01 % of the tolerance usede_cell_V0.0591593 ± 5.9 × 10⁻¹¹0.0591593lockedunder 0.01 % of the tolerance usedspontaneous= truetruelockedexact matchr0004Hydrogen electrode against SHE, spec known answer: 2H+ + 2e- → H₂ moves -59.16 mV per pH unit; at pH 7 E = -7 RT ln10/F = -0.4141 V (closed form; rel 10⁻⁹)passed
ph_slope_mV_per_pH-59.1593 ± 5.9 × 10⁻⁸-59.1593lockedunder 0.01 % of the tolerance usede_cell_V-0.414115 ± 4.1 × 10⁻¹⁰-0.414115lockedunder 0.01 % of the tolerance usede_formal_at_ph_V-0.414115 ± 4.1 × 10⁻¹⁰-0.414115lockedunder 0.01 % of the tolerance usedlog10_q14 ± 10⁻¹²14lockedunder 0.01 % of the tolerance usedspontaneous= falsefalselockedexact matchr0005Faraday's law, spec known answer: 1 A for 1 h, M = 63.546 g/mol, z = 2 → m = I t M/(z F) = 1.1855 g, 3600 C = 1 Ah, 0.037311 mol of electrons (closed form; rel 10⁻⁹)passed
mass_g1.18549 ± 1.2 × 10⁻⁹1.18549lockedunder 0.01 % of the tolerance usedcharge_C3600 ± 3.6 × 10⁻⁹3600lockedunder 0.01 % of the tolerance usedcharge_Ah1 ± 10⁻¹²1lockedunder 0.01 % of the tolerance usedelectrons_mol0.0373114 ± 3.7 × 10⁻¹¹0.0373114lockedunder 0.01 % of the tolerance usedproduct_mol0.0186557 ± 1.9 × 10⁻¹¹0.0186557lockedunder 0.01 % of the tolerance usedr0006Daniell cell off standard, textbook exercise: a(Cu₂+) = 0.01, a(Zn₂+) = 1, n=2, 25 C → Q = 100, E = 1.10 - (0.059159/2) · 2 = 1.0408 V, dG = -nFE = -200.85 kJ/mol (closed form; rel 10⁻⁹)passed
log10_q2 ± 10⁻¹²2lockedunder 0.01 % of the tolerance usede_cell_V1.04084 ± 10⁻⁹1.04084lockedunder 0.01 % of the tolerance useddg_kJ_per_mol-200.852 ± 2 × 10⁻⁷-200.852lockedunder 0.01 % of the tolerance usedr0007Oxygen electrode at pH 7, textbook value E₀' = +0.815 V: O₂ + 4H+ + 4e- → 2H2O, E₀ = 1.229 V, protons = 4, n = 4 → 1.229 - 7 · 0.059159 = 0.81488 V, slope -59.16 mV/pH (closed form; rel 10⁻⁹)passed
e_cell_V0.814885 ± 8.1 × 10⁻¹⁰0.814885lockedunder 0.01 % of the tolerance usedph_slope_mV_per_pH-59.1593 ± 5.9 × 10⁻⁸-59.1593lockedunder 0.01 % of the tolerance usedr0008Hydrogen-oxygen cell against thermochemical tables (CODATA key values for liquid water: dfG0 = -237.13, dfH0 = -285.83 kJ/mol, dS0 = -163.3 J/mol/K; thermoneutral 1.481 V, ideal efficiency 0.83). Tolerance 0.1 % because the inputs E₀ = 1.229 V and dE0/dT = -0.846 mV/K are rounded to 4 and 3 digitspassed
dg_standard_kJ_per_mol-237.13 ± 0.24-237.161locked13 % of the tolerance useddh_standard_kJ_per_mol-285.83 ± 0.29-285.835locked1.7 % of the tolerance usedds_standard_J_per_mol_K-163.3 ± 0.16-163.253locked29 % of the tolerance usedthermoneutral_voltage_V1.481 ± 0.00151.48123locked16 % of the tolerance usedthermodynamic_efficiency0.83 ± 0.0010.829713locked29 % of the tolerance usedr0009Temperature: at 80 C the slope is R T ln10/F = 70.0725 mV (T = 353.15 K) and E₀ moves linearly, 1.229 - 0.000846 · 55 = 1.18247 V; dS0 = n F dE0/dT = -163.2532 J/mol/K (closed forms; rel 10⁻⁹)passed
nernst_slope_mV70.0725 ± 7 × 10⁻⁸70.0725lockedunder 0.01 % of the tolerance usede_standard_V1.18247 ± 1.2 × 10⁻⁹1.18247lockedunder 0.01 % of the tolerance usedds_standard_J_per_mol_K-163.253 ± 1.6 × 10⁻⁷-163.253lockedunder 0.01 % of the tolerance useddh_standard_kJ_per_mol-285.835 ± 2.9 × 10⁻⁷-285.835lockedunder 0.01 % of the tolerance usedr0010Specific capacity of lithium metal, textbook value 3860 mAh/g: z F/(3.6 M) with M = 6.94 g/mol (IUPAC abridged), z = 1 → 3861.88 mAh/g (closed form; rel 10⁻⁹)passed
specific_capacity_mAh_per_g3861.88 ± 3.9 × 10⁻⁶3861.88lockedunder 0.01 % of the tolerance used
Each line is one reading the kernel checked. The bright band is the tolerance; the needle is the value the instrument actually returned when it was admitted. A needle near the centre line used little of its tolerance.
Inputs
| Name | Unit | Default | Meaning |
|---|---|---|---|
e_cathode_V | V | 0.34 | Standard REDUCTION potential of the half-reaction that is reduced (cathode), against the standard hydrogen electrode, at reference_temperature_C. Default: Cu₂+/Cu. |
e_anode_V | V | -0.76 | Standard REDUCTION potential of the half-reaction that is oxidised (anode), same reference. Default: Zn₂+/Zn. The cell is E₀ = e_cathode_V - e_anode_V; for a concentration cell give both the same value. |
n_electrons | 1 | 2 | Electrons transferred in the balanced cell reaction as written. |
temperature_C | 25 | Cell temperature, degrees Celsius. | |
reference_temperature_C | 25 | Temperature the standard potentials are tabulated at, degrees Celsius. | |
e_temp_coeff_mV_per_K | mV/K | Optional temperature coefficient dE0/dT of the cell. When given, E₀ is moved linearly from the reference temperature and dS0 = n F dE0/dT, dH0 and the thermoneutral voltage are reported. Left out: E₀ is used as given and those readings are null. | |
reaction_quotient | 1 | 1 | Reaction quotient Q (products over reactants) of the cell reaction, greater than 0. Multiplied with the activity lists and the pH term when those are given too. |
product_activities | [] | Activities of the products of the cell reaction (each > 0; pure solids and liquids are 1 and may be left out). | |
product_powers | [] | Stoichiometric power of each product activity; empty means 1 for each. | |
reactant_activities | [] | Activities of the reactants of the cell reaction (each > 0). | |
reactant_powers | [] | Stoichiometric power of each reactant activity; empty means 1 for each. | |
protons | 1 | 0 | Number of H+ on the reactant side of the cell reaction as written (negative when H+ is a product). With ph it adds protons · pH to log10 Q; do not also list H+ among the activities. |
ph | 1 | 0 | pH of the solution the protons come from (0 is the standard state). |
current_A | A | 1 | Electrolysis or discharge current (magnitude). |
time_s | s | 3600 | Duration the current flows. |
molar_mass_g_per_mol | g/mol | 63.546 | Molar mass of the deposited, dissolved or evolved product. Default: copper. |
electrons_per_product | 1 | Electrons per formula unit of that product (z in Faraday's law). Left out: n_electrons. | |
current_efficiency | 1 | 1 | Fraction of the charge that makes the product. |
Readings
| Name | Unit | Meaning |
|---|---|---|
e_standard_V | V | Standard cell voltage at the cell temperature: e_cathode_V - e_anode_V, moved by the temperature coefficient when given. |
e_cell_V | V | Cell voltage E = E₀ - (R T / n F) ln Q. |
e_formal_at_ph_V | V | Cell voltage at the given pH with every other activity at 1. |
nernst_slope_mV | mV | R T ln10 / F: volts per decade of Q for one electron. |
nernst_slope_per_n_mV | mV | R T ln10 / (n F). |
thermal_voltage_mV | mV | R T / F. |
ph_slope_mV_per_pH | mV | Change of the cell voltage per pH unit: -(protons / n) R T ln10 / F. |
log10_q | 1 | |
reaction_quotient | 1 | Q; null when outside what a double holds (read log10_q). |
dg_standard_kJ_per_mol | kJ/mol | -n F E₀. |
dg_kJ_per_mol | kJ/mol | -n F E. |
log10_k | 1 | n F E₀ / (R T ln10). |
ln_k | 1 | |
equilibrium_constant | 1 | K; null when outside what a double holds (read log10_k). |
spontaneous | true when E > 0: the reaction runs as written (galvanic). | |
direction | forward, reverse or equilibrium. | |
ds_standard_J_per_mol_K | J/(mol K) | n F dE0/dT; null without a temperature coefficient. |
dh_standard_kJ_per_mol | kJ/mol | dG0 + T dS0; null without a temperature coefficient. |
thermoneutral_voltage_V | V | -dH0 / (n F); null without a temperature coefficient. |
thermodynamic_efficiency | 1 | dG0 / dH0; null without a temperature coefficient. |
temperature_K | K | |
faraday_C_per_mol | C/mol | e N_A from the exact SI values. |
gas_constant_J_per_mol_K | J/(mol K) | k N_A from the exact SI values. |
charge_C | C | |
charge_Ah | A h | |
electrons_mol | mol | |
product_mol | mol | |
mass_g | g | I t M η / (z F). |
specific_capacity_mAh_per_g | mA h/g | z F / (3.6 M): theoretical capacity of the product. |
reversible_energy_Wh | W h | |E| times the charge passed: the least electrical work to drive, or the most to draw. |
specific_energy_Wh_per_kg | W h/kg | |E| times the specific capacity, per kg of product. |
warnings | Things the reader should know about how the inputs were read. |
Try the call
Change a value and the command updates. Nothing runs here; paste it into your terminal or give it to your agent.