system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: is it necessary to use hydrocarbons as accelerants in compressed goods, like deodorants? Why can't nitrogen be used?
gpt
Light aromatic Hydrocarbons are convenient because they turn into liquids when compressed by moderate amounts (a few bar). The mixture inside the aerosol canister will be part-gas and part-liquid, with the exact composition depending on the temperature and pressure.

When some pressure is released (by spraying the aerosol), some of the liquid will turn to gas, absorbing heat energy from outside the can to do so, until the liquid-gas equilibrium is restored but now with less liquid. The pressure the gas is under will remain approximately the same, so the aerosol sprays almost as powerfully at 25% remaining as when it was full.

Nitrogen only liquifies at much greater pressures and much lower temperatures. An aerosol propelled by gaseous nitrogen would need to be much stronger and heavier making it uneconomical. It would also have a very linear usage curve - when 25% of the nitrogen is used it would only spray 25% as powerfully.

Finally, the things you want to spray from an aerosol (perfumes, glues, hairspray, paint) tend to be organic molecules and therefore hydrocarbons are also the solvent in the aerosol. A nitrogen aerosol would need some mechanism to push the liquid perfume/paint/whatever out while isolating it from the liquid.