Subsections


6.6 Particles


6.6.1 Particles Types

FLASH4 now supports the co-existence of multiple particle types in the same simulation. To facilitate this ability, the particles are now defined in the Config files with PARTICLETYPE keyword, which is also accompanied by an associated initialization and mapping method. The following example shows a Config file with passive particles, and the corresponding generated Flash.h lines  


Config file :


PARTICLETYPE passive INITMETHOD lattice MAPMETHOD quadratic ADVMETHOD rungekutta


REQUIRES Particles/ParticlesMain
REQUESTS Particles/ParticlesMain/passive/RungeKutta
REQUESTS Particles/ParticlesMapping/Quadratic
REQUESTS Particles/ParticlesInitialization/Lattice
REQUESTS IO/IOMain/
REQUESTS IO/IOParticles


Flash.h :


#define PASSIVE_PART_TYPE 1
#define PART_TYPES_BEGIN CONSTANT_ONE
#define NPART_TYPES 1
#define PART_TYPES_END (PART_TYPES_BEGIN + NPART_TYPES - CONSTANT_ONE)



One line desribing the type, initialization, and mapping methods must be provided for each type of particle included in the simulation.


6.6.2 Particles Properties

Particle properties are defined within the particles data structure. The individual properties will be listed in Flash.h if the Particles unit is defined in a simulation. The variables NPART_PROPS, PART_PROPS_BEGIN and PART_PROPS_END indicate the number and location of particle properties indices. For example if a Config file has the following specifications  


PARTICLEPROP dens
PARTICLEPROP pres
PARTICLEPROP velx



then the relevant portion of Flash.h will contain  

#define DENS_PART_PROP 1
#define PRES_PART_PROP 2
#define VELX_PART_PROP 3
...
#define PART_PROPS_BEGIN CONSTANT_ONE
#define NPART_PROPS 3
#define PART_PROPS_END (PART_PROPS_BEGIN + NPART_PROPS - CONSTANT_ONE)