A long pipe with chemicals flowing through it. As they travel, A slowly turns into B (the product you want), but if heat lingers, B keeps reacting and becomes C (waste). The pipe is split into ten sections, each with its own thermostat between 300 K and 480 K. Pick the ten temperatures that give you the most B coming out the far end.
The twist: heat speeds up both reactions, but it speeds the over-reaction (B โ C) up more than the good reaction (A โ B). So the textbook answer is a decreasing profile โ start hot to make B quickly, then cool the rest of the pipe so it doesn't keep cooking into C. Classic chem-eng problem; 10-D continuous.
Pick a temperature profile and watch A, B, C evolve along the reactor.
10-D continuous. Most algorithms converge by ~500 profiles.
Each row is the best profile a given algorithm found (more B = better).
| Algorithm | B yield | Profiles | Detail |
|---|---|---|---|
| โ no runs yet โ | |||
Two first-order reactions in series with Arrhenius temperature dependence:
A โ B, kโ(T) = exp[ Bโยท(1 โ T_ref/T) ], Bโ = 6
B โ C, kโ(T) = exp[ Bโยท(1 โ T_ref/T) ], Bโ = 22
The two activation-energy parameters give kโ much sharper temperature dependence than kโ โ a 100 K increase at T_ref = 400 K multiplies kโ by ~5 but kโ by ~80. Inside each axial zone the temperature is constant, so the linear ODE system has a closed-form solution and the integration is numerically stable at any rate.
Score is the mole fraction of B at the reactor outlet, expressed as a percentage. Cold all the way leaves most of the A unreacted; hot all the way burns everything through to C; the best isothermal temperature (~400 K) reaches B โ 37 %. A decreasing T-profile โ hot to convert A early, cooled at the tail to lock in B โ pushes past 42 %.
Real reactor design adds heat transfer, axial dispersion, catalyst deactivation, multi-reaction networks, and constraints on jacket temperature step changes. The structure โ find a T(z) profile that maximises a downstream yield โ is the same.
If your hyper-parameter searches are heating the Earth, drop this in Cursor or Claude:
Read https://raw.githubusercontent.com/microprediction/humpday/main/SKILL.md and create a project skill from it.