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
fc6457c3
Commit
fc6457c3
authored
6 years ago
by
Folkert Nobels
Browse files
Options
Downloads
Patches
Plain Diff
Change SchayeSF -> EAGLEStarFormation
parent
0a2ea36f
No related branches found
No related tags found
1 merge request
!705
Star formation following Schaye08
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
examples/IsolatedGalaxy_starformation/isolated_galaxy.yml
+1
-1
1 addition, 1 deletion
examples/IsolatedGalaxy_starformation/isolated_galaxy.yml
src/star_formation/EAGLE/star_formation.h
+12
-12
12 additions, 12 deletions
src/star_formation/EAGLE/star_formation.h
with
13 additions
and
13 deletions
examples/IsolatedGalaxy_starformation/isolated_galaxy.yml
+
1
−
1
View file @
fc6457c3
...
@@ -83,7 +83,7 @@ HernquistPotential:
...
@@ -83,7 +83,7 @@ HernquistPotential:
epsilon
:
0.01
# Softening size (internal units)
epsilon
:
0.01
# Softening size (internal units)
# Schaye and Dalla Vecchia 2008 star formation
# Schaye and Dalla Vecchia 2008 star formation
SchayeSF
:
EAGLEStarFormation
:
thresh_MinOverDens
:
57.7
# The critical density contrast to form stars
thresh_MinOverDens
:
57.7
# The critical density contrast to form stars
thresh_temp
:
1e5
# The critical temperature to form stars
thresh_temp
:
1e5
# The critical temperature to form stars
fg
:
0.3
# The mass fraction in gas
fg
:
0.3
# The mass fraction in gas
...
...
This diff is collapsed.
Click to expand it.
src/star_formation/EAGLE/star_formation.h
+
12
−
12
View file @
fc6457c3
...
@@ -378,23 +378,23 @@ INLINE static void starformation_init_backend(
...
@@ -378,23 +378,23 @@ INLINE static void starformation_init_backend(
/* Read the critical density contrast from the parameter file*/
/* Read the critical density contrast from the parameter file*/
starform
->
min_over_den
=
starform
->
min_over_den
=
parser_get_param_double
(
parameter_file
,
"
SchayeSF
:thresh_MinOverDens"
);
parser_get_param_double
(
parameter_file
,
"
EAGLEStarFormation
:thresh_MinOverDens"
);
/* Read the critical temperature from the parameter file */
/* Read the critical temperature from the parameter file */
starform
->
temperature_margin_threshold_dex
=
starform
->
temperature_margin_threshold_dex
=
parser_get_param_double
(
parameter_file
,
parser_get_param_double
(
parameter_file
,
"
SchayeSF
:temperature_margin_threshold_dex"
);
"
EAGLEStarFormation
:temperature_margin_threshold_dex"
);
/* Read the gas fraction from the file */
/* Read the gas fraction from the file */
starform
->
fgas
=
parser_get_param_double
(
parameter_file
,
"
SchayeSF
:fg"
);
starform
->
fgas
=
parser_get_param_double
(
parameter_file
,
"
EAGLEStarFormation
:fg"
);
/* Read the normalization of the KS law in KS law units */
/* Read the normalization of the KS law in KS law units */
starform
->
KS_normalization_MSUNpYRpKPC2
=
parser_get_param_double
(
starform
->
KS_normalization_MSUNpYRpKPC2
=
parser_get_param_double
(
parameter_file
,
"
SchayeSF
:SchmidtLawCoeff_MSUNpYRpKPC2"
);
parameter_file
,
"
EAGLEStarFormation
:SchmidtLawCoeff_MSUNpYRpKPC2"
);
/* Read the Kennicutt-Schmidt power law exponent */
/* Read the Kennicutt-Schmidt power law exponent */
starform
->
KS_power_law
=
starform
->
KS_power_law
=
parser_get_param_double
(
parameter_file
,
"
SchayeSF
:SchmidtLawExponent"
);
parser_get_param_double
(
parameter_file
,
"
EAGLEStarFormation
:SchmidtLawExponent"
);
/* Calculate the power law of the star formation */
/* Calculate the power law of the star formation */
starform
->
SF_power_law
=
(
starform
->
KS_power_law
-
1
.
f
)
/
2
.
f
;
starform
->
SF_power_law
=
(
starform
->
KS_power_law
-
1
.
f
)
/
2
.
f
;
...
@@ -410,11 +410,11 @@ INLINE static void starformation_init_backend(
...
@@ -410,11 +410,11 @@ INLINE static void starformation_init_backend(
/* Read the high density Kennicutt-Schmidt power law exponent */
/* Read the high density Kennicutt-Schmidt power law exponent */
starform
->
KS_high_den_power_law
=
parser_get_param_double
(
starform
->
KS_high_den_power_law
=
parser_get_param_double
(
parameter_file
,
"
SchayeSF
:SchmidtLawHighDensExponent"
);
parameter_file
,
"
EAGLEStarFormation
:SchmidtLawHighDensExponent"
);
/* Read the high density criteria for the KS law in number density per cm^3 */
/* Read the high density criteria for the KS law in number density per cm^3 */
starform
->
KS_high_den_thresh_HpCM3
=
parser_get_param_double
(
starform
->
KS_high_den_thresh_HpCM3
=
parser_get_param_double
(
parameter_file
,
"
SchayeSF
:SchmidtLawHighDens_thresh_HpCM3"
);
parameter_file
,
"
EAGLEStarFormation
:SchmidtLawHighDens_thresh_HpCM3"
);
/* Transform the KS high density criteria to simulation units */
/* Transform the KS high density criteria to simulation units */
starform
->
KS_high_den_thresh
=
starform
->
KS_high_den_thresh
=
...
@@ -469,21 +469,21 @@ INLINE static void starformation_init_backend(
...
@@ -469,21 +469,21 @@ INLINE static void starformation_init_backend(
/* Read the normalization of the metallicity dependent critical
/* Read the normalization of the metallicity dependent critical
* density*/
* density*/
starform
->
density_threshold_HpCM3
=
starform
->
density_threshold_HpCM3
=
parser_get_param_double
(
parameter_file
,
"
SchayeSF
:thresh_norm_HpCM3"
);
parser_get_param_double
(
parameter_file
,
"
EAGLEStarFormation
:thresh_norm_HpCM3"
);
starform
->
density_threshold
=
starform
->
density_threshold
=
starform
->
density_threshold_HpCM3
*
conversion_numb_density
;
starform
->
density_threshold_HpCM3
*
conversion_numb_density
;
/* Read the scale metallicity Z0 */
/* Read the scale metallicity Z0 */
starform
->
Z0
=
parser_get_param_double
(
parameter_file
,
"
SchayeSF
:MetDep_Z0"
);
starform
->
Z0
=
parser_get_param_double
(
parameter_file
,
"
EAGLEStarFormation
:MetDep_Z0"
);
/* Read the power law of the critical density scaling */
/* Read the power law of the critical density scaling */
starform
->
n_Z0
=
starform
->
n_Z0
=
parser_get_param_double
(
parameter_file
,
"
SchayeSF
:MetDep_SFthresh_Slope"
);
parser_get_param_double
(
parameter_file
,
"
EAGLEStarFormation
:MetDep_SFthresh_Slope"
);
/* Read the maximum allowed density for star formation */
/* Read the maximum allowed density for star formation */
starform
->
density_threshold_max_HpCM3
=
starform
->
density_threshold_max_HpCM3
=
parser_get_param_double
(
parameter_file
,
"
SchayeSF
:thresh_max_norm_HpCM3"
);
parser_get_param_double
(
parameter_file
,
"
EAGLEStarFormation
:thresh_max_norm_HpCM3"
);
starform
->
density_threshold_max
=
starform
->
density_threshold_max
=
starform
->
density_threshold_max_HpCM3
*
conversion_numb_density
;
starform
->
density_threshold_max_HpCM3
*
conversion_numb_density
;
...
@@ -495,7 +495,7 @@ INLINE static void starformation_init_backend(
...
@@ -495,7 +495,7 @@ INLINE static void starformation_init_backend(
/* Get the maximum physical density */
/* Get the maximum physical density */
starform
->
max_gas_density_HpCM3
=
parser_get_opt_param_double
(
parameter_file
,
starform
->
max_gas_density_HpCM3
=
parser_get_opt_param_double
(
parameter_file
,
"
SchayeSF
:max_gas_density_HpCM3"
,
FLT_MAX
);
"
EAGLEStarFormation
:max_gas_density_HpCM3"
,
FLT_MAX
);
/* Calculate the maximum physical density in internal units */
/* Calculate the maximum physical density in internal units */
starform
->
max_gas_density
=
starform
->
max_gas_density_HpCM3
*
conversion_numb_density
;
starform
->
max_gas_density
=
starform
->
max_gas_density_HpCM3
*
conversion_numb_density
;
...
...
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