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
6ea23de7
Commit
6ea23de7
authored
6 years ago
by
Jacob Kegerreis
Browse files
Options
Downloads
Patches
Plain Diff
Tweak the Tillotson EoS
parent
f554eebc
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!739
Non periodic partitioning
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/equation_of_state/planetary/tillotson.h
+18
-10
18 additions, 10 deletions
src/equation_of_state/planetary/tillotson.h
with
18 additions
and
10 deletions
src/equation_of_state/planetary/tillotson.h
+
18
−
10
View file @
6ea23de7
...
...
@@ -41,7 +41,8 @@
// Tillotson parameters
struct
Til_params
{
float
rho_0
,
a
,
b
,
A
,
B
,
u_0
,
u_iv
,
u_cv
,
alpha
,
beta
,
eta_min
,
P_min
;
float
rho_0
,
a
,
b
,
A
,
B
,
u_0
,
u_iv
,
u_cv
,
alpha
,
beta
,
eta_min
,
eta_zero
,
P_min
;
enum
eos_planetary_material_id
mat_id
;
};
...
...
@@ -60,6 +61,7 @@ INLINE static void set_Til_iron(struct Til_params *mat,
mat
->
alpha
=
5
.
0
f
;
mat
->
beta
=
5
.
0
f
;
mat
->
eta_min
=
0
.
0
f
;
mat
->
eta_zero
=
0
.
0
f
;
mat
->
P_min
=
0
.
0
f
;
}
INLINE
static
void
set_Til_granite
(
struct
Til_params
*
mat
,
...
...
@@ -76,6 +78,7 @@ INLINE static void set_Til_granite(struct Til_params *mat,
mat
->
alpha
=
5
.
0
f
;
mat
->
beta
=
5
.
0
f
;
mat
->
eta_min
=
0
.
0
f
;
mat
->
eta_zero
=
0
.
0
f
;
mat
->
P_min
=
0
.
0
f
;
}
INLINE
static
void
set_Til_water
(
struct
Til_params
*
mat
,
...
...
@@ -91,7 +94,8 @@ INLINE static void set_Til_water(struct Til_params *mat,
mat
->
u_cv
=
2.69e9
f
;
mat
->
alpha
=
10
.
0
f
;
mat
->
beta
=
5
.
0
f
;
mat
->
eta_min
=
0
.
9
f
;
mat
->
eta_min
=
0
.
925
f
;
mat
->
eta_zero
=
0
.
875
f
;
mat
->
P_min
=
0
.
0
f
;
}
...
...
@@ -177,11 +181,13 @@ INLINE static float Til_pressure_from_internal_energy(
float
P_c
,
P_e
,
P
;
// Condensed or cold
if
(
eta
<
mat
->
eta_min
)
{
P_c
=
(
mat
->
a
+
mat
->
b
*
w_inv
)
*
density
*
u
+
mat
->
A
*
mu
+
mat
->
B
*
mu
*
mu
;
if
(
eta
<
mat
->
eta_zero
)
{
P_c
=
0
.
f
;
}
else
{
P_c
=
(
mat
->
a
+
mat
->
b
*
w_
in
v
)
*
density
*
u
+
mat
->
A
*
mu
+
mat
->
B
*
mu
*
mu
;
}
else
if
(
et
a
<
mat
->
eta_m
in
)
{
P_c
*=
(
eta
-
mat
->
eta_zero
)
/
(
mat
->
eta_min
-
mat
->
eta_zero
)
;
}
// Expanded and hot
P_e
=
mat
->
a
*
density
*
u
+
...
...
@@ -237,11 +243,13 @@ INLINE static float Til_soundspeed_from_internal_energy(
float
P_c
,
P_e
,
c_sq_c
,
c_sq_e
,
c_sq
;
// Condensed or cold
if
(
eta
<
mat
->
eta_min
)
{
P_c
=
(
mat
->
a
+
mat
->
b
*
w_inv
)
*
density
*
u
+
mat
->
A
*
mu
+
mat
->
B
*
mu
*
mu
;
if
(
eta
<
mat
->
eta_zero
)
{
P_c
=
0
.
f
;
}
else
{
P_c
=
(
mat
->
a
+
mat
->
b
*
w_
in
v
)
*
density
*
u
+
mat
->
A
*
mu
+
mat
->
B
*
mu
*
mu
;
}
else
if
(
et
a
<
mat
->
eta_m
in
)
{
P_c
*=
(
eta
-
mat
->
eta_zero
)
/
(
mat
->
eta_min
-
mat
->
eta_zero
)
;
}
c_sq_c
=
P_c
*
rho_inv
*
(
1
.
f
+
mat
->
a
+
mat
->
b
*
w_inv
)
+
mat
->
b
*
(
w
-
1
.
f
)
*
w_inv_sq
*
(
2
.
f
*
u
-
P_c
*
rho_inv
)
+
...
...
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