- Check out this repository:
- Make sure you have the following installed:
-
Prepare the input data for calculating orbits:
sed -i '3,17s/# "/"/' data/input/initial.dat
HINT: Execute this and all of the following commands in the root directory of this repository.
-
Integrate the orbits for 5 Gyr backward using both models:
4.1. Prepare the output directories:
mkdir -p data/output/M1 mkdir -p data/output/M2
4.2. Build and run the program
cargo run --release -- --model 1 -n 500000 -h -0.01 -f=x,y,r,z,e -o data/output/M1 data/input/initial.dat cargo run --release -- --model 2 -n 500000 -h -0.01 -f=x,y,r,z,e -o data/output/M2 data/input/initial.dat
-
Generate plots of the orbits in XY and RZ planes, plus total energy variations:
5.1. Instantiate the Julia project:
julia --project=. -e "using Pkg; Pkg.instantiate()"
5.2. Run the script:
julia --project=. scripts/orbits.jl -n 500000 -h -0.01 data/output/M1 julia --project=. scripts/orbits.jl -n 500000 -h -0.01 data/output/M2
or
./julia.bash scripts/orbits.jl -n 500000 -h -0.01 data/output/M1 ./julia.bash scripts/orbits.jl -n 500000 -h -0.01 data/output/M2
The latter will start a Julia daemon in the background. To kill it, run
./julia.bash kill
HINT: See the results in
plots/orbits
. -
Prepare the input data for running simulations:
sed -i '3,17s/^"/# "/' data/input/initial.dat sed -i 's/# "NGC 5927/"NGC 5927/g' data/input/initial.dat sed -i 's/# "Pyxis/"Pyxis/g' data/input/initial.dat
-
Run 200 simulations using the Monte Carlo method for 1 Gyr backward using both models:
cargo run --release -- --model 1 -n 100000 -h -0.01 -s 200 --simulate -f=r,z,x,y,apo,peri -o data/output/M1 data/input/initial.dat cargo run --release -- --model 2 -n 100000 -h -0.01 -s 200 --simulate -f=r,z,x,y,apo,peri -o data/output/M2 data/input/initial.dat
NOTE: This will take some time and quite a bit of disk space.
-
Generate histograms of apocentric and pericentric distances and plots of the simulated orbits:
julia --project=. scripts/simulations.jl -n 100000 -s 200 data/output/M1 julia --project=. scripts/simulations.jl -n 100000 -s 200 data/output/M2
or
./julia.bash scripts/simulations.jl -n 100000 -s 200 data/output/M1 ./julia.bash scripts/simulations.jl -n 100000 -s 200 data/output/M2
The latter will start a Julia daemon in the background. To kill it, run
./julia.bash kill
HINT: See the results in
plots/simulations
. -
Compile the report:
tectonic -X compile report/report.tex
Reference mirrors:
To build this crate's documentation with KaTeX support, run:
cargo doc
RUSTDOCFLAGS="--html-in-header assets/katex-header.html" cargo doc --no-deps --open
This project provides Julia scripts. Make sure to use the project files (Project.toml
) when running them:
julia --project=. -e "using Pkg; Pkg.instantiate()"
julia --project=. scripts/script.jl
Alternatively, you can use the julia.bash
script, which starts a daemon and runs scripts through it:
julia --project=. -e "using Pkg; Pkg.instantiate()"
./julia.bash scripts/script.jl
To kill the daemon run
./julia.bash kill
This project provides Pluto notebooks. You can interact with them in the web interface:
julia --project=. -e "using Pkg; Pkg.instantiate()"
julia --project=.
using Pluto
Pluto.run()
Alternatively, you can run them as scripts:
julia --project=. -e "using Pkg; Pkg.instantiate()"
julia --project=. notebooks/pluto/notebook.jl
This project provides a wxMaxima notebook.