Equation of State for the Lennard-Jones Model

  • Wikipedia page for the Lennard-Jones potential provides a good overview of the potential and its behavior.
  • NIST page for Lennard-Jones fluid properties tabulates thermodynamic data (both raw simulation data and coexistence) for the Lennard-Jones fluid so that other simulations (using the same parameters) can be checked against it.
  • NIST Chemistry Webbook provides thermodynamic properties and coexistence properties for real chemicals from equations of state.

The equations of state and analysis scripts on this site are written in Python. The site uses Brython, which translates Python 3 code to JavaScript so it can run in the browser and also provides the standard Python libraries. Accordingly, all of the scripting is done in the browser rather than the server — the server need only deliver static files.

Libraries using native code (like NumPy) are unavailable, but the site only needs scalar math, so this is not an issue. However, expensive computations (like constructing a full coexistence curve) had to be broken up into small pieces of work (a function to find a single coexistence point) and use a Brython event loop to call the coexistence function repeatedly, returning control to the browser after each call. Computing the third virial coefficient (B3) on the fly is particularly intensive and too slow via Brython (10-20 seconds). Accordingly, the site uses a WebAssembly version of B3 written in C and built with emscripten.

Please report bugs, errors, suggestions to Andrew Schultz at ajs42@buffalo.edu.

Etomica home