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
f53803f5
Commit
f53803f5
authored
5 years ago
by
Jacob Kegerreis
Browse files
Options
Downloads
Patches
Plain Diff
Add Tillotson basalt eos
parent
b525c566
No related branches found
No related tags found
2 merge requests
!1109
More EoS
,
!1099
WIP: More eos
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/equation_of_state/planetary/equation_of_state.h
+45
-1
45 additions, 1 deletion
src/equation_of_state/planetary/equation_of_state.h
src/equation_of_state/planetary/tillotson.h
+17
-0
17 additions, 0 deletions
src/equation_of_state/planetary/tillotson.h
with
62 additions
and
1 deletion
src/equation_of_state/planetary/equation_of_state.h
+
45
−
1
View file @
f53803f5
...
...
@@ -80,6 +80,10 @@ enum eos_planetary_material_id {
/*! Tillotson water */
eos_planetary_id_Til_water
=
eos_planetary_type_Til
*
eos_planetary_type_factor
+
2
,
/*! Tillotson basalt */
eos_planetary_id_Til_basalt
=
eos_planetary_type_Til
*
eos_planetary_type_factor
+
3
,
/* Hubbard & MacFarlane (1980) Uranus/Neptune */
...
...
@@ -123,7 +127,7 @@ enum eos_planetary_material_id {
* @brief The parameters of the equation of state.
*/
struct
eos_parameters
{
struct
Til_params
Til_iron
,
Til_granite
,
Til_water
;
struct
Til_params
Til_iron
,
Til_granite
,
Til_water
,
Til_basalt
;
struct
HM80_params
HM80_HHe
,
HM80_ice
,
HM80_rock
;
struct
SESAME_params
SESAME_iron
,
SESAME_basalt
,
SESAME_water
,
SS08_water
;
};
...
...
@@ -164,6 +168,11 @@ gas_internal_energy_from_entropy(float density, float entropy,
&
eos
.
Til_water
);
break
;
case
eos_planetary_id_Til_basalt
:
return
Til_internal_energy_from_entropy
(
density
,
entropy
,
&
eos
.
Til_basalt
);
break
;
default:
error
(
"Unknown material ID! mat_id = %d"
,
mat_id
);
return
0
.
f
;
...
...
@@ -265,6 +274,10 @@ __attribute__((always_inline)) INLINE static float gas_pressure_from_entropy(
return
Til_pressure_from_entropy
(
density
,
entropy
,
&
eos
.
Til_water
);
break
;
case
eos_planetary_id_Til_basalt
:
return
Til_pressure_from_entropy
(
density
,
entropy
,
&
eos
.
Til_basalt
);
break
;
default:
error
(
"Unknown material ID! mat_id = %d"
,
mat_id
);
return
0
.
f
;
...
...
@@ -364,6 +377,10 @@ __attribute__((always_inline)) INLINE static float gas_entropy_from_pressure(
return
Til_entropy_from_pressure
(
density
,
P
,
&
eos
.
Til_water
);
break
;
case
eos_planetary_id_Til_basalt
:
return
Til_entropy_from_pressure
(
density
,
P
,
&
eos
.
Til_basalt
);
break
;
default:
error
(
"Unknown material ID! mat_id = %d"
,
mat_id
);
return
0
.
f
;
...
...
@@ -459,6 +476,10 @@ __attribute__((always_inline)) INLINE static float gas_soundspeed_from_entropy(
return
Til_soundspeed_from_entropy
(
density
,
entropy
,
&
eos
.
Til_water
);
break
;
case
eos_planetary_id_Til_basalt
:
return
Til_soundspeed_from_entropy
(
density
,
entropy
,
&
eos
.
Til_basalt
);
break
;
default:
error
(
"Unknown material ID! mat_id = %d"
,
mat_id
);
return
0
.
f
;
...
...
@@ -557,6 +578,10 @@ gas_entropy_from_internal_energy(float density, float u,
return
Til_entropy_from_internal_energy
(
density
,
u
,
&
eos
.
Til_water
);
break
;
case
eos_planetary_id_Til_basalt
:
return
Til_entropy_from_internal_energy
(
density
,
u
,
&
eos
.
Til_basalt
);
break
;
default:
error
(
"Unknown material ID! mat_id = %d"
,
mat_id
);
return
0
.
f
;
...
...
@@ -657,6 +682,10 @@ gas_pressure_from_internal_energy(float density, float u,
return
Til_pressure_from_internal_energy
(
density
,
u
,
&
eos
.
Til_water
);
break
;
case
eos_planetary_id_Til_basalt
:
return
Til_pressure_from_internal_energy
(
density
,
u
,
&
eos
.
Til_basalt
);
break
;
default:
error
(
"Unknown material ID! mat_id = %d"
,
mat_id
);
return
0
.
f
;
...
...
@@ -760,6 +789,10 @@ gas_internal_energy_from_pressure(float density, float P,
return
Til_internal_energy_from_pressure
(
density
,
P
,
&
eos
.
Til_water
);
break
;
case
eos_planetary_id_Til_basalt
:
return
Til_internal_energy_from_pressure
(
density
,
P
,
&
eos
.
Til_basalt
);
break
;
default:
error
(
"Unknown material ID! mat_id = %d"
,
mat_id
);
return
0
.
f
;
...
...
@@ -861,6 +894,11 @@ gas_soundspeed_from_internal_energy(float density, float u,
&
eos
.
Til_water
);
break
;
case
eos_planetary_id_Til_basalt
:
return
Til_soundspeed_from_internal_energy
(
density
,
u
,
&
eos
.
Til_basalt
);
break
;
default:
error
(
"Unknown material ID! mat_id = %d"
,
mat_id
);
return
0
.
f
;
...
...
@@ -962,6 +1000,10 @@ __attribute__((always_inline)) INLINE static float gas_soundspeed_from_pressure(
return
Til_soundspeed_from_pressure
(
density
,
P
,
&
eos
.
Til_water
);
break
;
case
eos_planetary_id_Til_basalt
:
return
Til_soundspeed_from_pressure
(
density
,
P
,
&
eos
.
Til_basalt
);
break
;
default:
error
(
"Unknown material ID! mat_id = %d"
,
mat_id
);
return
0
.
f
;
...
...
@@ -1051,10 +1093,12 @@ __attribute__((always_inline)) INLINE static void eos_init(
set_Til_iron
(
&
e
->
Til_iron
,
eos_planetary_id_Til_iron
);
set_Til_granite
(
&
e
->
Til_granite
,
eos_planetary_id_Til_granite
);
set_Til_water
(
&
e
->
Til_water
,
eos_planetary_id_Til_water
);
set_Til_basalt
(
&
e
->
Til_basalt
,
eos_planetary_id_Til_basalt
);
convert_units_Til
(
&
e
->
Til_iron
,
us
);
convert_units_Til
(
&
e
->
Til_granite
,
us
);
convert_units_Til
(
&
e
->
Til_water
,
us
);
convert_units_Til
(
&
e
->
Til_basalt
,
us
);
}
// Hubbard & MacFarlane (1980)
...
...
This diff is collapsed.
Click to expand it.
src/equation_of_state/planetary/tillotson.h
+
17
−
0
View file @
f53803f5
...
...
@@ -81,6 +81,23 @@ INLINE static void set_Til_granite(struct Til_params *mat,
mat
->
eta_zero
=
0
.
0
f
;
mat
->
P_min
=
0
.
0
f
;
}
INLINE
static
void
set_Til_basalt
(
struct
Til_params
*
mat
,
enum
eos_planetary_material_id
mat_id
)
{
mat
->
mat_id
=
mat_id
;
mat
->
rho_0
=
2700
.
0
f
;
mat
->
a
=
0
.
5
f
;
mat
->
b
=
1
.
5
f
;
mat
->
A
=
2.67e10
f
;
mat
->
B
=
2.67e10
f
;
mat
->
u_0
=
4.87e8
f
;
mat
->
u_iv
=
4.72e6
f
;
mat
->
u_cv
=
1.82e7
f
;
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
,
enum
eos_planetary_material_id
mat_id
)
{
mat
->
mat_id
=
mat_id
;
...
...
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