Gravitational Boundedness with Gas and Particles
Hi all, I'd like to use the yt clump finder to identify gravitationally bound clumps. However, my FLASH simulation includes both gas (on the mesh) and massive particles. I would like to use both of these gravitational sources in the determination of boundedness, but it's not clear to me that the current implementation of gravitational_binding_energy() in yt/utilities/lib/misc_utilities.pyx does this. I suspect that it would be relatively straightforward to add the ('deposit', 'io_mass') field to the gravitational_binding_energy() function, but I'm not entirely sure how to access this field in a safe manner in Cython. Has anyone already solved this problem? Thanks, Jason ----- Jason Galyardt University of Georgia
Hi Jason, If you take a look at the validator in the clump finder that is using the cython `gravitational_binding_energy` function, you'll see that there is already an option to use particles in the gravitational binding energy calculation. See the `_gravitationally_bound` function in `yt/analysis_modules/level_sets/clump_validators.py`. When you create your master clump, all you need to do is set `use_particles=True` when you add the `gravitationally_bound` validator to the master clump. In fact, the example in the yt docs does this: http://yt-project.org/docs/dev/analyzing/analysis_modules/clump_finding.html... Hope that helps, let us know if you need any additional advice. -Nathan On Thu, Nov 17, 2016 at 1:50 PM, Jason Galyardt <jason.galyardt@gmail.com> wrote:
Hi all,
I'd like to use the yt clump finder to identify gravitationally bound clumps. However, my FLASH simulation includes both gas (on the mesh) and massive particles. I would like to use both of these gravitational sources in the determination of boundedness, but it's not clear to me that the current implementation of gravitational_binding_energy() in yt/utilities/lib/misc_utilities.pyx does this. I suspect that it would be relatively straightforward to add the ('deposit', 'io_mass') field to the gravitational_binding_energy() function, but I'm not entirely sure how to access this field in a safe manner in Cython.
Has anyone already solved this problem?
Thanks, Jason
----- Jason Galyardt University of Georgia
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
participants (2)
-
Jason Galyardt
-
Nathan Goldbaum