sametz / phase_diagram

Static and animated distillation phase diagrams for chemistry education

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

License:MIT License


Languages

Language:Jupyter Notebook 99.7%Language:Python 0.3%