(Not Only Colliding Spheres)
Exact 2D gas dynamics framework.
List of authors | |
---|---|
Author | M. Monti |
Contributor | C.E. Montanari |
Contributor | N. Curti |
Build Status |
---|
Linux : |
Windows : in development |
NOCS is a C++ 2D event-based engine for simulating molecules composed of hard spheres of arbitrary mass and dimension.
It's meant to be used for simulating statistical mechanics scenarios in the fastest and most precise way possible, by computing analytically every collision between molecules and by integrating the motion of the molecules only when strictly necessary.
- C. E., Montanari (2017) Development of an event-based simulator for analysing excluded volume effects in a Brownian gas. [Bachelor thesis], Università di Bologna, Corso di Studio in Fisica (L-DM270) http://amslaurea.unibo.it/view/cds/CDS8007/
- A., Cerfogli (2018) Entropic forces and dynamical properties of a rigid body Boltzmann gas. [Master thesis], Università di Bologna, Corso di Studio in Fisica (LM-DM270) http://amslaurea.unibo.it/view/cds/CDS8025/
- A. Bazzani, S. Vitali, C. E. Montanari, M. Monti e G. Castellani. (2019) Stochastic properties of colliding particles in a non-equilibrium thermal bath. (Abstract) https://sites.google.com/view/lfo12-13aprile2019/
In order to properly compile the project, it's necessary to have cmake
and a compiler that supports adequately the C++14 standard.
If you wish to have also the graphical support within your simulation executable, you will need a valid implementation of freeglut3
and a proper OpenGL
development environment. On Linux it's sufficient to have installed the freeglut3-dev
package:
sudo apt install freeglut3-dev
After you have written your code in src/main.cpp
, you can execute the compilation and obtain the executable. To do so, follow these steps:
-
Create a
bin
folder; -
Open a terminal in the
bin
folder; -
Execute the following command if you wish to NOT have graphical support (i.e. every graphical method called in
src/main.cpp
will NOT be included in the compilation):cmake ..
If instead you wish to have graphical support:
cmake .. -DGRAPHICS=on
Also you can of course set the build type with
-DCMAKE_BUILD_TYPE
and either work withDebug
orRelease
. -
Execute the compilation with the
make
command. -
You will now have your executable
main
in thebin
folder. -
You will also find an executable for every source file available in the
examples
folder
You can explore the general source code documentation by using the index page.
A general tutorial on the tools and the features of NOCS is provided here.