Re: ICs with ZA+2LPT

From: Scott Wales <wales_at_physics.usyd.edu.au>
Date: Thu, 30 Sep 2010 17:47:28 +1000

Hi Shankar,

You'll probably want to generate the gas particles separately, using the baryon transfer function, so that you get two IC files, one for CDM and one for gas. You can then combine them into one manually.

It looks like 2lpt takes a cmbfast transfer function file, which will probably have a column for each cosmological component (baryon, cdm, neutrino etc.). You should only have to change which column is used in 2lpt's source code. You'll probably get better results if you use the same random generator seed for both cdm and baryon particles.

Combining the cdm and gas files should be fairly straightforward, you'll have to set the correct number of particles and masses in the header, then in each block put the gas particles before the cdm particles. Blocks consist of a size (32 bit unsigned integer), that many bytes and then the size again (check the gadget user's guide). Fill the SPH specific blocks with zeros and you should be good.

You should be able to work out the particle mass from rho, the box size and the particle count, edit the initial conditions file header to correct it.

Cheers,
Scott Wales

On 29/09/2010, at 11:37 PM, Agarwal, Shankar wrote:

> Hi all,
>
> I intend to run large-scale CDM+gas cosmological simulations using Gadget. I have generated the ICs using ZA+2LPT (http://cosmo.nyu.edu/roman/2LPT/).
>
> I found that the way 2LPT is set up, it generated only CDM realization and it sets the gas mass [Massarr(0)] and gas particles [Npart(0)] equal to zero. Also, the mass_per_cdm_particle is not correct (it is correct if Ngas=0).
>
>
> Please let me know if I need to modify 2LPT to include gas. If yes, I have identified the following modifications :
>
> 1. Npart(0)
> 2. Massarr(0)
> 3. temperature field - i can initialize it to zero.
>
>
> I will appreciate any feedback. I have so far been using Enzo1.5 N-body code but have found that it does not resolve low mass halos well.
>
>
> Regards
> Shankar Agarwal
> Cosmology group
> University of Kansas
> USA
>
>
> -----------------------------------------------------------
>
> If you wish to unsubscribe from this mailing, send mail to
> minimalist_at_MPA-Garching.MPG.de with a subject of: unsubscribe gadget-list
> A web-archive of this mailing list is available here:
> http://www.mpa-garching.mpg.de/gadget/gadget-list
Received on 2010-09-30 09:47:35

This archive was generated by hypermail 2.3.0 : 2023-01-10 10:01:31 CET