Skip to content
Snippets Groups Projects

Equation of state

Merged Matthieu Schaller requested to merge equation_of_state into master

This implements @tt's suggestion (#195 (closed)) to allow for changes in the equation of state of the gas. The transformation between thermodynamic variables are now all located in one single file. Users can supply a different set of transformations if they want to simulate a different kind of gas. The SPH schemes themselves remain unchanged.

This is "simply" a harmless re-factoring of the code gathering common equations into a single file. It passes all the tests but you may want to cross-check things. Thanks! Branch can be removed.

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
  • @tt with this change you should be able to implement the equations for an isothermal gas.

  • Compiling with GCC 4.8.1 and the Default SPH I see:

    In file included from hydro.h:39:0,
                     from drift.h:28,
                     from runner.c:46:
    ./hydro/Default/hydro_iact.h: In function ‘runner_iact_vec_force’:
    ./hydro/Default/hydro_iact.h:471:33: error: variable ‘vj_sig’ set but not used [-Werror=unused-but-set-variable]
       vector ci, cj, v_sig, vi_sig, vj_sig;
                                     ^
    ./hydro/Default/hydro_iact.h:471:25: error: variable ‘vi_sig’ set but not used [-Werror=unused-but-set-variable]
       vector ci, cj, v_sig, vi_sig, vj_sig;
                             ^
    ./hydro/Default/hydro_iact.h: In function ‘runner_iact_nonsym_vec_force’:
    ./hydro/Default/hydro_iact.h:776:33: error: variable ‘vj_sig’ set but not used [-Werror=unused-but-set-variable]
       vector ci, cj, v_sig, vi_sig, vj_sig;
                                     ^
    ./hydro/Default/hydro_iact.h:776:25: error: variable ‘vi_sig’ set but not used [-Werror=unused-but-set-variable]
       vector ci, cj, v_sig, vi_sig, vj_sig;
                             ^
  • Oh that's a relic of the early implementation of the vectorized routines. I have just fixed it.

    Note that the test suite won't pass with default-SPH and vectorization switched on. Proper attention to the rounding of things has not yet be brought to this scheme.

  • Added 1 commit:

    • 58b91ce0 - Removed the read of the signal velocities in the vectorized DEFAULT_SPH routines…
  • Thanks, now looks good to go.

  • Peter W. Draper mentioned in commit eaa7f1b5

    mentioned in commit eaa7f1b5

  • Peter W. Draper Status changed to merged

    Status changed to merged

  • mentioned in issue #195 (closed)

Please register or sign in to reply
Loading