How to restrict the max grid level
Folks, We would like to use dark matter density in one of our simulations, however the build-in derived field ('deposit', 'N-BODY_density') is too noisy for our purposes. We can think of two ways to make it smoother: 1) to reduce the max refinement level of the underlying grid or 2) use SPH-like averaging on particles first before depositing them on the grid. Since we are newbies, could someone give us a few hints on how to proceed with one or both of these approaches? Many thanks, Nick Hanjue
Hi Nick and Hanjue, From any given selector object, you can specify the max level data will be drawn from; this should work with particle data in the ARTIO frontend, but because it may not overlap explicitly with the indexing system you should double check. An example: dd = ds.all_data() dd.max_level = 5 That will restrict up to and including level 5 data. On Fri, Feb 1, 2019 at 11:11 AM Nick Gnedin <gnedin@fnal.gov> wrote:
Folks,
We would like to use dark matter density in one of our simulations, however the build-in derived field ('deposit', 'N-BODY_density') is too noisy for our purposes. We can think of two ways to make it smoother: 1) to reduce the max refinement level of the underlying grid or 2) use SPH-like averaging on particles first before depositing them on the grid.
Since we are newbies, could someone give us a few hints on how to proceed with one or both of these approaches?
Many thanks,
Nick Hanjue _______________________________________________ yt-users mailing list -- yt-users@python.org To unsubscribe send an email to yt-users-leave@python.org
I would also suggest looking into the arbitrary_grid data object, which will allow you to create a grid specifically for doing the deposit operation at the level of resolution you desire, decoupling the deposit operation from the AMR grid: Create a 20 kpc^3 grid centered on the center of the simulation, with a resolution of 64^3, and deposit all of the particles onto it: In [8]: grid = ds.arbitrary_grid(ds.domain_center - 10*yt.units.kpc, ds.domain_center + 10*yt.units.kpc, [64, 64, 64]) In [9]: grid['deposit', 'all_density'].shape Out[9]: (64, 64, 64) On Fri, Feb 1, 2019 at 11:13 AM Matthew Turk <matthewturk@gmail.com> wrote:
Hi Nick and Hanjue,
From any given selector object, you can specify the max level data will be drawn from; this should work with particle data in the ARTIO frontend, but because it may not overlap explicitly with the indexing system you should double check.
An example:
dd = ds.all_data() dd.max_level = 5
That will restrict up to and including level 5 data.
On Fri, Feb 1, 2019 at 11:11 AM Nick Gnedin <gnedin@fnal.gov> wrote:
Folks,
We would like to use dark matter density in one of our simulations, however the build-in derived field ('deposit', 'N-BODY_density') is too noisy for our purposes. We can think of two ways to make it smoother: 1) to reduce the max refinement level of the underlying grid or 2) use SPH-like averaging on particles first before depositing them on the grid.
Since we are newbies, could someone give us a few hints on how to proceed with one or both of these approaches?
Many thanks,
Nick Hanjue _______________________________________________ yt-users mailing list -- yt-users@python.org To unsubscribe send an email to yt-users-leave@python.org
_______________________________________________ yt-users mailing list -- yt-users@python.org To unsubscribe send an email to yt-users-leave@python.org
participants (3)
-
Matthew Turk
-
Nathan Goldbaum
-
Nick Gnedin