Skip to content

Commit e67fae0

Browse files
committed
A number of didactic updates
1 parent 7637870 commit e67fae0

11 files changed

Lines changed: 2894 additions & 114 deletions

Nemesis_and_the_Sun.ipynb

Lines changed: 76 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
},
1919
{
2020
"cell_type": "code",
21-
"execution_count": null,
21+
"execution_count": 1,
2222
"metadata": {},
2323
"outputs": [],
2424
"source": [
@@ -47,7 +47,7 @@
4747
},
4848
{
4949
"cell_type": "code",
50-
"execution_count": null,
50+
"execution_count": 2,
5151
"metadata": {},
5252
"outputs": [],
5353
"source": [
@@ -76,9 +76,31 @@
7676
},
7777
{
7878
"cell_type": "code",
79-
"execution_count": null,
79+
"execution_count": 3,
8080
"metadata": {},
81-
"outputs": [],
81+
"outputs": [
82+
{
83+
"name": "stdout",
84+
"output_type": "stream",
85+
"text": [
86+
"|S11\n",
87+
" key mass name radius vx vy vz x y z\n",
88+
" - MSun none RSun km / s km / s km / s AU AU AU\n",
89+
"==================== =========== =========== =========== =========== =========== =========== =========== =========== ===========\n",
90+
" 6651284024525347701 1.000e+00 SUN 1.000e+00 -1.874e-03 -1.560e-02 1.104e-04 -8.354e-03 1.923e-03 2.145e-04\n",
91+
"11361453784849012877 1.660e-07 MERCURY 5.654e-03 1.032e+01 -4.214e+01 -4.388e+00 -3.923e-01 -1.749e-01 2.101e-02\n",
92+
" 7973865882662013015 2.448e-06 VENUS 1.403e-02 -1.704e+01 3.049e+01 1.401e+00 6.251e-01 3.518e-01 -3.157e-02\n",
93+
" 9336316391706255048 3.040e-06 EARTHMOO 1.482e-02 2.844e+01 6.966e+00 1.301e-04 2.337e-01 -9.855e-01 2.100e-04\n",
94+
"12320338445353835314 3.227e-07 MARS 7.853e-03 -2.299e+01 5.985e+00 6.908e-01 2.435e-01 1.528e+00 2.599e-02\n",
95+
"15770409518373525325 9.548e-04 JUPITER 1.619e-01 2.872e+00 1.331e+01 -1.194e-01 4.833e+00 -1.158e+00 -1.034e-01\n",
96+
" 5855752668938755582 2.859e-04 SATURN 1.342e-01 -4.794e+00 8.639e+00 4.001e-02 8.335e+00 4.127e+00 -4.033e-01\n",
97+
"14241492025581500998 4.366e-05 URANUS 5.834e-02 5.131e+00 4.103e+00 -5.124e-02 1.289e+01 -1.511e+01 -2.231e-01\n",
98+
" 7611664477873830688 5.151e-05 NEPTUNE 5.572e-02 4.640e+00 2.804e+00 -1.647e-01 1.537e+01 -2.592e+01 1.795e-01\n",
99+
" 1465633314586103062 7.396e-09 PLUTO 3.413e-03 5.144e+00 -2.956e+00 -1.172e+00 -1.152e+01 -2.708e+01 6.229e+00\n",
100+
"==================== =========== =========== =========== =========== =========== =========== =========== =========== ===========\n"
101+
]
102+
}
103+
],
82104
"source": [
83105
"from amuse.ext.solarsystem import new_solar_system\n",
84106
"sun_and_planets = new_solar_system()\n",
@@ -114,9 +136,22 @@
114136
},
115137
{
116138
"cell_type": "code",
117-
"execution_count": null,
139+
"execution_count": 4,
118140
"metadata": {},
119-
"outputs": [],
141+
"outputs": [
142+
{
143+
"name": "stdout",
144+
"output_type": "stream",
145+
"text": [
146+
" key mass name vx vy vz x y z\n",
147+
" - MSun none 3646245880.3572216 * m * s**-1 3646245880.3572216 * m * s**-1 3646245880.3572216 * m * s**-1 149597870691.0 * m 149597870691.0 * m 149597870691.0 * m\n",
148+
"==================== =========== =========== =========== =========== =========== =========== =========== ===========\n",
149+
" 388603917714193344 1.001e+00 Companion 0.000e+00 -1.151e-08 -0.000e+00 -4.745e+03 -0.000e+00 -0.000e+00\n",
150+
" 1364133191765162363 2.000e-01 Nemesis 0.000e+00 5.764e-08 0.000e+00 2.376e+04 0.000e+00 0.000e+00\n",
151+
"==================== =========== =========== =========== =========== =========== =========== =========== ===========\n"
152+
]
153+
}
154+
],
120155
"source": [
121156
"msun = sun_and_planets.mass.sum()\n",
122157
"mnemesis = 0.2 | units.MSun\n",
@@ -138,9 +173,18 @@
138173
},
139174
{
140175
"cell_type": "code",
141-
"execution_count": null,
176+
"execution_count": 5,
142177
"metadata": {},
143-
"outputs": [],
178+
"outputs": [
179+
{
180+
"name": "stdout",
181+
"output_type": "stream",
182+
"text": [
183+
"[[-0.00835408821766, 0.0019229394648, 0.000214547107396]] au\n",
184+
"[[-4744.69448798, -0.0, -0.0]] au\n"
185+
]
186+
}
187+
],
144188
"source": [
145189
"sun = sun_and_planets[sun_and_planets.name==\"SUN\"]\n",
146190
"print(sun.position.in_(units.au))\n",
@@ -158,9 +202,31 @@
158202
},
159203
{
160204
"cell_type": "code",
161-
"execution_count": null,
205+
"execution_count": 6,
162206
"metadata": {},
163-
"outputs": [],
207+
"outputs": [
208+
{
209+
"name": "stdout",
210+
"output_type": "stream",
211+
"text": [
212+
" key mass name radius vx vy vz x y z\n",
213+
" - MSun none RSun km / s km / s km / s AU AU AU\n",
214+
"==================== =========== =========== =========== =========== =========== =========== =========== =========== ===========\n",
215+
" 6651284024525347701 1.000e+00 SUN 1.000e+00 0.000e+00 -4.198e-02 0.000e+00 -4.745e+03 0.000e+00 0.000e+00\n",
216+
"11361453784849012877 1.660e-07 MERCURY 5.654e-03 1.032e+01 -4.217e+01 -4.389e+00 -4.745e+03 -1.769e-01 2.080e-02\n",
217+
" 7973865882662013015 2.448e-06 VENUS 1.403e-02 -1.704e+01 3.046e+01 1.400e+00 -4.744e+03 3.499e-01 -3.179e-02\n",
218+
" 9336316391706255048 3.040e-06 EARTHMOO 1.482e-02 2.845e+01 6.939e+00 1.967e-05 -4.744e+03 -9.875e-01 -4.543e-06\n",
219+
"12320338445353835314 3.227e-07 MARS 7.853e-03 -2.298e+01 5.959e+00 6.907e-01 -4.744e+03 1.526e+00 2.578e-02\n",
220+
"15770409518373525325 9.548e-04 JUPITER 1.619e-01 2.874e+00 1.329e+01 -1.196e-01 -4.740e+03 -1.160e+00 -1.036e-01\n",
221+
" 5855752668938755582 2.859e-04 SATURN 1.342e-01 -4.792e+00 8.613e+00 3.990e-02 -4.736e+03 4.125e+00 -4.035e-01\n",
222+
"14241492025581500998 4.366e-05 URANUS 5.834e-02 5.133e+00 4.076e+00 -5.135e-02 -4.732e+03 -1.511e+01 -2.233e-01\n",
223+
" 7611664477873830688 5.151e-05 NEPTUNE 5.572e-02 4.641e+00 2.777e+00 -1.648e-01 -4.729e+03 -2.592e+01 1.793e-01\n",
224+
" 1465633314586103062 7.396e-09 PLUTO 3.413e-03 5.146e+00 -2.982e+00 -1.172e+00 -4.756e+03 -2.708e+01 6.229e+00\n",
225+
" 1364133191765162363 2.000e-01 Nemesis 0.000e+00 0.000e+00 2.102e-01 0.000e+00 2.376e+04 0.000e+00 0.000e+00\n",
226+
"==================== =========== =========== =========== =========== =========== =========== =========== =========== ===========\n"
227+
]
228+
}
229+
],
164230
"source": [
165231
"sun_and_planets.position -= sun.position\n",
166232
"sun_and_planets.velocity -= sun.velocity\n",

README.md

Lines changed: 38 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,21 +68,35 @@ perform simple N-boyd simulation
6868
* Making cumulative distributions
6969

7070
## running_stellarevolution.ipynb
71-
perform simple stellar evolution calculation
71+
Perform simple stellar evolution calculation by setting up a stellar
72+
mass-function, declaring the stellar evolution code and run it to a
73+
certain moment in time.
74+
75+
#### Learning objectives
76+
* Generate stellar mass-function from internal AMUSE routine.
77+
* Plot the results.
78+
* Use channels from and to running modules.
7279

7380
## running_Nbdoy_with_stellar.ipynb
7481
Run a stellar evolution code as well as an N-body code and assure that
7582
the result is self consistent.
7683

84+
#### Learning objectives
85+
* Initiate multiple independent codes.
86+
* exchange information from one code to another.
87+
* Use Channels across modules.
88+
* Plot results.
89+
7790
## running_Nbody_with_collisions.ipynb
7891
Perform an N-body calculation that includes stellar evolution and
7992
collisions between stars.
8093

8194
#### Learning objectives
95+
* Channels
8296
* Generate initial conditions.
8397
* Initialize stellar and N-body codes.
8498
* More advanced channels for copying specific attributes.
85-
* Setup stopping conditions.
99+
* Sstopping conditions.
86100
* Initiate collision detection.
87101
* Find a specific particle in another particle set.
88102
* Merge stars.
@@ -93,8 +107,16 @@ Simulate a single star (and a cluster) in orbit around the Galactic
93107
center.
94108

95109
#### Learning objectives
110+
* Single-directional hierarchical code coupling strategy (i.e. classice bridge).
111+
* Bridge timesteps.
112+
* Constructing classes in Python
113+
* Incorporating an external potential to an N-body simulation
114+
* Appreciate the role of get_gravity_at_point function in bridge.
115+
* Appreciate the role of get_potential_at_point function in bridge.
96116

97117
## high_order_bridge.ipynb
118+
**Not yet documented**
119+
**Not yet working**
98120
You simulate a debris disk around a moon, in orbit around a planet, in
99121
orbit around a star. This requires a higher order bridge, in order to
100122
assure that the orbital integration is performed with sufficient
@@ -105,9 +127,15 @@ precision and accuracy.
105127
* High-order bridge initalization
106128
* How to construct a disk around a celestial body.
107129

108-
## nested_bridges.ipynb
109-
110130
## hierachical_bridges.ipynb
131+
**Not yet documented**
132+
Construct a hierarchial bridge to integrate a highly hierarchical
133+
system of star and planets.
134+
135+
#### Learning objectives
136+
* Non-linear coupling strategies (bridge).
137+
* Hierarchical coupling strategies (bridge).
138+
* Multiple channels to single particle set.
111139

112140
## running_hydrodynamics.ipynb
113141
Evolve a massive single star up to the moment it explodes in a
@@ -123,7 +151,13 @@ smoothed-particle hydrodynamics code.
123151
* make an animation of simulation results.
124152
* Run an AMUSE module as a parallel job.
125153

154+
## bridge_gravity_with_hydro.ipynb
155+
156+
126157
## running_radiative_transport.ipynb
158+
**Not yet constructed**
159+
127160

128161
### License
129162
[MIT](http://www.opensource.org/licenses/mit-license.php)
163+

bridged_Nbody_with_Galaxy.ipynb

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,18 @@
1919
"- making a class in Python\n",
2020
"- bridge two codes\n",
2121
"- plotting results\n",
22-
"- making cumulative distributions"
22+
"- making cumulative distributions\n",
23+
"- Single-directional hierarchical code coupling strategy (i.e. classice bridge).\n",
24+
"- Bridge timesteps.\n",
25+
"- Constructing classes in Python\n",
26+
"- Incorporating an external potential to an N-body simulation\n",
27+
"- Appreciate the role of get_gravity_at_point function in bridge.\n",
28+
"- Appreciate the role of get_potential_at_point function in bridge."
2329
]
2430
},
2531
{
2632
"cell_type": "code",
27-
"execution_count": null,
33+
"execution_count": 1,
2834
"metadata": {},
2935
"outputs": [],
3036
"source": [
@@ -48,7 +54,7 @@
4854
},
4955
{
5056
"cell_type": "code",
51-
"execution_count": null,
57+
"execution_count": 2,
5258
"metadata": {},
5359
"outputs": [],
5460
"source": [
@@ -108,7 +114,7 @@
108114
},
109115
{
110116
"cell_type": "code",
111-
"execution_count": null,
117+
"execution_count": 3,
112118
"metadata": {},
113119
"outputs": [],
114120
"source": [

0 commit comments

Comments
 (0)