Skip to content
Snippets Groups Projects

Implement star skipping

Closed Loic Hausammann requested to merge gear_skip_inactive_stars into master

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
99 int feedback_will_do_feedback(struct spart* sp,
99 100 const struct feedback_props* feedback_props,
100 101 const int with_cosmology,
101 102 const struct cosmology* cosmo,
103 const struct engine *e,
102 104 const double time) {
103 105
104 return (sp->birth_time != -1.);
106 /* Reset the variable and check if early exit */
107 sp->feedback_data.will_do_feedback = 0;
108 if (sp->birth_time == -1.) {
109 return 0;
110 }
111
112 // TODO check
113 /* Get the times */
  • Can you confirm that I am using the correct times here please? I have some doubts about ti_begin.

    This function is called in the task timestep after the update of the time_bin.

  • Please register or sign in to reply
  • Loic Hausammann added 3 commits

    added 3 commits

    Compare with previous version

  • Loic Hausammann marked as a Work In Progress

    marked as a Work In Progress

  • Loic Hausammann unmarked as a Work In Progress

    unmarked as a Work In Progress

  • assigned to @matthieu and unassigned @lhausammann

  • That's a lot more complicated than I imagined. Let me check it later.

    Have you verified that it does not change the physics?

  • Yes, everything seems fine.

    The problem is that we have 2 different time for the supernovae (Ia and II) and that our model is entirely based on the mass. Therefore the logic is a bit longer than expected but not so complicated.

  • Can you not use a user-defined age above which you downsample?

  • I am not sure to understand what you mean. In the parameter file, you provide the time limits and then you compute a better estimate?

    I do not see the point.

    Edited by Loic Hausammann
  • reopened

  • If age > X then run feedback every N star step. X and N are user provided values.

  • This is a different problem. Here I am actually computing when I can produce a supernovae.

    This is our graph for the supernovae rate. As you can see below 5Myr, between 30Myr-400Myr and after 10-14Gyr (a bit less useful this one), we cannot produce any supernovae: rates.pdf

    Currently, we do not wish to downsample. We are looking at smaller system, therefore (I guess that) the downsampling will impact more our dwarfs as there is not enough stars to have a continuous explosion of supernovae.

  • Ok, so given the plot, there isn't much we can save here anyway since your stars may do something for most of their lifetime (if you plot the x-axis linearly on your plot) and you want this done every (gravity) step potentially.

  • I agree, but it is already a small win as this function is quickly computed in comparison to the density loop. By the way, I can still improve this by skipping the feedback loop. I will quickly push an update (no need to run an additional test, it is really safe).

  • added 1 commit

    • f36edce0 - Turn off feedback when no SN produced

    Compare with previous version

  • Ok it is done.

    When I do not need to explode a supernovae, I am now turning off the feedback in the stellar evolution. This can happen when the time step is sufficiently small and the rate too (I would say that it happens more than 50% of the time in our simulation).

  • By the way, do you need the stellar evolution after the density loop? It might be more efficient to do it in the kick2 in order to know exactly the stars that will explode.

  • yes, because we need the density and mass in the star's kernel.

  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading