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: Cu2+/Cu +0.34 V, Zn2+/Zn -0.76 V, n=2, 25 C -> E0 = 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 1e-9)passed
e_standard_V1.1 ± 1e-121.1lockedunder 0.01 % of the tolerance usede_cell_V1.1 ± 1e-121.1lockedunder 0.01 % of the tolerance useddg_standard_kJ_per_mol-212.268 ± 2.1e-07-212.268lockedunder 0.01 % of the tolerance usedlog10_k37.1877 ± 3.7e-0837.1877lockedunder 0.01 % of the tolerance usedln_k85.6278 ± 8.6e-0885.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 1e-9)passed
nernst_slope_mV59.1593 ± 5.9e-0859.1593lockedunder 0.01 % of the tolerance usedthermal_voltage_mV25.6926 ± 2.6e-0825.6926lockedunder 0.01 % of the tolerance usedfaraday_C_per_mol96485.3 ± 9.6e-0896485.3lockedunder 0.01 % of the tolerance usedgas_constant_J_per_mol_K8.31446 ± 8.3e-128.31446lockedunder 0.01 % of the tolerance usedtemperature_K298.15 ± 1e-09298.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 -> E0 = 0, E = (RT ln10/F) log10(10) = 59.16 mV (closed form; rel 1e-9)passed
e_standard_V0 ± 1e-120lockedunder 0.01 % of the tolerance usedlog10_q-1 ± 1e-12-1lockedunder 0.01 % of the tolerance usede_cell_V0.0591593 ± 5.9e-110.0591593lockedunder 0.01 % of the tolerance usedspontaneous= truetruelockedexact matchr0004Hydrogen electrode against SHE, spec known answer: 2H+ + 2e- -> H2 moves -59.16 mV per pH unit; at pH 7 E = -7 RT ln10/F = -0.4141 V (closed form; rel 1e-9)passed
ph_slope_mV_per_pH-59.1593 ± 5.9e-08-59.1593lockedunder 0.01 % of the tolerance usede_cell_V-0.414115 ± 4.1e-10-0.414115lockedunder 0.01 % of the tolerance usede_formal_at_ph_V-0.414115 ± 4.1e-10-0.414115lockedunder 0.01 % of the tolerance usedlog10_q14 ± 1e-1214lockedunder 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 1e-9)passed
mass_g1.18549 ± 1.2e-091.18549lockedunder 0.01 % of the tolerance usedcharge_C3600 ± 3.6e-093600lockedunder 0.01 % of the tolerance usedcharge_Ah1 ± 1e-121lockedunder 0.01 % of the tolerance usedelectrons_mol0.0373114 ± 3.7e-110.0373114lockedunder 0.01 % of the tolerance usedproduct_mol0.0186557 ± 1.9e-110.0186557lockedunder 0.01 % of the tolerance usedr0006Daniell cell off standard, textbook exercise: a(Cu2+) = 0.01, a(Zn2+) = 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 1e-9)passed
log10_q2 ± 1e-122lockedunder 0.01 % of the tolerance usede_cell_V1.04084 ± 1e-091.04084lockedunder 0.01 % of the tolerance useddg_kJ_per_mol-200.852 ± 2e-07-200.852lockedunder 0.01 % of the tolerance usedr0007Oxygen electrode at pH 7, textbook value E0' = +0.815 V: O2 + 4H+ + 4e- -> 2H2O, E0 = 1.229 V, protons = 4, n = 4 -> 1.229 - 7 * 0.059159 = 0.81488 V, slope -59.16 mV/pH (closed form; rel 1e-9)passed
e_cell_V0.814885 ± 8.1e-100.814885lockedunder 0.01 % of the tolerance usedph_slope_mV_per_pH-59.1593 ± 5.9e-08-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 E0 = 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 E0 moves linearly, 1.229 - 0.000846 * 55 = 1.18247 V; dS0 = n F dE0/dT = -163.2532 J/mol/K (closed forms; rel 1e-9)passed
nernst_slope_mV70.0725 ± 7e-0870.0725lockedunder 0.01 % of the tolerance usede_standard_V1.18247 ± 1.2e-091.18247lockedunder 0.01 % of the tolerance usedds_standard_J_per_mol_K-163.253 ± 1.6e-07-163.253lockedunder 0.01 % of the tolerance useddh_standard_kJ_per_mol-285.835 ± 2.9e-07-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 1e-9)passed
specific_capacity_mAh_per_g3861.88 ± 3.9e-063861.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: Cu2+/Cu. |
e_anode_V | V | -0.76 | Standard REDUCTION potential of the half-reaction that is oxidised (anode), same reference. Default: Zn2+/Zn. The cell is E0 = 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, E0 is moved linearly from the reference temperature and dS0 = n F dE0/dT, dH0 and the thermoneutral voltage are reported. Left out: E0 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 = E0 - (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 E0. |
dg_kJ_per_mol | kJ/mol | -n F E. |
log10_k | 1 | n F E0 / (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 eta / (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.