Skip to content

Static and animated distillation phase diagrams for chemistry education

License

Notifications You must be signed in to change notification settings

sametz/phase_diagram

Repository files navigation

A script (phase_diagram.py) or Jupyter notebook (phase_diagram.ipynb) that generates a phase diagram (T vs. mole fraction) for isopropanol/isobutanol.

This is also a demonstration on a) how to simulate phase diagrams for distillations, and b) how to create animated GIFs with matplotlib.

The Clausius-Clapeyron equation is used to simulate the ideal behavior for a two-component mixture of two miscible liquids. If you edit the boiling points and heats of formation, you can simulate data for other mixtures besides isopropanol/isobutanol.

The code will save a .png plot first:

iPrOH_iBuOH_phase_diagram.png

and then an animated version:

distillation_test.gif

The default gif speed is set at 1 frame per 5 s.

About

Static and animated distillation phase diagrams for chemistry education

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published