[FLASH-USERS] Continuing to evolve particles that leave the domain
Norbert Flocke
flocke at flash.uchicago.edu
Sun Mar 29 08:58:57 EDT 2015
Hi James,
I have dealt with this on two ocasions, when writing the ray tracing and
the proton imaging units. Both units use a different approach that I will
explain (they use the grid particles unit for moving particles through
blocks):
1) Ray tracing
-----------
In this case I needed to keep the rays that exit the domain for some
internal checks (hence no further evolution). I did this by giving
them a particle attribute of RAY_OUTOFDOMAIN, which I set to a large
negative number < -2. Then, before! I entered the grid move particles
routine, I copied these rays to a different array to save them and
then I reset the rays with attribute RAY_OUTOFDOMAIN to rays with
NONEXISTENT.
2) Proton Imaging
--------------
Unlike the ray tracing, in this case I needed to keep track of the
protons after they leave the domain, because they have to be recorded
on a detector screen. I did this by copying the domain exiting protons
to a different array (becoming screen protons), which I then evolve
by a separate routine. Here the protons leaving the domain are simply
set to NONEXISTENT. The possible memory constraints (for large number
of protons) are beeing dealt with by intermediate (small) bucket
arrays that are emptied (recorded on the detector screen) once they
are full.
As you see, as soon as my particles (ray, proton) left the domain, I took
full responsibility of evolution. I did not leave this task to the grid
particles unit.
I hope this helps you a bit,
Norbert
On Fri, 27 Mar 2015, James Guillochon wrote:
> Hi all, I'm using active particles in my calculation, and I would like to
> continue to evolve the particle trajectories even once the particles have
> left the domain. I see that particles that leave the domain can be saved
> after they leave by enabling a flag, but it appears that their evolution at
> this point is frozen. It looks like a few relatively simple changes in
> Particles_advance may be able to continue their evolution, but I wasn't
> sure if evolving these particles would cause issues.
>
> Has anyone tried to do something like this before?
>
> Cheers,
> - James
>
> --
> James Guillochon
> Einstein Fellow at the Harvard-Smithsonian CfA
> jguillochon at cfa.harvard.edu
>
More information about the flash-users
mailing list