Skip to content
Snippets Groups Projects

Adaptive softening for the gas

Merged Matthieu Schaller requested to merge adaptive_softening into master
1 unresolved thread

Implements adaptive softening for the gas when using the Wendland-C2 kernel (i.e. the kernel used in the gravity solver). Equations taken straight from https://ui.adsabs.harvard.edu/abs/2007MNRAS.374.1347P/abstract but with the terms altered for the Wendland kernel.

Changes:

  • Add new config option to activate the adaptive softening (--with-adaptive-softening),
  • The gravity scheme uses the gas'h as epsilon
  • A min and max can be applied via the gravity section of the parameter file.
  • The gravity loops and initial comms are taking place after the hydro ghost.
  • The hydro scheme (SPH only) includes extra momentum terms accounting for the change in softening.
  • the "baryon softening" constants given in the parameter files then only apply to stars and BHs.

Todo:

  • Same for the other hydro schemes.
  • Document the new behaviour in the RTD.
  • Update the unit tests and tools.c

Closes #879 (closed).

Edited by Matthieu Schaller

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
  • Josh Borrow resolved all threads

    resolved all threads

  • Mladen Ivkovic
  • Mladen Ivkovic
  • 102 103
    103 104 /* Drift before you send */
    104 105 scheduler_addunlock(s, ci->grav.super->grav.drift, t_grav);
    106
    107 if (gravity_after_hydro_density)
    108 scheduler_addunlock(s, ci->grav.super->grav.init_out, t_grav);
    • do we not need a dependency on recv_rho as well?

    • I think not. Here is why.

      If two particles interact they both need their softenings computed. That means they both need to have completed thei ghost tasks. If on different nodes then they will complete that locally. That ghost task then updates the gpart's softening. Here, we delay the gpart send to after the ghost. This guarantees that the softening computation is complete before sending the gpart and thus before doing the gravity operations on the foreign node.

    • Please register or sign in to reply
  • added 1 commit

    • b5a59c7f - Fix typo in adaptive_softening_get_acc_term()

    Compare with previous version

  • Matthieu Schaller added 16 commits

    added 16 commits

    Compare with previous version

  • Matthieu Schaller added 7 commits

    added 7 commits

    • 7a09717a - Added the particle-carried fields to all the other SPH schemes
    • 7f43983e - Added the zeta term calculation to the density loop of all the other SPH schemes
    • 9d2cad03 - Add the adaptive softening correction term to the SPH force equation to the other SPH schemes
    • b5e93f7a - Allow compilation with adaptive softening in all SPH schemes
    • d1d49c38 - Update the brute-force checking functions in tools.c
    • b9c23b18 - Update the brute-force checking functions in tools.c
    • ee1da494 - Updated the unit tests to call the new adaptive softening functions

    Compare with previous version

  • Matthieu Schaller marked the checklist item Same for the other hydro schemes. as completed

    marked the checklist item Same for the other hydro schemes. as completed

  • Matthieu Schaller marked the checklist item Update the unit tests and tools.c as completed

    marked the checklist item Update the unit tests and tools.c as completed

  • Thanks for the careful read.

  • Matthieu Schaller added 2 commits

    added 2 commits

    • 2366b815 - More links to relevant sections in the citation page of the docs
    • 9a5d26b8 - Add adaptive softening description to the RTD

    Compare with previous version

  • added 1 commit

    • ab772682 - Prevent the adaptive softening scheme from being used with the basic gravity scheme

    Compare with previous version

  • Matthieu Schaller marked the checklist item Document the new behaviour in the RTD. as completed

    marked the checklist item Document the new behaviour in the RTD. as completed

  • Matthieu Schaller changed the description

    changed the description

  • added 1 commit

    • 222d6333 - Allow runs without gravity to work by not accessing the gpart pointer if it does not exist

    Compare with previous version

  • added 1 commit

    • 75d2ae34 - Allow runs without gravity to work by not accessing the gpart pointer if it does not exist

    Compare with previous version

  • mentioned in commit 43c583a7

  • Please register or sign in to reply
    Loading