com1DFA.particleTools

Tools for handling particles, splitting, merging and tracking.

Functions

addParticles

add particles

createAssetsRasterFromParticleLocations

create a raster indicating particle trajectories colorcoded with assets classes, highest overrides lower classes

findParticles2Track

Find particles within a circle arround a given point

findUniqueCellIndices

find indices of all cells that are saved for each particle as the particle location was within that cell for the respective time step

getClosestNeighbour

find closest neighbour

getSplitPartPosition

Compute the new particle position due to splitting

getSplitPartPositionSimple

Compute the new particle potion due to splitting

getTangenVectors

Compute the tangent vector to the surface

getTrackedParticles

Track particles along time given the parentID of the particles to track

getTrackedParticlesProperties

Get the desired properties for the tracked particles

initialiseParticlesFromFile

interpolateParticlesTrajectories

interpolate particle trajectories to have more closely spaced values important if affected grid cells should be identified without gaps

mergePartArea

merge small particles

mergeParticleDict

Merge two particles dictionary

placeParticles

Create particles in given cell

readPartFromPickle

Read pickles within a directory and return List of dicionaries read from pickle

removePart

remove given particles

reshapeParticlesDicts

reshape particlesList from one dict per time step with all particle properties for each particle, to one dict with an array of property values for all time steps for each particle shape: nx x ny; nx time steps, ny number of particles

savePartDictToPickle

save a single dict to a pickle

savePartToCsv

Save each particle dictionary from a list to a csv file; works also for one dictionary instead of list

splitPartArea

Split big particles

splitPartMass

Split big particles