Plotting Gas Laws


Visualizing Perfect and Real Gas Laws in Python
Visualizing gas laws is a simple "first" coding assignment, but can yield large learning gains by giving students the ability to "play" with conditions and coefficients and build intuition. The prompts (PDF format, below) walk students through building simple scripts to display isotherms based on the Perfect gas Law and the van der Waals Gas Law. It is assumed that students has already completed a python tutorial (such as Python for Chemists). The assignments are implemented in trinket. They can be easily adapted for a Jupyter Notebook format and edited to encompass integration to determine expansion work.
​
If you are an instructor and would like access to the finished code, please email me from an institutional account.
trinkets
Below are perfect and van der Waals gas law plots (visualizations only) as produced during this assignment.
Perfect Gas Law
van der Waals Gas Law
(carbon dioxide)