Gear metal diffusion
In this merge request, I am implementing the metal diffusion from Shen et al. 2010. We still need to test it in a cosmological context, conservation of mass and find the best coefficient / time step (e.g. work on the ideas from Greif et al. 2009), but this will be for a future PhD student.
Merge request reports
Activity
For reference, this is the result from the updated smoothed metallicity example with the updated original chemistry for GEAR. This example is an homogenous an homogenous box with the metal mass fraction set to according to a gaussian with an average that depends on the position (one metallicity on the left of the box and another one on the right). The smoothed metallicity reduces the dispersion and removes the discontinuity.
In order to test my diffusion, I have slightly modified the problem by setting a velocity along z (1 in the first half and -1 in the second half of the box) in order to avoid a zero shear tensor. As I am not imposing a time step, if the diffusion is too large, the metallicity can reach extremely high values (more than 100% of the mass).
From the following movie, my diffusion is working:
Edited by Loic HausammannSo @mivkov, I still need to update the API for EAGLE and the other modules, but otherwise everything is ready.
I am rebasing the code, it should be done in 10min.
A few key points for your understanding:
- The new files are a copy/paste from GEAR's chemistry, therefore it might be more easy to read with a diff with the original GEAR.
- I have removed the union in the chemistry, it should avoid any confusion.
- Now, if you provide a negative initial metallicity, the code will use the value read from the snapshot.
assigned to @mivkov and unassigned @lhausammann
added 206 commits
Toggle commit listadded 83 commits
-
a17e28d0...cd67d7d2 - 75 commits from branch
master
- e57636a4 - Diffusion implemented + cleaning of gear's chemistry
- dd5ab223 - Cleanup smoothed metallicity example
- 9ff95c41 - Cleanup the code and fix small bugs
- cab621b0 - update parameter value
- 314506d2 - format
- 644c7c97 - Remove unwanted change
- d07d8ba5 - Update API
- c17b40b7 - Add error messages
Toggle commit list-
a17e28d0...cd67d7d2 - 75 commits from branch
- Resolved by Loic Hausammann
- Resolved by Loic Hausammann
- Resolved by Loic Hausammann
- Resolved by Loic Hausammann
- Resolved by Loic Hausammann