[FLASH-USERS] Particle counts and "seeing" particles.

Klaus Weide klaus at flash.uchicago.edu
Fri Nov 21 17:00:05 EST 2014


On Fri, 21 Nov 2014, Joshua Wall wrote:

> Users,
> 
>    I'm currently making sink particles by calling pt_sinkCreateParticle
> while Flash is running to input sinks on the fly during a simulation.
> However I've noticed that this doesn't appear to update the "global" number
> of particles in the simulation, and I'm having trouble tracking down what I
> need to call to do this (and to assure myself I haven't missed anything
> else during sink creation). Are the two particle types completely separate,
> or should I be calling other subroutines to ensure everything is properly
> synced up somewhere in the background?
> 
>   I should note the sinks appear properly, as I can see them in the HDF5
> and in plots in yt (thanks to John help). But Flash reports the number of
> global particles is zero during a run after I add them.

I believe the following describes the behavior of sink particles,
but I may be mising some details.

Sink particles are maintained by the Particles unit (code under 
ParticlesMain/active/Sink/) in their own  data structure, separate from 
the general FLASH "particles" array.  Updating of the latter from the 
former happens only "when needed", which mean it happens as part if I/O,
right before the FLASH particles are written to a particle or checkpoint 
file; this way, the files will countain an up to date state of the sink
particles.

See the 

    call Particles_sinkSyncWithParticles(sink_to_part=.true.)

in IO_writeParticles.F90.

I assume that you could add calls to Particles_sinkSyncWithParticles in
other places if, for some reason, you want the FLASH particles to
contain  an accurate and up to date copy of the sink particle information.

Klaus



More information about the flash-users mailing list