AI Fuel Cell Calculator

I’ve been exploring the capabilities of LLMs for supporting my technical work. I’ve been meaning to make a utility calculator for fuel cell testing for a number of years, so I’m defining the problem and letting Claude (Opus 4.8) do the physics and coding with me doing a final quality check.

Psychrometrics · humidified gas streams

Humidity ↔ Dew Point

Convert between relative humidity and dew point for a humidified hydrogen or air stream, 25–90 °C and 0–300 kPa(g).

2590 °C
0300 kPa(g)
0100 %
Dew point
40.0°C
at 60.0 °C, 150 kPa(g)
Saturation pressure psat(T)
Water vapour pressure pw
Absolute pressure
Water mole fraction
Molar ratio (mol H₂O / mol dry)
Humidity ratio (mass) H₂

Method & assumptions

Saturation vapour pressure uses the Arden Buck (1996) equation over liquid water, accurate across 0–100 °C. The relative-humidity ↔ dew-point conversion (RH = psat(Tdew) / psat(T)) depends only on temperature and is independent of total pressure.

Total pressure and gas choice set the amount of water: the mole fraction (pw / Pabs) and the mass humidity ratio ((Mw/Mgas) · pw/(Pabs−pw)). Because hydrogen (2.016 g/mol) is ~14× lighter than air (28.96 g/mol), the same dew point carries ~14× more water per unit mass of gas — a key driver of fuel-cell water management.

Ideal-gas behaviour is assumed; the vapour-pressure enhancement factor (~0.3–1% at these pressures) is neglected. Atmospheric pressure taken as 101.325 kPa.