Invntr
Source

All instruments

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

Admission replaynernst_cell 0.1.0 · files 275ca1e9e47e…df45
  1. 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 used
    e_cell_V1.1 ± 1e-121.1lockedunder 0.01 % of the tolerance used
    dg_standard_kJ_per_mol-212.268 ± 2.1e-07-212.268lockedunder 0.01 % of the tolerance used
    log10_k37.1877 ± 3.7e-0837.1877lockedunder 0.01 % of the tolerance used
    ln_k85.6278 ± 8.6e-0885.6278lockedunder 0.01 % of the tolerance used
    spontaneous= truetruelockedexact match
  2. r0002Nernst 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 used
    thermal_voltage_mV25.6926 ± 2.6e-0825.6926lockedunder 0.01 % of the tolerance used
    faraday_C_per_mol96485.3 ± 9.6e-0896485.3lockedunder 0.01 % of the tolerance used
    gas_constant_J_per_mol_K8.31446 ± 8.3e-128.31446lockedunder 0.01 % of the tolerance used
    temperature_K298.15 ± 1e-09298.15lockedunder 0.01 % of the tolerance used
  3. r0003Concentration 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 used
    log10_q-1 ± 1e-12-1lockedunder 0.01 % of the tolerance used
    e_cell_V0.0591593 ± 5.9e-110.0591593lockedunder 0.01 % of the tolerance used
    spontaneous= truetruelockedexact match
  4. r0004Hydrogen 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 used
    e_cell_V-0.414115 ± 4.1e-10-0.414115lockedunder 0.01 % of the tolerance used
    e_formal_at_ph_V-0.414115 ± 4.1e-10-0.414115lockedunder 0.01 % of the tolerance used
    log10_q14 ± 1e-1214lockedunder 0.01 % of the tolerance used
    spontaneous= falsefalselockedexact match
  5. r0005Faraday'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 used
    charge_C3600 ± 3.6e-093600lockedunder 0.01 % of the tolerance used
    charge_Ah1 ± 1e-121lockedunder 0.01 % of the tolerance used
    electrons_mol0.0373114 ± 3.7e-110.0373114lockedunder 0.01 % of the tolerance used
    product_mol0.0186557 ± 1.9e-110.0186557lockedunder 0.01 % of the tolerance used
  6. r0006Daniell 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 used
    e_cell_V1.04084 ± 1e-091.04084lockedunder 0.01 % of the tolerance used
    dg_kJ_per_mol-200.852 ± 2e-07-200.852lockedunder 0.01 % of the tolerance used
  7. r0007Oxygen 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 used
    ph_slope_mV_per_pH-59.1593 ± 5.9e-08-59.1593lockedunder 0.01 % of the tolerance used
  8. r0008Hydrogen-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 used
    dh_standard_kJ_per_mol-285.83 ± 0.29-285.835locked1.7 % of the tolerance used
    ds_standard_J_per_mol_K-163.3 ± 0.16-163.253locked29 % of the tolerance used
    thermoneutral_voltage_V1.481 ± 0.00151.48123locked16 % of the tolerance used
    thermodynamic_efficiency0.83 ± 0.0010.829713locked29 % of the tolerance used
  9. r0009Temperature: 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 used
    e_standard_V1.18247 ± 1.2e-091.18247lockedunder 0.01 % of the tolerance used
    ds_standard_J_per_mol_K-163.253 ± 1.6e-07-163.253lockedunder 0.01 % of the tolerance used
    dh_standard_kJ_per_mol-285.835 ± 2.9e-07-285.835lockedunder 0.01 % of the tolerance used
  10. r0010Specific 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
10 of 10 cases passed · sandbox macos-seatbeltrecorded from the kernel in a fresh lab

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

NameUnitDefaultMeaning
e_cathode_VV0.34Standard REDUCTION potential of the half-reaction that is reduced (cathode), against the standard hydrogen electrode, at reference_temperature_C. Default: Cu2+/Cu.
e_anode_VV-0.76Standard 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_electrons12Electrons transferred in the balanced cell reaction as written.
temperature_C25Cell temperature, degrees Celsius.
reference_temperature_C25Temperature the standard potentials are tabulated at, degrees Celsius.
e_temp_coeff_mV_per_KmV/KOptional 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_quotient11Reaction 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.
protons10Number 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.
ph10pH of the solution the protons come from (0 is the standard state).
current_AA1Electrolysis or discharge current (magnitude).
time_ss3600Duration the current flows.
molar_mass_g_per_molg/mol63.546Molar mass of the deposited, dissolved or evolved product. Default: copper.
electrons_per_product1Electrons per formula unit of that product (z in Faraday's law). Left out: n_electrons.
current_efficiency11Fraction of the charge that makes the product.

Readings

NameUnitMeaning
e_standard_VVStandard cell voltage at the cell temperature: e_cathode_V - e_anode_V, moved by the temperature coefficient when given.
e_cell_VVCell voltage E = E0 - (R T / n F) ln Q.
e_formal_at_ph_VVCell voltage at the given pH with every other activity at 1.
nernst_slope_mVmVR T ln10 / F: volts per decade of Q for one electron.
nernst_slope_per_n_mVmVR T ln10 / (n F).
thermal_voltage_mVmVR T / F.
ph_slope_mV_per_pHmVChange of the cell voltage per pH unit: -(protons / n) R T ln10 / F.
log10_q1
reaction_quotient1Q; null when outside what a double holds (read log10_q).
dg_standard_kJ_per_molkJ/mol-n F E0.
dg_kJ_per_molkJ/mol-n F E.
log10_k1n F E0 / (R T ln10).
ln_k1
equilibrium_constant1K; null when outside what a double holds (read log10_k).
spontaneoustrue when E > 0: the reaction runs as written (galvanic).
directionforward, reverse or equilibrium.
ds_standard_J_per_mol_KJ/(mol K)n F dE0/dT; null without a temperature coefficient.
dh_standard_kJ_per_molkJ/moldG0 + T dS0; null without a temperature coefficient.
thermoneutral_voltage_VV-dH0 / (n F); null without a temperature coefficient.
thermodynamic_efficiency1dG0 / dH0; null without a temperature coefficient.
temperature_KK
faraday_C_per_molC/mole N_A from the exact SI values.
gas_constant_J_per_mol_KJ/(mol K)k N_A from the exact SI values.
charge_CC
charge_AhA h
electrons_molmol
product_molmol
mass_ggI t M eta / (z F).
specific_capacity_mAh_per_gmA h/gz F / (3.6 M): theoretical capacity of the product.
reversible_energy_WhW h|E| times the charge passed: the least electrical work to drive, or the most to draw.
specific_energy_Wh_per_kgW h/kg|E| times the specific capacity, per kg of product.
warningsThings 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.

Terminal
MCP call