|
8 | 8 | "====================\n", |
9 | 9 | "\n", |
10 | 10 | "AMUSE is composed of domain-specific modules (i.e. the physics modules), which are often written in some native compiled language, and data-handling.\n", |
11 | | - "the latter tends to be confusing for novel users.\n", |
| 11 | + "The latter tends to be confusing for novel users.\n", |
12 | 12 | "Data representation in AMUSE is often replicated.\n", |
13 | | - "So can there be a parameter *mass* to indicate a property of a star in a stellar-evolution code, in a gravitational dynamics code and in your user script. These three parameters *mass* can mean the same, or they can have a different meaning. This makes running amuse somewhat confusing at times.\n", |
| 13 | + "So there can be a parameter *mass* to indicate a property of a star in a stellar-evolution code, in a gravitational dynamics code and in your user script. These three parameters *mass* can mean the same, or they can have a different meaning. This makes running amuse somewhat confusing at times.\n", |
14 | 14 | "Here we show how to formally separate these data streams.\n", |
15 | 15 | "\n", |
16 | 16 | "But first we will enter the realm of modules." |
|
32 | 32 | "cell_type": "markdown", |
33 | 33 | "metadata": {}, |
34 | 34 | "source": [ |
35 | | - "We now like to generate the Solar system, as it was observed on April 5th 2063 using the [JPL emphemeris](https://ssd.jpl.nasa.gov/horizons.cgi#top).\n", |
| 35 | + "We now want to generate the Solar system, as it was observed on April 5th 2063 using the [JPL emphemeris](https://ssd.jpl.nasa.gov/horizons.cgi#top).\n", |
36 | 36 | "Let's start with the inner most planet, Mercury, in the Sun's barycenter, which gives the following output:\n", |
37 | 37 | "\n", |
38 | 38 | "*******************************************************************************\n", |
|
47 | 47 | }, |
48 | 48 | { |
49 | 49 | "cell_type": "code", |
50 | | - "execution_count": 2, |
| 50 | + "execution_count": 1, |
51 | 51 | "metadata": {}, |
52 | | - "outputs": [], |
| 52 | + "outputs": [ |
| 53 | + { |
| 54 | + "ename": "NameError", |
| 55 | + "evalue": "name 'Particles' is not defined", |
| 56 | + "output_type": "error", |
| 57 | + "traceback": [ |
| 58 | + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", |
| 59 | + "\u001b[0;31mNameError\u001b[0m Traceback (most recent call last)", |
| 60 | + "\u001b[0;32m/tmp/ipykernel_26547/1076903443.py\u001b[0m in \u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mSun\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mParticles\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m1\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 2\u001b[0m \u001b[0mSun\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mmass\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;36m1\u001b[0m \u001b[0;34m|\u001b[0m \u001b[0munits\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mMSun\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 3\u001b[0m \u001b[0mSun\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mposition\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m(\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;34m|\u001b[0m \u001b[0munits\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mkm\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 4\u001b[0m \u001b[0mSun\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mvelocity\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m(\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;34m|\u001b[0m \u001b[0munits\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mkm\u001b[0m\u001b[0;34m/\u001b[0m\u001b[0munits\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0ms\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 5\u001b[0m \u001b[0mplanets\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mParticles\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m8\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", |
| 61 | + "\u001b[0;31mNameError\u001b[0m: name 'Particles' is not defined" |
| 62 | + ] |
| 63 | + } |
| 64 | + ], |
53 | 65 | "source": [ |
54 | 66 | "Sun = Particles(1)\n", |
55 | 67 | "Sun.mass = 1 | units.MSun\n", |
|
71 | 83 | "source": [ |
72 | 84 | "And continue doing this for the other 7 planets.\n", |
73 | 85 | "Then add the Sun and we have the Solar system's particle set.\n", |
74 | | - "It would be easier if there is a handy routine with the same effect, in particular because of frequently will be using the Solar system as some sort of template for a rather typical planetary system, or for specifically sutdying this planetary system. We therefore have a handy routine that gives allows us to initialize the Solar system." |
| 86 | + "It would be easier if there is a handy routine with the same effect, in particular because we will frequently be using the Solar system as some sort of template for a rather typical planetary system, or for specifically sutdying this planetary system. We therefore have a handy routine that allows us to initialize the Solar system." |
75 | 87 | ] |
76 | 88 | }, |
77 | 89 | { |
|
115 | 127 | "We adopted the module `ext.new_solar_system` to generate a ready-made solar system. You can also make a solar system that includes it's moons. For this you will have to use the routine \n", |
116 | 128 | "'new_lunar_system', which is a module from the 'amuse.ic.solar_system_moons' package.\n", |
117 | 129 | "\n", |
118 | | - "Now, plot the positions of the sun and planets in the orbital plane." |
| 130 | + "Now you can plot the positions of the sun and planets in the orbital plane." |
119 | 131 | ] |
120 | 132 | }, |
121 | 133 | { |
|
195 | 207 | "cell_type": "markdown", |
196 | 208 | "metadata": {}, |
197 | 209 | "source": [ |
198 | | - "And, equally wise they will have different velocity.\n", |
| 210 | + "And, equally they will have different velocity.\n", |
199 | 211 | "\n", |
200 | | - "however, we would like to adot these binary parameters for the Sun-Nemesis binary system. For this, we first move the entire Solar system to the Sun barycenter, move it to Nemesis' companion and add Nemesis." |
| 212 | + "However, we would like to adot these binary parameters for the Sun-Nemesis binary system. For this, we first move the entire Solar system to the Sun barycenter, move it to Nemesis' companion and add Nemesis." |
201 | 213 | ] |
202 | 214 | }, |
203 | 215 | { |
|
244 | 256 | "source": [ |
245 | 257 | "You have created a hypothetical planetary system with the Sun, 8 planets and 1 dwarf planet (mimiking the Solar system), and a secondary star (Nemesis) in a wide and elliptic orbit.\n", |
246 | 258 | "\n", |
247 | | - "Assignmnets and questions:\n", |
| 259 | + "Assignments and questions:\n", |
248 | 260 | "---------------\n", |
249 | 261 | "\n", |
250 | 262 | "### Assignment 1:\n", |
|
274 | 286 | ], |
275 | 287 | "metadata": { |
276 | 288 | "kernelspec": { |
277 | | - "display_name": "Python 3", |
| 289 | + "display_name": "Python 3 (ipykernel)", |
278 | 290 | "language": "python", |
279 | 291 | "name": "python3" |
280 | 292 | }, |
|
288 | 300 | "name": "python", |
289 | 301 | "nbconvert_exporter": "python", |
290 | 302 | "pygments_lexer": "ipython3", |
291 | | - "version": "3.9.7" |
| 303 | + "version": "3.8.10" |
292 | 304 | } |
293 | 305 | }, |
294 | 306 | "nbformat": 4, |
|
0 commit comments