damonge / CoLoRe

CoLoRe - Cosmological Lofty Realizations
GNU General Public License v3.0
17 stars 13 forks source link

Update velocities to 2LPT #42

Open fjaviersanchez opened 4 years ago

fjaviersanchez commented 4 years ago

Currently the code uses linear velocities. @andreufont suggested that for Ly-alpha, taking into account 2LPT contributions to velocities might be important (not so much to the QSOs themselves as per @damonge). This can be a cool addition for the future.

cramirezpe commented 1 year ago

We are trying to include 2LPT velocities in CoLoRe right now. But we are unsure about how to implement it.

The relevant equations here are (from https://arxiv.org/abs/astro-ph/0112551): image image This means that the same potentials used for computing the displacement are the same that we should use to modify velocities. However, we are unsure on how to proceed, since LPT displacement fields and velocities are computed in different places of the code:

So, putting it simple:

With the previous approach I am not including velocities not in the radial direction, there is a recent pull request including transverse velocities. If we want to also compute this, memory requirements will be x3(?).

I can start implementing it if this sounds ok, and will only need help reviewing it before merging.

andreufont commented 1 year ago

@damonge , @fjaviersanchez - any thought about the plan above? Should we have a call at some point? We could also invite Marc Manera and Santi Avila, who will join the project at IFAE.

fjaviersanchez commented 1 year ago

I think the plan sounds good. Just a couple of things that I think can be useful and may help with the memory usage: 1) You can set an option to allow the user run with the Gaussian velocities, so that way, even if you select LPT or 2LPT you don't need additional memory. 2) You don't need to stick to the original grid to store the radial velocity in memory, you can probably do it in a different grid size (I guess that it may slow down the code though). A call sounds good to me :).

cramirezpe commented 1 year ago

Thank you Javi for the comments. We could arrange a call for the first week of October (Santi will already be at IFAE by then). I will send an email so we can find a time that works for everyone.