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
eebc68d7
Commit
eebc68d7
authored
8 years ago
by
Matthieu Schaller
Browse files
Options
Downloads
Patches
Plain Diff
Use same units in ICs and YAML file.
parent
10405012
No related branches found
No related tags found
2 merge requests
!272
Added README files to examples
,
!271
Stats include external potential energy
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
examples/CoolingBox/coolingBox.yml
+2
-2
2 additions, 2 deletions
examples/CoolingBox/coolingBox.yml
examples/CoolingBox/makeIC.py
+2
-2
2 additions, 2 deletions
examples/CoolingBox/makeIC.py
with
4 additions
and
4 deletions
examples/CoolingBox/coolingBox.yml
+
2
−
2
View file @
eebc68d7
# Define the system of units to use internally.
InternalUnitSystem
:
UnitMass_in_cgs
:
2.0e33
# Solar masses
UnitLength_in_cgs
:
3.0
1
e21
# Kilparsecs
UnitLength_in_cgs
:
3.0
857
e21
# Kil
o
parsecs
UnitVelocity_in_cgs
:
1.0e5
# Time unit is cooling time
UnitCurrent_in_cgs
:
1
# Amperes
UnitTemp_in_cgs
:
1
# Kelvin
...
...
@@ -9,7 +9,7 @@ InternalUnitSystem:
# Parameters governing the time integration
TimeIntegration
:
time_begin
:
0.
# The starting time of the simulation (in internal units).
time_end
:
1.
0
# The end time of the simulation (in internal units).
time_end
:
1.
# The end time of the simulation (in internal units).
dt_min
:
1e-6
# The minimal time-step size of the simulation (in internal units).
dt_max
:
1e-2
# The maximal time-step size of the simulation (in internal units).
...
...
This diff is collapsed.
Click to expand it.
examples/CoolingBox/makeIC.py
+
2
−
2
View file @
eebc68d7
...
...
@@ -63,9 +63,9 @@ grp.attrs["PeriodicBoundariesOn"] = periodic
#Units
grp
=
file
.
create_group
(
"
/Units
"
)
grp
.
attrs
[
"
Unit length in cgs (U_L)
"
]
=
3.08e21
grp
.
attrs
[
"
Unit length in cgs (U_L)
"
]
=
3.08
57
e21
grp
.
attrs
[
"
Unit mass in cgs (U_M)
"
]
=
2.0e33
grp
.
attrs
[
"
Unit time in cgs (U_t)
"
]
=
3.08e16
grp
.
attrs
[
"
Unit time in cgs (U_t)
"
]
=
3.08
57
e16
grp
.
attrs
[
"
Unit current in cgs (U_I)
"
]
=
1.
grp
.
attrs
[
"
Unit temperature in cgs (U_T)
"
]
=
1.
...
...
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