This simulation shows the diffusion of N particles along a 1-dimensional finite lattice, towards the state of equilibrium. The particles are distributed in a sequence of cells arranged along the lattice. In a time-interval of length Dt, each particle can perform just one jump between neighboring cells with a certain transition probability determined in the frame of the Ehrenfest model. The initial state of the system and the number of the cells along the lattice, are selected by the user. In a sequence of time-moments, the program of the simulation calculates the number of particles in every cell. The number of the particles in a cell is depicted by a certain cell-color. The intermediate states of the system between the initial state and the final state of equilibrium are depicted by a varying histogram and a sequence of changing cell-colors.
The theoretical distribution of the particles at the equilibrium state is depicted in the same system of axes. The first objective of the simulation is to compare the data obtained in real-time from the virtual environment, with the theoretical predictions of the model. Furthermore, as a second objective, the user is able to confirm the theoretical proposition that "irrespectively of the form of the initial distribution, the system converges to a certain equilibrium state which is determined by the transition probabilities". In a separate window, the graph of a Lyapunov functional H corresponding to the system, is created in real time. Each time-moment, the value of H is uniquely determined by the corresponding distribution of the particles in the cells of the lattice. In addition, by observing the graph of H over time, the user can estimate the relaxation time of the process towards the equilibrium state.
Ehrenfest Diffusion Source Code
WebEJS source code for the Ehrenfest Diffusion Model on a 1D Lattice model. download 489kb .zip
Last Modified: December 28, 2025
Papamichalis, K. (2026). Ehrenfest Diffusion on a 1D Lattice Model. Retrieved February 8, 2026, from https://www.compadre.org/Repository/document/ServeFile.cfm?ID=17213&DocID=6126
Papamichalis, Kostas. Ehrenfest Diffusion on a 1D Lattice Model. 2026. https://www.compadre.org/Repository/document/ServeFile.cfm?ID=17213&DocID=6126 (accessed 8 February 2026).
@misc{
Author = "Kostas Papamichalis",
Title = {Ehrenfest Diffusion on a 1D Lattice Model},
Volume = {2026},
Number = {8 February 2026},
Year = {2026}
}
%0 Electronic Source %A Papamichalis, Kostas %D 2026 %T Ehrenfest Diffusion on a 1D Lattice Model %V 2026 %N 8 February 2026 %9 text/html %U https://www.compadre.org/Repository/document/ServeFile.cfm?ID=17213&DocID=6126
Disclaimer: ComPADRE offers citation styles as a guide only. We cannot offer interpretations about citations as this is an automated procedure. Please refer to the style manuals in the Citation Source Information area for clarifications.
Use the Easy Java Simulations Modeling and Authoring Tool to edit and to explore the source code for the The Ehrenfest Diffusion Model in a 1-dimensional lattice.