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
8a57ddb0
Commit
8a57ddb0
authored
8 years ago
by
James Willis
Browse files
Options
Downloads
Patches
Plain Diff
Small updates to README for generating videos from snapshots.
parent
2474a3c2
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!286
Cooling halo updates
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
examples/CoolingHaloWithSpin/README
+19
-1
19 additions, 1 deletion
examples/CoolingHaloWithSpin/README
with
19 additions
and
1 deletion
examples/CoolingHaloWithSpin/README
+
19
−
1
View file @
8a57ddb0
Initial Conditions Generation
-----------------------------
To make the initial conditions we distribute gas particles randomly in
a cube with a side length twice that of the virial radius. The density
profile of the gas is proportional to r^(-2) where r is the distance
...
...
@@ -16,14 +17,31 @@ While the system is initially in hydrostatic equilibrium, the cooling
of the gas and the non-zero angular momentum means that the halo will
collapse into a spinning disc.
Compilation
-----------
To run this example, make such that the code is compiled with either
the isothermal potential or softened isothermal potential, and
'const_lambda' cooling, set in src/const.h. In the latter case, a
(small) value of epsilon needs to be set in cooling.yml. 0.1 kpc
should work well.
Checking Results
----------------
The plotting scripts produce a plot of the density, internal energy
and radial velocity profile for each
snapshot. test_energy_conservation.py shows the evolution of energy
with time. These can be used to check if the example has run properly.
Generating Video
----------------
If you want to generate a video of the simulation, the frequency of
the snaphots needs to be increased. This can be modified in cooling.yml
by changing 'delta_time' to 0.01.
Once you have the snapshots, 'gadgetviewer' can be used to create a
series of snapshot frames. The frames can then be combined together with
'ffmpeg' to produce a video. The following command can be used:
ffmpeg -r 20 -i frame_%05d.image.png -c:v ffv1 -qscale:v 0 movie.avi
to produce the video.
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