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
6e5189be
Commit
6e5189be
authored
6 years ago
by
Matthieu Schaller
Browse files
Options
Downloads
Patches
Plain Diff
Added the primoridal abundance of Helium to the list of physical constants.
parent
8e65bed1
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/physical_constants.c
+5
-0
5 additions, 0 deletions
src/physical_constants.c
src/physical_constants.h
+3
-0
3 additions, 0 deletions
src/physical_constants.h
src/physical_constants_cgs.h
+3
-0
3 additions, 0 deletions
src/physical_constants_cgs.h
with
11 additions
and
0 deletions
src/physical_constants.c
+
5
−
0
View file @
6e5189be
...
@@ -126,6 +126,11 @@ void phys_const_init(const struct unit_system *us, struct swift_params *params,
...
@@ -126,6 +126,11 @@ void phys_const_init(const struct unit_system *us, struct swift_params *params,
internal_const
->
const_T_CMB_0
=
internal_const
->
const_T_CMB_0
=
const_T_CMB_0_cgs
/
const_T_CMB_0_cgs
/
units_general_cgs_conversion_factor
(
us
,
dimension_temperature
);
units_general_cgs_conversion_factor
(
us
,
dimension_temperature
);
const
float
dimension_Yp
[
5
]
=
{
0
,
0
,
0
,
0
,
0
};
/* [ - ] */
internal_const
->
const_primordial_He_fraction
=
const_primordial_He_fraction_cgs
/
units_general_cgs_conversion_factor
(
us
,
dimension_Yp
);
}
}
/**
/**
...
...
This diff is collapsed.
Click to expand it.
src/physical_constants.h
+
3
−
0
View file @
6e5189be
...
@@ -93,6 +93,9 @@ struct phys_const {
...
@@ -93,6 +93,9 @@ struct phys_const {
/*! Temperature of the CMB at present day */
/*! Temperature of the CMB at present day */
double
const_T_CMB_0
;
double
const_T_CMB_0
;
/*! Primordial Helium fraction */
double
const_primordial_He_fraction
;
};
};
void
phys_const_init
(
const
struct
unit_system
*
us
,
struct
swift_params
*
params
,
void
phys_const_init
(
const
struct
unit_system
*
us
,
struct
swift_params
*
params
,
...
...
This diff is collapsed.
Click to expand it.
src/physical_constants_cgs.h
+
3
−
0
View file @
6e5189be
...
@@ -95,4 +95,7 @@ const double const_earth_mass_cgs = 5.9724e27;
...
@@ -95,4 +95,7 @@ const double const_earth_mass_cgs = 5.9724e27;
/*! Temperature of the CMB at present day [K] */
/*! Temperature of the CMB at present day [K] */
const
double
const_T_CMB_0_cgs
=
2
.
7255
;
const
double
const_T_CMB_0_cgs
=
2
.
7255
;
/*! Primordial Helium fraction */
const
double
const_primordial_He_fraction_cgs
=
0
.
245
;
#endif
/* SWIFT_PHYSICAL_CONSTANTS_CGS_H */
#endif
/* SWIFT_PHYSICAL_CONSTANTS_CGS_H */
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