Skip to content

sayanadhikari/DSMCPy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DSMCPy (Direct Simulation Monte Carlo With Python)

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.

Problem

Rayleigh Problem = gas between 2 plates (Alexander & Garcia, 1997)

Contributors

Source

Philip Mocz, Princeton Univeristy, @PMoc

More details: http://www.algarcia.org/Pubs/DSMC97.pdf

Installation

Prerequisites

  1. make buildsystem
  2. python3 or higher
  3. git

Procedure

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

Usage

Upon successful compilation, run the code using following command

make run

Parameter Setup

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

About

Direct Simulation Monte Carlo With Python

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published