Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SWIFT
SWIFTsim
Commits
a25a7023
Commit
a25a7023
authored
Sep 23, 2016
by
Bert Vandenbroucke
Browse files
Pressure is now also updated by hydro_set_internal_energy and hydro_set_entropy.
parent
c10ad9db
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/hydro/Gizmo/hydro.h
View file @
a25a7023
...
...
@@ -524,6 +524,7 @@ __attribute__((always_inline)) INLINE static void hydro_set_internal_energy(
/* conserved.energy is NOT the specific energy (u), but the total thermal
energy (u*m) */
p
->
conserved
.
energy
=
u
*
p
->
conserved
.
mass
;
p
->
primitives
.
P
=
hydro_gamma_minus_one
*
p
->
primitives
.
rho
*
u
;
}
/**
...
...
@@ -540,4 +541,5 @@ __attribute__((always_inline)) INLINE static void hydro_set_entropy(
p
->
conserved
.
energy
=
gas_internal_energy_from_entropy
(
p
->
primitives
.
rho
,
S
)
*
p
->
conserved
.
mass
;
p
->
primitives
.
P
=
gas_pressure_from_entropy
(
p
->
primitives
.
rho
,
S
);
}
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment