TobiBu / ParticleGridMapper.jl

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ParticleGridMapper

Stable Dev Build Status Coverage

ParticleGridMapper.jl interpolates particle data onto either a Cartesian (uniform) grid or an adaptive mesh refinement (AMR) grid where each cell contains no more than one particle. The AMR grid can be trimmed with a user-defined maximum level of refinement. Three differnt interpolation schemes are supported: nearest grid point (NGP), smoothed-particle hydrodynamics (SPH), and Meshless finite mass (MFM). It is multi-threading parallel.

vis_amr

2:1 balance

The AMR grid can be further refined to achieve the so-called "2:1 balance" where the refinement levels of neighboring cells differ by no greater than a factor of two, which leads to a smoothed transition of refinement.

2to1balance_medium

Examples

  • examples/example_cloud.jl demonstrates the usage of five different interpolation schemes: (1) Cartesian mesh with NGP; (2) Cartesian mesh with SPH; (3) NGP on an adaptive mesh; (4) SPH on an adaptive mesh; (5) MFM on an adaptive mesh. It then generates the following plot:

compare_MFM_SPH_NGP_cloud

  • examples/gadget2radmcAMR.jl demonstrates how to generate an adaptive mesh from a Gadget snapshot (format 3) and some axillary files required for radiative transfer calculations for CO rotational line emission using the RADMC-3D code. An illustration of such calculations from Hu et al. 2022:

CO_10_21_maps

Author

Chia-Yu Hu @ Max Planck Institute for Extraterrestrial Physics (cyhu.astro@gmail.com)

About

License:MIT License


Languages

Language:Julia 100.0%