Gear merge pressure floor and GEAR star formation
Here I am moving around some piece of the code in order to clean up a bit my work.
I am mostly removing the iact part of the star formation in order to put it inside the pressure floor.
Matthieu, I will assign this merge request to you once it is finished (should be done before tomorrow).
Merge request reports
Activity
Should I add the pressure floor structure to all the hydro scheme even if I am throwing a compilation error with them?
Edited by Loic HausammannI am also adding
sigma2
to the pressure evaluation in the pressure floor.Edited by Loic Hausammannadded 1 commit
- 9d070fac - GEAR: copy n_jeans from pressure floor to star formation
@matthieu you can review it now. It should be long, there is nothing complicated in it.
assigned to @matthieu
I am doing three things (two small details and a large one) in it:
- Moving the computation of sigma2 from the star formation to the pressure (this one is responsible of most of the changes)
- Adding the sigma2 term in the pressure floor (equation 1 in Revaz and Jablonka 2018)
- Removing the pressure floor from the
hydro_get_*_pressure
in Gadget (lack of consistency with P-U).
As no scheme is using the star formation IACT, I removed it and therefore the merge request contains a lot of file.
128 129 /** 130 * @brief Finishes the density calculation. 131 * 132 * @param p The particle to act upon 133 * @param cosmo The current cosmological model. 134 */ 135 __attribute__((always_inline)) INLINE static void pressure_floor_end_density( 136 struct part* restrict p, const struct cosmology* cosmo) { 137 138 /* To finish the turbulence estimation we devide by the density */ 139 p->pressure_floor_data.sigma2 /= 140 pow_dimension(p->h) * hydro_get_physical_density(p, cosmo); 141 142 /* Add the cosmological factor */ 143 p->pressure_floor_data.sigma2 *= cosmo->a * cosmo->a; Sigma2 is in physical units after this operation.
The complete computation is
\sigma_i^2 = \frac{1}{\rho_i} \sum_j m_j W_{ij} v_{ij, phys}^2wherev_{ij,phys}^2 = (a H x_{ij, com} + av_{ij, com})^2I agree with you, I am missing the cross product
2 H x_{ij} v_{ij}and the square to H.Good catch!
changed this line in version 4 of the diff
- Resolved by Matthieu Schaller
- Resolved by Loic Hausammann
added 2 commits
- Resolved by Loic Hausammann