"""Lab to Code — Why a catalytic converter does nothing for the first minute: the light-off curve.

Model (illustrative parameters): CO oxidation as a first-order reaction in a plug-flow monolith,
conversion X = 1 - exp(-k * tau), with Arrhenius k = A * exp(-Ea / (R * T)).
Ea = 100 kJ/mol and A = 3.4e11 1/s are chosen so that 50 % conversion ("light-off") lands near 250 C,
inside the typical range for real converters (a few hundred C). tau = 0.02 s is the gas residence time.
"""
from math import exp

R, EA, A, TAU = 8.314, 100e3, 3.4e11, 0.02

for t_c in (150, 200, 250, 300, 400):
    k = A * exp(-EA / (R * (t_c + 273.15)))
    x = 1 - exp(-k * TAU)
    print(f"{t_c:3} C: k = {k:9.2f} 1/s, CO converted {x:6.1%}")
