===== Serie 09 ===== === Problem 2 === This first exercise is about getting a glimpse of what happens when you stack various potentials on top of each other. Everything is done through the mapping.py script, that is already fully completed (but do not hesitate to have a look at it for a deeper understanding of what you are doing right now !) As usual, the script can be executed through the command line ./mapping.py once the execute permission has been given: chmod +x mapping.py (don't forget to activate the environment we created in the first session either) Some options must be provided: 1) You can choose the type of potentials you want to add by passing the corresponding arguments directly to the command line: harmonic potential: --wx 1 --wy 1 --wz 1 for the frequencies plummer-schuster: --GM_plummer 1 for the total mass of the potential --e 0.1 for the plummer softening parameter miyamoto-nagai: --GM_miyamoto 1 for the total mass --a 2.9 --b 0.1 for the miyamoto parameters 2) You can give your test particle some physical quantities: -E -2 the energy of the particle (relative to the minimum energy of the potential) --x 0.5 the initial position of your particle --vx 0.4 the initial velocity on the x axis of your particle 3) Other options --norbits 10 to let the code run until a given number of orbits --plotpotential to plot the shape of the potential well #### First, try to plot the resulting potential well by stacking various potentials on top of each others. This can be done the following way: ## plummer ./mapping.py --GM_plummer 1 --e 0.3 -E -2 --plotpotential ## harmonic ./mapping.py --wx 1 --wy 1 -E 5 --plotpotential ## plummer + miyamoto ./mapping.py --GM_miyamoto 1. --a 2.97 --b 0.03 --GM_plummer 0.01 --e 0.05 -E -0.1 --plotpotential #### Then, remove the --plotpotential option. If you run the mapping script (e.g. ./mapping.py --GM_plummer 1 --e 0.3 -E -2 --x 0.28), you will see one or two plots. The first one displays the phase space x - vx of your orbit. If your orbit is circular or quasi-circular, the second plot will display the trajectory in the x-y plane. Try various potentials and various initial conditions for your test particle. After a few runs, try to predict the shape of the phase space and orbits once the parameters are chosen, and see if your predictions are close to the plots. Here are some examples you can play with: ############ # plummer ############ ./mapping.py --GM_plummer 1 --e 0.3 -E -2 --plotpotential ./mapping.py --GM_plummer 1 --e 0.3 -E -2 --x 0.28 ./mapping.py --GM_plummer 1 --e 0.3 -E -2 ./mapping.py --GM_plummer 1 --e 0.3 -E -1 --norbits 20 ############ # harmonique ############ ./mapping.py --wx 1 --wy 1 -E 5 --plotpotential ./mapping.py --wx 1 --wy 1 -E 5 ./mapping.py --wx 1 --wy 1 -E 5 --x 1.58114 ./mapping.py --wx 1 --wy 1 -E 5 --x 1.58114 --vx 2. ./mapping.py --wx 1 --wy 0.5 -E 5 --x 1.58114 --vx 2. ./mapping.py --wx 2 --wy 0.5 -E 5 --x 0.5 --vx 1 ############ # harmonique + plummer ############ ./mapping.py --GM_plummer 1 --e 0.3 --wx 1 --wy 0.5 -E 5 --plotpotential ./mapping.py --GM_plummer 1 --e 0.3 --wx 1 --wy 0.5 -E -3 --plotpotential ./mapping.py --GM_plummer 1 --e 0.3 --wx 1 --wy 0.5 -E -3 ./mapping.py --GM_plummer 1 --e 0.3 --wx 1 --wy 0.5 -E 10 ./mapping.py --GM_plummer 1 --e 0.3 --wx 1 --wy 0.5 -E 2 --norbits 20 ./mapping.py --GM_plummer 1 --e 0.3 --wx 1 --wy 0.5 -E 1 --norbits 20 ./mapping.py --GM_plummer 1 --e 0.3 --wx 1 --wy 0.5 -E 0 --norbits 20 ./mapping.py --GM_plummer 1 --e 0.3 --wx 1 --wy 0.5 -E 0 --x 0.25 --vx 1.5 ############ # miyamoto ############ ./mapping.py --GM_miyamoto 1. --a 2.97 --b 0.03 -E -0.3 --x 1. ./mapping.py --GM_miyamoto 1. --a 2.97 --b 0.03 -E -0.3 --x 0.5 ./mapping.py --GM_miyamoto 1. --a 2.97 --b 0.03 -E -0.1 --x 4 ./mapping.py --GM_miyamoto 1. --a 2.97 --b 0.03 -E -0.1 ############ # plummer + miyamoto ############ ./mapping.py --GM_miyamoto 1. --a 2.97 --b 0.03 --GM_plummer 0.01 --e 0.05 -E -0.1 --plotpotential ./mapping.py --GM_miyamoto 1. --a 2.97 --b 0.03 --GM_plummer 0.01 --e 0.05 -E -0.1 ./mapping.py --GM_miyamoto 1. --a 2.97 --b 0.03 --GM_plummer 0.01 --e 0.05 -E -0.4 === Problem 3 === For this problem, once again you can look at the mapping.py script. You can add a logarithmic potential with the following options: logarithmic: --V0 0 --q 0.8 --Rc 0.1 --Omega 0 Obviously, toying with Omega allows you to create a rotating (or non-rotating) logarithmic potential. Play with the parameters and look at the orbits in the phase space.