SIMOLANT 09/2024

Contents

Quick popular start

Molecules attract each other when they are close together (the "atom disks" almost touch). If the molecules are even closer, they begin to repel (the disks overlap). If the atoms are far away, they (almost) do not feel each other.

Installation

Get the respective zip-file (simolant-win32.zip for Windows or simolant-amd64.zip for 64-bit linux) and unzip it to a folder. Run simolant.exe or simolant from this folder (this is necessary for the online help).

On other platforms, download simolant-sources.zip and follow the instructions in readme.txt. You need FLTK V1.3 or higher (not V2 fork) and gcc/g++.

Aims of SIMOLANT

Elementary and high school

A number of phenomena are shown using a two-dimensional molecular model of matter:

Universities

Basic concepts of statistical thermodynamics and molecular simulations can be elucidated:

Molecular model

Interaction potential

The interaction potential is a function of interparticle distance r:

    u(r) = 4/r^8 − 4/r^4

Term 4/r^8 is positive and therefore repulsive. The term −4/r^4 is negative and therefore attractive; it has a longer range than the repulsive term. The minimum of the potential is −1 at r=2^(1/4)=1.189 (line marked as rmin in the graph of RDF).

This is a two-dimensional analogue of the well-known Lennard-Jones potential. We do not use any real units – the units are defined by the above formula (and the Boltzmann constant k=1).

The potential is truncated and smoothed. The truncated potential equals the original one for r<C, otherwise

    u(r) = A(r² − cutoff²)²   for r ∈ (C,cutoff),
    u(r) = 0   for r > C,

where constants A and C (C<cutoff) are determined so that both the potential and forces are continuous (the derivate of forces has jumps). No cutoff corrections are added. The default cutoff=4.

For cutoff<L/2, the nearest-image algorithm is used, otherwise a sum over all periodic images is calculated.

The critical point is approximately T=0.85, P=0.06, ρ=0.3 for cutoff=4.

There are two types of walls, attractive and repulsive. The attractive wall is built of the same particles, but imagine them ground to tiny pieces and smoothly distributed on one side of the wall with number density ρ=N/L²=0.75 (can be changed by option -Pwall=VALUE). The particle–wall potential is thus

    uwall(d) = πρ (5/24 d^6−1/d^2)

The repulsive wall is similar, only the attractive (negative) term is omitted. The wall potentials are not truncated. The walls are active in the respective boundary conditions, the sigh can be change in panel Walls.

How realistic is this all?

The two-dimensional model used by SIMOLANT is easier to show and simulate than a realistic three-dimensional model of, e.g., water. Nevertheless, basic concepts shown are qualitatively the same as in three dimensions. The only notable exception is a possibly different nature of the freezing transition. If water freezes, a nucleus of ice appears and then it grows – there is an interface between both phases. This is similar to vapor condensation in both 2D and 3D. However, when some 2D systems are cooled, there is no interface between frozen and liquid phases (Costerlitz-Thouless continuum transition). Instead, hexagonally ordered areas grow anywhere in the system. At the freezing point the size of these areas diverges to infinity, i.e., (in equilibrium) we obtain a single crystal structure spanning the whole system. Other 2D systems freeze as in 3D (i.e., via the first order phase transition), but the nucleation phenomena are not so apparent; this is likely the case of 2D hard disks. The type of freezing of our 2D system is not known.

The model is more appropriate for 2D systems as surfactants floating on a surface of water. Such molecules form 2D gas, 2D liquid, and hexagonally ordered 2D solids (and even more...). The surface pressure can be easily demonstrated in a kitchen by throwing a few matches to a bowl of water and touching the surface by a piece of soap.

The potential decreases to zero more slowly than London forces in 3D; therefore, gas at moderate densities is less ideal than in 3D – the compressibility factor Z deviates from 1, especially al low temperatures.

Menus

File

Prepare system

The simulation start, methods, and parameters of simulation, and quantities to observe are prepared for you to observe phenomena.

Method

Here the simulation method (MC/MD), ensemble (NVE, NVT, NPT) and thermostat/barostat flavors are selected.

Boundary conditions

Show

Select quantities to measure and show and a graph to draw. If button [▯ record] is pressed, the averages of the selected quantities and graphs (if selected in widget include:) are recorded.

Tinker

Technical setup affecting performance.

Help

Right Panel

Symbols

Top line in the right panel shows the number of particles and the MC|MD/ensemble/method. Symbol MC→MD means that MC is running to remove overlaps and will be switched to MD.
Symbol in brackets [MC|MD/ensemble/method] denotes that a switch to MC and back is possible in case of problems.

Variables

N Number of particles.
T Thermostat or method temperature.
τ Thermostat correlation (coupling) time (MD only).
L Box size (as derived from density).
ρ Number density, ρ = N/Area (see below for the definition of the Area).
wall Number density of walls.
g Acceleration of gravity.
d Radius of the trial displacement (MC only), in the units of Lh=L/2.
dV Maximal trial relative volume change in MC NPT.
P Pressure (parameter of a NPT simulation)
stride stride MD steps or MC sweeps is performed between drawing the configuration and measuring quantities.
block Number of measurements in one block (by stride MC sweeps or MD steps).
Tkin Kinetic temperature (averaged in blocks, MD only).
Tbag Creutz demon bag temperature (averaged, MC only).
dt Integration time step (MD only); "dt⇒" denotes that dt has been determined automatically from T and τ.
acc.r. Acceptance ratio (ratio of accepted moves to all attempted moved, MC only).
acc.r/(V) Acceptance ratio of volume change in NPT simulations
Pvir Pressure (averaged configurational pressure based on the virial theorem incl. the kinetic term).
V Volume (in NPT)
Pid Pressure calculated from the ideal gas equation of state, Pid = ρ kT (here, k=1).
Z Compressiility factor, Z=P/Pid.
Pxx Diagonal xx-component of the pressure tensor (similarly Pyy).
P(top_wall) Pressure calculated from averaged force on the top wall (similarly other walls).
γ Surface tension (applies to the slab geometry).
Etot Total (potential + kinetic) energy of the whole simulation box.
Epot Potential energy of the whole simulation box.
H Enthalpy.

Sliders panel

Sliders can be moved by a mouse or (when the mouse pointer is over) finely by arrows.

Walls

Clicking the respective buttons will toggle repulsive (red) and attractive (green) walls. Button [invert] swaps repulsive ↔ attractie walls.

Expert

Some more advanced functions.

Switches

Simulation speed and measurement blocking

Command line options

FILE.sim

An argument without leading hyphen is considered as a sim-file and loaded.

FLTK options are recognized. Note a space between the option and its (optional) value. Useful ones:

-g WxH+X+Ygeometry (W,H=window width and height, X,Y = position). Do not use less than -g 958x683
-title "WINDOW TITLE"change window title
-icostart iconized
-notooltipsdo not show tooltips (help text appearing over buttons and sliders)

SIMOLANT options are UPPERCASE. The following number/value is without space! No check is done whether the values given are in a reasonable range!

-Cmethodthe circle drawing method: 0=fl_pie, 1=fl_circle, 2=composed of fl_line (default)
-Dstepsdebug mode (timing and technical info printed to stderr every MD or MC steps), disabled in Windows (recompile with -mconsole instead of -mwindows)
-FFPSframes per second of movies (if possible), default=60
-Iinit(init=number) initial system (Gas=0, Diffusion=1, etc.)
-NNinitial number of particles (legacy, also -PN=)
-Pcomma-separated assignmentsCommands (assignments) as in the "Expert" mode, comma-separated. Executed after initialization (-I, -N)
Example: -Pwall=1,th=1
-Sspeedinitial value of the simulation speed slider [default=3.5], affects the timer and (for speed>=1) the number of the skipped frames. Normal range = [-5,11.5]
-Tfactorthe timeout of the time is least factor times the simulation cycle duration [default=0.5]
-Udelayadditional delay in s, do not use [default=1e-5]

Known bugs and caveats

Copying and Credits

This application is © Jiří Kolafa. It is available under the GNU General Public License Version 3

The sources of SIMOLANT can be found on GitHub.

History

Supported by

Acknowledgements