| Safe Haskell | None |
|---|
DSMC.Domain
Contents
Description
Domain operations: defining domains; free flow boundary conditions & clipping for DSMC steps.
PRNG required to sample molecular velocities implies monadic interface
for most of operations. We use functions specifically typed for ST.
- data Domain = Domain !Double !Double !Double !Double !Double !Double
- getDimensions :: Domain -> (Double, Double, Double)
- getCenter :: Domain -> Point
- makeDomain :: Point -> Double -> Double -> Double -> Domain
- initializeParticles :: Domain -> Flow -> Body -> Seed -> (Ensemble, Seed)
- openBoundaryInjection :: DomainSeeds -> Domain -> Double -> Flow -> Ensemble -> (Ensemble, DomainSeeds)
- type DomainSeeds = (Seed, Seed, Seed, Seed, Seed, Seed)
- clipToDomain :: Domain -> Ensemble -> Ensemble
- freeVolume :: Domain -> Body -> Int -> GenST s -> ST s Double
- freeVolumes :: Body -> Int -> GenST s -> Vector Domain -> ST s (Vector Double)
Documentation
Domain in which particles are spawned or system evolution is simulated.
getDimensions :: Domain -> (Double, Double, Double)Source
Calculate width, length and height of a domain, which are dimensions measured by x, y and z axes, respectively.
Arguments
| :: Point | Center point. |
| -> Double | X dimension. |
| -> Double | Y dimension. |
| -> Double | Z dimension. |
| -> Domain |
Create a rectangular domain with center in the given point and dimensions.
Flow boundary
initializeParticles :: Domain -> Flow -> Body -> Seed -> (Ensemble, Seed)Source
Fill the domain with particles for given flow parameters. Particles inside the body are removed.
Arguments
| :: DomainSeeds | |
| -> Domain | Simulation domain. |
| -> Double | Interface domain extrusion length. |
| -> Flow | |
| -> Ensemble | |
| -> (Ensemble, DomainSeeds) |
Sample new particles in 6 interface domains along each side of rectangular simulation domain and add them to existing ensemble.
This function implements open boundary condition for three-dimensional simulation domain.
Interface domains are built on faces of simulation domain using extrusion along the outward normal of the face.
In 2D projection:
+-----------------+
| Interface1 |
+--+-----------------+--+
|I3| Simulation |I4|
| | domain | |
+--+-----------------+--+
| I2 |
+-----------------+
Particles in every interface domain are spawned in parallel using Strategies.
type DomainSeeds = (Seed, Seed, Seed, Seed, Seed, Seed)Source
PRNG seeds used by particle generators.
clipToDomain :: Domain -> Ensemble -> EnsembleSource
Filter out particles which are outside of the domain.