I was a graduate student instructor for Ch220B, the second semester of graduate statistical mechanics. The course had a significant computational angle so I wrote several Monte Carlo and molecular dynamics programs for solutions. Code is available upon request. Here are some snippets...
I was a graduate student instructor for Ch120B, an undergraduate course on statistical mechanics and thermodynamics. To help explain reversible work while introducing modern work fluctuation theorems I wrote an extra credit problem set and some accompanying web applets to simulate pulling on a polymer. They run fastest with Google Chrome but also work well with Safari.
- Gaussian Chain Simulation:
A Gaussian chain is simulated with over-damped dynamics at fixed temperature. While the ends of the polymer are pulled apart at a constant pulling rate the applet monitors the force on the endpoint and the total work. These are compared to the analytic solution for an equilibrated Gaussian polymer. At slow pulling rates the work will follow the reversible work. At faster pulling rates the system is driven out of equilibrium, allowing for the occasional observation of negative work.
- Work Distribution Function Simulation:
To introduce the Crooks Fluctuation Theorem (CFT), the polymer is pulled with a time-reversible cyclic protocol. The statistics of the work distribution function are collected and histogramed, allowing a direct verification of the CFT. An exponential average of the work is also computed.
- Jarzynski Equality Simulation:
To demonstrate the Jarzynski equality, the polymer is pulled in a noncyclic way such that there is a nonzero free energy difference between initial and final states. When sufficient statistics are collected this free energy difference can be estimated from the exponential average of the work.
If you're itching for a bigger challenge you can take a look at this extra problem. Professor Chandler deemed it unnecessarily hard. I claim it's within reach. You can be the judge.