A python code to simulate dilute gas with DSMC (Direct Simulation Monte Carlo). Numba JIT compiler for Python has been implemented for faster performance. User can disable Numba for live graphics mode in the input.ini file.
Rayleigh Problem = gas between 2 plates (Alexander & Garcia, 1997)
- Sayan Adhikari, UiO, Norway. @sayanadhikari
- Rinku Mishra, CPP-IPR, India. @arra4723
Philip Mocz, Princeton Univeristy, @PMoc
More details: http://www.algarcia.org/Pubs/DSMC97.pdf
First make a clone of the master branch using the following command
git clone https://github.com/sayanadhikari/DSMCPy.git
Then enter inside the DSMCPy directory
cd DSMCPy
Now complile and built the DSMCPy code
make all
Upon successful compilation, run the code using following command
make run
Edit the input.ini and run the code again. The basic structure of input.ini is provided below,
;
; @file input.ini
; @brief DSMCPy inputfile.
;
scope = default
[grid]
Ncell = 50 ; number of cells
Nz = 10 ; Length of the box in terms of mean free path
[particles]
n0 = 0.001 ; density
N = 50000 ; number of sampling particles
[boundary]
uw = 0.2 ; lower wall velocity
Tw = 1 ; wall temperature
[time]
Nmft = 20 ; number of mean-free times to run simulation
Nt = 200 ; (25*Nmft) number of time steps (25 per mean-free time)
Nsim = 2 ; number of simulations to run
[options]
plotRealTime = True ;
plotFigure = True
useNumba = True ;set to false to disable Numba