Gear pressure floor
@matthieu Can you tell me if you are fine with the implementation? No need to review it deeply, I just want to know if you believe that the changes are acceptable.
The modifications that you may dislike are in hydro/Gadget2/hydro.h
and the function called is in pressure_floor/none/pressure_floor.h
.
Thanks
Merge request reports
Activity
Can you explain the difference between your approach and the entropy floor approach we use? Ultimately it does the same thing. We set the entropy to a minimum and then the pressure gets recomputed and applied to the particles and interactions in exactly the same way as your pressure floor I think.
The key difference is that we do not modify the entropy (or energy), we only add a pressure in order to avoid the collapse of non resolved particles.
If you prefer, I can try to update the
entropy_floor
in order to deal with the pressure floor.The idea is that we do not want to change the properties of the particle (otherwise the cooling will deeply change for low resolution particles). This additional pressure can be seen as the pressure from non resolved turbulence.
For more information, you can look at Revaz and Jablonka 2018, "Self regulated star formation..." by Hopkins et al. 2011.
Ok, I see. You want the additional entropy injection coming from the subgrid turbulence to only act at the level of the hydro solver but not affect the other subgrid models such as cooling and star formation.
However, looking at your implementation, I don't think it will do that. You will need to modify the pressure that enters the
_iact()
otherwise you won't change the behaviour of the hydro solver and the gas will still collapse under gravity. Thehydro_get_XXX
are not used internally by the hydro. They only provide values to the external world, i.e. subgrid.Let me think about what is best in terms of design then.
Ok. I think what you have done makes sense and it likely the best choice.
However, we will have to be very careful not to break things when implementing this in the other schemes. The assumption thus far was that we do not call the
hydro_get_XXX()
from within the other functions. This is because thehydro_get_XXX()
functions may just return quantities that are computed by the other functions (e.g. predict_extra) and that would hence make the whole thing circular.added 1 commit
- 6c300dbb - PressureFloor: do not use hydro_get_pressure in hydro.h
This is the small cosmo volume example, with the grackle cooling, with (green) and without pressure floor (black) at z=0. I am using the Gadget2 SPH.
You can see that the gas is not allowed to reach very high densities with the pressure floor.
I am starting to implement the pressure-* schemes, it should be done before the end of the day.
Edited by Loic HausammannSo I will not do P-A as it is not fully implemented and the P-U is more complicated than expected.
For P-U, in the acceleration, we need the derivative of the pressure with the pressure floor. Therefore it seems that we need a third loop. I will investigate how to deal with it and come back afterward. It may take a while.
I now understand how to implement the pressure floor to any kind of SPH, you simply need to use equation 12 of Hopkins 2013 and replace the pressure in it. Even if the
y
corresponds to the pressure, they are still only a weight and should not be influenced by the pressure floor.I simulated the small cosmo volume with the P-U, but now I have the time step that falls to below
dt_min
(which is not the case with Gadget-2 SPH with pressure floor). This should be my last step (along with the doc) for this merge request.added 2 commits
added 81 commits
-
cdb73b75...ff6e9d07 - 68 commits from branch
master
- 5954c9c9 - Add pressure floor
- 54f605c0 - pressure floor: start implementing GEAR's one
- 978197ec - PressureFloor: implemented in SPH-Gadget
- 107e018d - PressureFloor: add none model
- 7f258cdd - PressureFloor: add src/pressure_floor.h
- 552f9ed2 - PressureFloor: add missing pressure floors
- 857997b1 - PressureFloor: do not use hydro_get_pressure in hydro.h
- cf270a45 - PressureFloor: Implement P-U
- 6040669f - PressureFloor: remove unwanted changes
- 3810de01 - PressureFloor: add doc in GEAR
- cba02cb8 - fix spelling mistake
- 90b575f4 - Change description parameters Njeans
- b7385332 - Update parameter description and add const
Toggle commit list-
cdb73b75...ff6e9d07 - 68 commits from branch