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
f1a10555
Commit
f1a10555
authored
6 years ago
by
Folkert Nobels
Browse files
Options
Downloads
Patches
Plain Diff
Add user input variables in the print backend instead of the input variables in internal units
parent
b275d63c
No related branches found
No related tags found
1 merge request
!705
Star formation following Schaye08
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/starformation/schaye08/starformation.h
+16
-13
16 additions, 13 deletions
src/starformation/schaye08/starformation.h
with
16 additions
and
13 deletions
src/starformation/schaye08/starformation.h
+
16
−
13
View file @
f1a10555
...
...
@@ -61,11 +61,11 @@ struct star_formation {
/*! Critical overdensity */
double
min_over_den
;
/*!
Critical temperature
*/
/*!
Temperature threshold
*/
double
Temperature_threshold
;
/*! gas fraction */
double
fgas
;
float
fgas
;
/*! Star formation law slope */
double
SF_power_law
;
...
...
@@ -82,10 +82,13 @@ struct star_formation {
/*! Inverse of RAND_MAX */
double
inv_RAND_MAX
;
/*!
Critical density
to form stars */
/*!
Density threshold
to form stars */
double
density_threshold
;
/*! Maximum critical density to form stars */
/*! Density threshold to form stars in user units */
float
density_threshold_HpCM3
;
/*! Maximum density threshold to form stars */
double
density_threshold_max
;
/*! Scaling metallicity */
...
...
@@ -337,11 +340,9 @@ INLINE static void starformation_init_backend(
starform
->
fgas
=
parser_get_param_double
(
parameter_file
,
"SchayeSF:fg"
);
/* Read the normalization of the KS law in KS law units */
const
double
normalization_MSUNpYRpKPC2
=
parser_get_param_double
(
starform
->
KS_
normalization_MSUNpYRpKPC2
=
parser_get_param_double
(
parameter_file
,
"SchayeSF:SchmidtLawCoeff_MSUNpYRpKPC2"
);
starform
->
KS_normalization_MSUNpYRpKPC2
=
normalization_MSUNpYRpKPC2
;
/* Read the Kennicutt-Schmidt power law exponent */
starform
->
KS_power_law
=
parser_get_param_double
(
parameter_file
,
"SchayeSF:SchmidtLawExponent"
);
...
...
@@ -350,7 +351,7 @@ INLINE static void starformation_init_backend(
starform
->
SF_power_law
=
(
starform
->
KS_power_law
-
1
.
f
)
/
2
.
f
;
/* Give the Kennicutt-Schmidt law the same units as internal units */
starform
->
KS_normalization
=
normalization_MSUNpYRpKPC2
*
KS_const
;
starform
->
KS_normalization
=
starform
->
KS_
normalization_MSUNpYRpKPC2
*
KS_const
;
/* Calculate the starformation prefactor with most terms */
starform
->
SF_normalization
=
...
...
@@ -411,8 +412,10 @@ INLINE static void starformation_init_backend(
* to form stars. */
/* Read the normalization of the metallicity dependent critical
* density*/
starform
->
density_threshold
=
parser_get_param_double
(
parameter_file
,
"SchayeSF:thresh_norm_HpCM3"
)
*
starform
->
density_threshold_HpCM3
=
parser_get_param_double
(
parameter_file
,
"SchayeSF:thresh_norm_HpCM3"
);
starform
->
density_threshold
=
starform
->
density_threshold_HpCM3
*
conversion_numb_density
;
/* Read the scale metallicity Z0 */
...
...
@@ -445,11 +448,11 @@ INLINE static void starformation_print_backend(
message
(
"Star formation law is Schaye and Dalla Vecchia (2008)"
" with properties, normalization = %e, slope of the Kennicutt"
" with properties, normalization = %e
Msun/kpc^2/yr
, slope of the Kennicutt"
"-Schmidt law = %e, gas fraction = %e, critical "
"density = %e and critical temperature = %e"
,
"density = %e
#/cm^3
and critical temperature = %e"
,
starform
->
KS_normalization_MSUNpYRpKPC2
,
starform
->
KS_power_law
,
starform
->
fgas
,
starform
->
density_threshold
,
starform
->
Temperature_threshold
);
starform
->
density_threshold
_HpCM3
,
starform
->
Temperature_threshold
);
message
(
"Density threshold to form stars is given by Schaye "
"(2004), the normalization of the star formation law is given by"
...
...
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