Safe Haskell | None |
---|
Particles, ensembles, flow parameters.
- type Particle = (Point, Vec3)
- move :: Time -> Particle -> Particle
- type Ensemble = Array U DIM1 Particle
- emptyEnsemble :: Ensemble
- ensembleSize :: Ensemble -> Int
- filterEnsemble :: (Particle -> Bool) -> Ensemble -> Ensemble
- printEnsemble :: Ensemble -> IO ()
- data Flow = Flow {
- concentration :: !Double
- temperature :: !Double
- mass :: !Double
- velocity :: !Vec3
- statWeight :: !Double
- modelConcentration :: Flow -> Double
Particles
move :: Time -> Particle -> ParticleSource
Linearly move particle for t time and update its position.
Particle ensembles
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
Flow with given concentration, temperature, mass of molecule and macroscopic velocity.
Flow | |
|
modelConcentration :: Flow -> DoubleSource
Calculate model concentration to simulate real flow concentration wrt statistical weight of single particle as set in flow options.