dsmc-0.1.0.1: DSMC library for rarefied gas dynamics

Safe HaskellNone

DSMC.Particles

Contents

Description

Particles, ensembles, flow parameters.

Synopsis

Particles

type Particle = (Point, Vec3)Source

Gas particle with position and velocity.

move :: Time -> Particle -> ParticleSource

Linearly move particle for t time and update its position.

Particle ensembles

type Ensemble = Array U DIM1 ParticleSource

Repa array of particles.

emptyEnsemble :: EnsembleSource

Ensemble with zero particles in it.

ensembleSize :: Ensemble -> IntSource

Amount of particles in an ensemble.

filterEnsemble :: (Particle -> Bool) -> Ensemble -> EnsembleSource

Filter out those particles which do not satisfy the predicate.

printEnsemble :: Ensemble -> IO ()Source

Print particles, one per row, using the format:

 x y z u v w

where x y z are position coordinates and u v w are velocity components. This is handy for debugging purposes.

Flows

data Flow Source

Flow with given concentration, temperature, mass of molecule and macroscopic velocity.

Constructors

Flow 

Fields

concentration :: !Double
 
temperature :: !Double
 
mass :: !Double
 
velocity :: !Vec3
 
statWeight :: !Double

How many real particles a single simulator represents.

Instances

modelConcentration :: Flow -> DoubleSource

Calculate model concentration to simulate real flow concentration wrt statistical weight of single particle as set in flow options.