From jscott3@gl.umbc.edu Fri Apr 14 12:31:02 1995 Return-Path: jscott3@gl.umbc.edu Received: from umbc4.umbc.edu (root@umbc4.umbc.edu [130.85.1.4]) by umbc7.umbc.edu (8.6.10/8.6.9) with ESMTP id MAA04760 for ; Fri, 14 Apr 1995 12:31:00 -0400 Received: from ds1.gl.umbc.edu (ds1.gl.umbc.edu [130.85.3.11]) by umbc4.umbc.edu (8.6.10/8.6.9) with ESMTP id MAA06104 for ; Fri, 14 Apr 1995 12:30:59 -0400 Received: from umbc8.umbc.edu (jscott3@f-umbc8.umbc.edu [130.85.3.8]) by ds1.gl.umbc.edu (8.6.9/8.6.9) with ESMTP id MAA09059 for ; Fri, 14 Apr 1995 12:30:58 -0400 From: scott james ( undc) Received: (jscott3@localhost) by umbc8.umbc.edu (8.6.10/8.6.9) id MAA07219 for motteler; Fri, 14 Apr 1995 12:30:56 -0400 Message-Id: <199504141630.MAA07219@umbc8.umbc.edu> Subject: N body silumations - way cool To: motteler@gl.umbc.edu (motteler howard) Date: Fri, 14 Apr 1995 12:30:54 -0400 (EDT) Status: RO Jimmy the Moose X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Length: 9683 Heya - I ran some number's last night to do some orbits. Note that all numbers are in MKS (meter,kilogram,seconds) and that G=6.67x10^(-11) case 1: One satellite around the Sun ============================================ To get an orbit, the tangential velocity of a satellite is: sqrt(G*Mass/R) (1) where Mass is the mass of the central object. Note that the mass of the satellite is irrelevent. This tangential velocity is such that the force on the satellite from the central object is balanced EXACTLY by the centripidal force. So if you want an object to orbit use equation (1). So let's say the central object is at position (100,100). That is the origin. Put the satellite due north at (100,200) -- 100 units north of the central mass, on the Y=0 axis. Let the central Mass be 1.0x10^30kg (the sun), and lets keep going with real astronomy to make 100 of our units (R, radius from central mass to sattelite) equal 50AU. 1 AU(Astronomical Unit) is about 2x10^11 m, so 100 units will be 10^13 m. Then the velocity of the satellite should be, from equation (1), V = 2582.6 m/s. Now, the velocity must be all in the negative (leftwards) direction to be tangential, so: Vx = -2582.6 Vy = 0.0. Note that if you put the satellite anywhere but ON the X or Y axis that while the TANGENTIAL velocity will still be 2582.6 m/s, the components will no longer be so simple: ie, neither Vx nor Vy will be exactly zero. Infact, the componants will be V*sin(theta) and V*cos(theta). Case 2: 3 satellites in orbit ============================== So lets do three satellites in orbit around the central mass. (And then make them spin down into the central mass, hehe!) Conditions ---------- A) The masses must all be equadistant from each other (so that the forces from each other all cancel out in component-wise fashion, and will orbit nicely instead of heading toward each other and making a grand mess!). B) All three masses must be equal. C) And the R radius from the central mass must be the same for all three masses. B) and C) require tha all 3 satellites have the same V = 2582.6 m/s tangentially. A) implies that each object is 120degrees away from each other in the orbit. From that the positions are Satellite 1 is the first body we did above. (At 90 degrees on orbit.) Satellite 2: Vx = 1291.3 (V*sin(30deg)) Vy = -2236.6 (V*cos(30deg) and sign inspection) position = (13.4,50) (at 210 degrees on orbit.) Satellite 3: Vx = 1291.3 (V*sin(30deg)) Vy = 2236.6 (V*cos(30deg) and sign inspection) position = (186.6,50) (at 330 degrees on orbit.) >> Positions are found similarly to Vx and Vy. I.E., R = 100 => x = Rsin(30) ; y = Rcos(30); then subract or add to the origin of (100,100). Okay. These orbit. How about spiraling in? Cut the tangential velocity below the critical V from eqaution (1). We cut it enough to be felt, but not enough to have the satellites hit each other. Say 25%. So for a new tangential velocity, V = 2000.0 m/s : Satellite 1: Vx = -2000.0 Vy = 0.0 Satellite 2: Vx = 1000.0 Vy = -1732.0 Satellite 3: Vx = 1000.0 Vy = 1732.0 NOTE that the components here are the new V*sin(30) and new V*cos(30), Okay. So they'll spiral in. Remember, though, that they won't CRASH. Nothing EVER crashes in Astronomy. The only way to get things to crash using gravity is to have one object head toward another with both force vectors heading right toward each other. Anytime there is just a slight velocity off in one of the components you get a hyperbole and zooooom, they miss. This IS what happens. Even when you throw a ball parallel to the ground. The ball keeps the same velocity parallel to the earth the entire time. One of the qualifying exam questions in Astronomy was to prove that if one guy just standing around drops a ball, and one guy next to him fires a rifle with the barrel exactly parelell to the ground, both the ball and the bullet hit the ground at the exact same time. Why? 'Cause while both have a velocity tangential to the earth of differing speeds, the velocity in the perpindicular (toward the center of the Earth) is exaclty the same for ball and bullet! And then the follow up question: *why* do they hit the ground? Because "the Earth gets in the way of the hyperbolic orbit of the bullet, but the ball heads straight for an elastic collision!" Ha! Then the next followup: the guys are on the moon, not the Earth. What happens? Keeping the muzzel velocity of the gun the same, the bullet now goes into a highly elliptical orbit of the moon! The bullet is a sattelite!! (Why they let these Physics Profs. attend qualifying exams in the Astronomy dept at Stony Brook was to certain you could do math!) A buddy of mine at NASA a few years ago was on a project: Is it economically feasible to mine the moon and send back ore. Yes. Why? Just shoot buckets of the ore out of magnetic rail guns which is a cheap one time cost to build! That same group is now working on a Space Shuttle prototype that the Russians started. The idea is not to 'launch' a shuttle, but fire it from a 'gun' into orbit. Unfortunatly, with the mass of the Earth 10 times that of the moon, it ain't so easy. But they're working on it! Case 3: Another cool case ========================= Take the case of the three bodies obiting at the critical V. Now enter one or more intruder bodies!! Make the 3 satellite masses = 1x10^25kg. Make the intruder(s) masses 1x10^23kg and make thier velocities about 1000m/s. Make a swarm! Amuse your friends! Be the first on your block to screw up a perfectly good orbiting system in a funky way! With masses only 1/100 of the satellites this is more than a swarm of asteroids! It's a swarm of Jupiters! Case 4: Bad news ================ I can't find my IDL code for the galaxy mergers. It's on a tar tape from Space Telescope. I think I left it with my collaborator when I left. There is a reference to our galaxy collision models in our paper "On the Environment of IRAS Galaxies" (see my WWW home page at UMBC for reference.) We never got the collision stuff published. Damn referees thought we didn't do enough bodies! If only we had had a MasPar instead of a Sun 3/50!!!! The idea, though, is this: It's JUST LIKE case 2. Like three bodies orbiting a central mass. But now the central mass is the galactic core, and we have 10^12 bodies orbiting! BUT remember in case 2 how all the masses of the co-orbiters was the same, and all the bodies were equidistant. What gives in the galaxy? Well, the density FUNCTION is a constant. So the co-orbiter's forces still MOSTLY cancel out. When they don't cancel exactly, you get density waves -- spiral structure! Anyway, you CAN make an elliptical galaxy as long as the masses are random in space and have a tight constraint, say two or three orders of magnitude (true in the galaxies). But, as I say, I can't find my code which generates points with an even mass distribution radially from the core. After generating the shells of stars in concentric rings radially from the galactic core, give them a random velocity. But even tighter constraints on the velocity - set of velocities distributed around the critical velocity to get them orbiting the core. So you need two random generators, one for mass and one for velocity. With constraints!!!!! I'll try and get that program this summer, or write another (I want to run it on the MasPar!! After all that work on that paper which was never published ... ) Maybe I can get you two colliding galaxies that merge and create two spiral galaxies. It's cool as hell! Stars fly all over (and don't collide, mind you) as the galaxies collide, then they relax with streams of stars trailing them as they emerge from the collision. Spirals! Some rogue stars that got catupulted out of one or the other original galaxies too much to become part of the resultant spiral galaxies form irregular clumps which orbit the spirals (Hey, that's what the Magallenic Clouds are!) Better than two stars smacking into each other. Way more cool looking. And it's real science. OKAY. Enough. But one more word on this subject. STOP USING G=1 !!!!!!!!!!! That's fine in relativistic astrophysics, but not in Newtonian Mechanics! What you've done is decreased gravity's effect by 10^22 !! (1/G sqaured) Look at equation (1) again! Wonder why your objects are diffusing and ignoring each other? To scale everything to G=1 you'd need to divide velocities by 10^22, and divide radii the same way. Use real numbers. It's easier. jim PS - if you try these number's and they don't all work out, note that I've done all this on a hand calculator (trusty HP23c!) I could stop by tuesday at noon and with MatLab we could do some touch up....? --------------------------------------------------------------- jim scott | jscott3@umbc8.umbc.edu Computer Science Dept. | http://umbc8.umbc.edu/~jscott3/ University of Maryland, B.C. | xrjhs@farside.gsfc.nasa.gov Baltimore, Md. | | BREWER | PATRIOT | PROPELLORHEAD --------------------------------------------------------------- "When you have eliminated the improbable, look to the impossible." -- A. C. Doyle From xrjhs@farside.gsfc.nasa.gov Fri Apr 14 12:53:15 1995 Return-Path: xrjhs@farside.gsfc.nasa.gov Received: from umbc4.umbc.edu (root@umbc4.umbc.edu [130.85.1.4]) by umbc7.umbc.edu (8.6.10/8.6.9) with ESMTP id MAA06331 for ; Fri, 14 Apr 1995 12:53:14 -0400 Received: from algol.cs.umbc.edu (algol.cs.umbc.edu [130.85.100.2]) by umbc4.umbc.edu (8.6.10/8.6.9) with ESMTP id MAA09040 for ; Fri, 14 Apr 1995 12:53:13 -0400 Received: from farside.gsfc.nasa.gov (farside-f.gsfc.nasa.gov [128.183.253.184]) by algol.cs.umbc.edu (8.6.12/8.6.9) with ESMTP id MAA02237 for ; Fri, 14 Apr 1995 12:53:16 -0400 Received: (from xrjhs@localhost) by farside.gsfc.nasa.gov (8.6.10/8.6.9) id MAA10681 for motteler@cs.umbc.edu; Fri, 14 Apr 1995 12:53:10 -0400 From: Jim Scott Message-Id: <199504141653.MAA10681@farside.gsfc.nasa.gov> Subject: PS to Nbody simulations To: motteler@cs.umbc.edu Date: Fri, 14 Apr 1995 12:53:10 -0400 (EDT) Status: RO Jimmy the Moose X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Length: 909 Oh. I meant to say. With the numbers I gave you, things aren't going to happen very fast. Not at 1/10th a second per iteration. Or even 1 second. The way we ran these was printing out the galaxies every (i think it was) 100,000 seconds for when the galaxies were close together, 1,000,000 seconds when far apart (use a characteristic scale length of 10 galaxy radii for dteremining far and near). We used 1/10th second for stepping time. We really wanted 1/1000th, but on the ol' Sun 3/50 ..... Anyway, how 'bout telling people to print out every X step instead of every. And then use DPU_TIMER for the 100,000 seconds to compare peoples alogrithms? This way, too, the print out loop no longer dominates the timing... James H. Scott xrjhs@farside.gsfc.nasa.gov NASA Center for Computational Sciences (NCCS) Goddard Space Flight Center Greenbelt, Maryland