A hot exoplanet's deep atmosphere follows a dry adiabat, isothermal above the ~1 bar photosphere:
T(P) = Teq · P^(R/cp) for P ≥ 1 bar
T(P) = Teq for P < 1 bar (P in bar)
Each condensable species (mineral, metal or salt vapor) has a saturation vapor-pressure curve. Approximated in Clausius–Clapeyron form with a condensation temperature T₀ measured at 1 bar for solar abundance:
Tcond(P) = T0 · Z^k · P^(1/n)
where n sets the curve's steepness (linked to the species' latent heat) and Z is the metallicity multiplier (higher metal/salt abundance raises the partial pressure, so saturation — and the cloud deck — is reached at a higher temperature).
A cloud deck forms at the pressure level Pc where the atmosphere's actual temperature drops to the condensation temperature: T(Pc) = Tcond(Pc). The simulator finds this crossing numerically for every species each time a slider changes. Species with T0 above the local T(1 bar) condense deep (high pressure, low altitude — refractory clouds like iron and silicates on a hot Jupiter); species with low T0 (like water) only condense much higher up, where it is cold enough.
Altitude is converted from pressure using the barometric scale height H = kBTeq/(μg), with μ ≈ 2.3 u for a hydrogen–helium envelope — a stronger surface gravity g compresses the atmosphere into a thinner shell, so clouds at the same pressure sit at a lower physical altitude.
This is the real mechanism (Fortney 2005; Morley et al. 2012) behind the layered "condensation sequence" of iron, silicate, sulfide and salt clouds inferred from the transmission spectra of hot Jupiters and brown dwarfs — the deepest, hottest clouds are refractory minerals; only cool enough worlds ever reach a water-cloud deck.