Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
SWIFTsim
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SWIFT
SWIFTsim
Commits
2e08ae0c
Commit
2e08ae0c
authored
5 years ago
by
Matthieu Schaller
Browse files
Options
Downloads
Plain Diff
Merge branch 'fix-cosmology-monaghan-av' into 'master'
Clarified cosmology dependence in morris av. Closes
#568
Closes
#568
See merge request
!897
parents
fa8aea3e
c874afb0
No related branches found
No related tags found
1 merge request
!897
Clarified cosmology dependence in morris av. Closes #568
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/hydro/PressureEnergyMorrisMonaghanAV/hydro.h
+6
-6
6 additions, 6 deletions
src/hydro/PressureEnergyMorrisMonaghanAV/hydro.h
with
6 additions
and
6 deletions
src/hydro/PressureEnergyMorrisMonaghanAV/hydro.h
+
6
−
6
View file @
2e08ae0c
...
...
@@ -640,14 +640,14 @@ __attribute__((always_inline)) INLINE static void hydro_prepare_force(
/* Artificial viscosity updates */
/* TODO: Actually work out why this cosmology factor is correct
* and update the SPH / cosmology theory documents. */
/* We perform all of this in physical space. */
const
float
h_inv_physical
=
cosmo
->
a_inv
*
h_inv
;
const
float
soundspeed_physical
=
cosmo
->
a_factor_sound_speed
*
soundspeed
;
/* We divide by a^2 here to make this transform under cosmology the
* same as the velocity (which in SWIFT has an extra 1/a^2 factor.
* See the cosmology theory documents for more information. */
/* Decay rate */
const
float
inverse_tau
=
(
hydro_props
->
viscosity
.
length
*
cosmo
->
a2_inv
)
*
soundspeed
*
h_inv
;
hydro_props
->
viscosity
.
length
*
soundspeed_physical
*
h_inv_physical
;
/* Source term (div v) is already in physical co-ordinates for this scheme */
const
float
source_term
=
-
1
.
f
*
min
(
p
->
density
.
div_v
,
0
.
f
);
/* Compute da/dt */
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment