A Code to derive the parameters for the global, in-homogeneous and stochastic clumping model and then compute the clumping factor for large low-resolution N-body simulations smoothed on a regular grid. Our code is meant for the CUBEP3M simulation. If you wish to use a different inputs, please contact the developper.
See publication about this work https://arxiv.org/abs/2101.01712.
Our framework is devided into two main codes.
▶ AnalyseSubGridClumping.py:
For a given small high-resolution simulation, it derives the three clumping model parameters. The variables to change are in the same file, they are the following:
- boxSize: is the small box size in cMpc/h.
- redshift: the list of redshift of the small box simulation.
- resLB: the desired resolution (correspond to the large box resolution).
- noc: number of coarsening (suggested to be > 8).
- MaxBin: binning of the stochastic model (set to be 5).
▶ SimulateClumping.py:
For the given density field of a large low-resolution simulation, it computes a clumping factor cube (same mesh-size as input) for the three models. The variables to change are in the same file, they are the following:
- boxSize_LB: is the box size in cMpc/h.
- meshSize_LB: size of the density regular grid.
- LB_path: the directory of the smoothed density.
- output_path: the directory, where to store the computed clumping cubes.
Once the variables are changed the code can be run by simply:
▶ python AnalyseSubGridClumping.py
▶ python SimulateClumping.py
At the moment there are parameters available for a simulation with resolution 1.667 Mpc/h in:
- ./results/AnClumpMic_190829_6.3Mpc_nc1200-so-n-MCPR_NEW2/noc8_bins5