Skip to content

Commit

Permalink
Merge pull request #3 from spzwart/martijns-edits
Browse files Browse the repository at this point in the history
Martijns edits
  • Loading branch information
MJCWilhelm committed Oct 13, 2021
2 parents 4cdf253 + 6e486f4 commit 0e285a4
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 40 deletions.
29 changes: 18 additions & 11 deletions high_order_bridge.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
"====================\n",
"\n",
"Hierarchical coupling strategies are fundamental parts of AMUSE.\n",
"It enables us to combined the output of a wide variety of solvers into a homogeneous solution.\n",
"It enables us to combine the output of a wide variety of solvers into a homogeneous solution.\n",
"In this example we will be nesting multiple bridges, to show the power of bridge.\n",
"\n",
"We realize this by integrating a star that is orbited by a planet, which is orbited by a moon.\n",
"In principle, of course, one can put them all in a single N-body integratory, but here wo use bridge.\n",
"In principle, of course, one can put them all in a single N-body integratory, but here we use bridge.\n",
"\n",
"Let's start by importing the relevant packages."
]
Expand Down Expand Up @@ -229,7 +229,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"run the code in the event loop. Store some data and print some diagnostics."
"Run the code in the event loop. Store some data and print some diagnostics."
]
},
{
Expand Down Expand Up @@ -283,13 +283,13 @@
"The code you have been running can be adapted and improved.\n",
"\n",
"\n",
"Assignmnets and questions:\n",
"Assignments and questions:\n",
"---------------\n",
"\n",
"Huayno is usually 2nd order. But we can at least increase the order of the coupling between the codes in the bridge.\n",
"thi sis done using the methods keyword in the bridge operator.\n",
"This is done using the methods keyword in the bridge operator.\n",
"Integrate the system using the SPLIT_4TH_S_M4 or SPLIT_10TH_SS_M35 method (or one of the other methods). These two are 4th and 10th order integration scheme within the bridge.\n",
"One advantage of a higher-order scheme is that possibility to increase the time step, and still get a pretty good results. The quality of the result is generally indicated with the degree by which energy is conserved, because we consider energy conservation an essential quality of the reliable numerical solution.\n",
"One advantage of a higher-order scheme is the possibility to increase the time step, and still get a pretty good results. The quality of the result is generally indicated with the degree by which energy is conserved, because we consider energy conservation an essential quality of the reliable numerical solution.\n",
"Increasing the order of the integrator then allows us to increase the time step while keeping the error in the energy the same. The integration scheme of the standard bridge is second order. In the above experiment we adopted a time step of 0.001 of the orbital period of the moon. By adopting a higher order bridge coupling we can increase this order.\n",
"\n",
"### Assignment 1:\n",
Expand All @@ -302,7 +302,7 @@
"\n",
"### Assignment 2:\n",
"\n",
"The disk seems to be rather unstable, and te majority of material evaporates within a few orbits.\n",
"The disk seems to be rather unstable, and the majority of material evaporates within a few orbits.\n",
"Adjust the disk in such a way, that it becomes more stable.\n",
"\n",
"### Question 1:\n",
Expand All @@ -325,7 +325,7 @@
"\n",
" * One is by running Huayno in parallel. This is done via openMP, not using MPI as most packages in AMUSE. Time the codes' performance, and then run with openMP. \n",
"\n",
" * Another way to improve Huayno's performance is by calculating the orbital evolution of the test particles using a Kepler solver rather than integrating the orbit. the bridge will take care of the interaction between disk particles and the planet. The name of the solver is CC_KEPLER, indicating that it adopts a connected-component's strategy. \n",
" * Another way to improve Huayno's performance is by calculating the orbital evolution of the test particles using a Kepler solver rather than integrating the orbit. The bridge will take care of the interaction between disk particles and the planet. The name of the solver is CC_KEPLER, indicating that it adopts a connected-components strategy while solving two-particle interactions using Kepler orbits. \n",
" \n",
"You can change the type of integrator in Huayno using:\n",
"gravityB.parameters.inttype_parameter = Huayno.inttypes.CC_KEPLER\n",
Expand All @@ -349,11 +349,11 @@
"\n",
"### Question 5:\n",
"\n",
"What effect does this moon has on the debris disk around the first moon?\n",
"What effect does this moon have on the debris disk around the first moon?\n",
"\n",
"### Assignment 5:\n",
"\n",
"Now the star may actually have an equal-mass companion star. You want to keep the orbit of your planet stable. If this secondary star has a circular orbit in the planet of the planet, at what distance should it orbit to prevent it from perturbing the planet?\n",
"Now the star may actually have an equal-mass companion star. You want to keep the orbit of your planet stable. If this secondary star has a circular orbit in the plane of the planet, at what distance should it orbit to prevent it from perturbing the planet?\n",
"\n",
"### Question 6: \n",
"\n",
Expand All @@ -372,6 +372,13 @@
"Which of the objects, star, planet or which moon, is most frequenly hit by the debris? \n",
"Can you explain this?"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand All @@ -390,7 +397,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.6"
"version": "3.6.9"
}
},
"nbformat": 4,
Expand Down
Loading

0 comments on commit 0e285a4

Please sign in to comment.