[FLASH-USERS] Continuing to evolve particles that leave the domain

James Guillochon jfg at ucolick.org
Sun Mar 29 11:49:14 EDT 2015


Hi Klaus, Norbert and Anshu,

Indeed I am relying upon "gr_ptKeepLostParticles" being set to true, the
logic in the two routines I modified above check the value of that option.
So that is a bug that should be fixed. Removing that line, and using the
two simple changes I proposed above, seem to lead to a crash, so clearly
the solution is more along the lines of what Anshu and Norbert suggested.

Ideally I'd like a solution that uses the present machinery as much as
possible, because I'd like to continue a rather expensive run that already
used the existing machinery. Also, I'd like to continue using the sinks
routines to apply gravity to the particles, rather than having to reinvent
that code. At the present it looks like the sinks module only loops over
the particles that are not marked as "lost," hence the approach where those
particles are still included within the normal particles array. Since
Christoph wrote the sinks module I've attempted to contact him directly.

In the future it would definitely be nice to have the ability to continue
to evolve particles that leave the domain in the mainline code, there are
many use cases I can think of where it would be valuable.

I'll let you guys know if I come up with a solution. Thanks for all your
help!
- James

On Sat, Mar 28, 2015 at 5:30 PM, Klaus Weide <klaus at flash.uchicago.edu>
wrote:

> 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.
>
> James,
>
> Have you tried to set the keepLostParticles runtime parameter?
>
> I have just noticed an apparent bug in Grid/GridParticles/gr_ptInit.F90.
> That file contains the line
>
>    call RuntimeParameters_get("keepLostParticles",gr_ptKeepLostParticles)
>
> but later on another line
>
>    gr_ptKeepLostParticles=.false.
>
> that makes the runtime parameter ineffective.
>
> Does fixing this help with your problem?
>
> Klaus
>



-- 
James Guillochon
Einstein Fellow at the Harvard-Smithsonian CfA
jguillochon at cfa.harvard.edu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://flash.rochester.edu/pipermail/flash-users/attachments/20150329/a148409f/attachment.htm>


More information about the flash-users mailing list