jump to navigation

natural problems 29 September 2008

Posted by DSM in astronomy.
comments closed

So on Friday we had Leslie Sage visit, who works for Nature (the massive science publishing giant) and is the point man for astronomy. I learned a fair bit about the way their process works, much of which surprised me, and left me thinking less of the journal than I’d thought beforehand, which wasn’t much. This is a bit of a problem, as Nature gets a fair amount of the most interesting science, and the boss and I were toying with aiming one of our ongoing projects in its direction.

Basically:

(1) Sage explained that Nature only publishes 7% of submitted papers, and roughly 12% of the astronomy-related submitted papers, because they’re looking for only the best papers. This isn’t true, though: they don’t publish the best papers. Not even close. The articles in astronomy in Nature are usually pretty terrible as papers. For example, in theory, it’s almost impossible to figure out what the authors have actually done from their description in Nature. The articles are so compressed that there’s little room for the details which are necessary to reproduce a simulation. It’s not the authors’ fault at all, or at least not most of the time; page budgets are very tightly controlled, often to the point of absurdity.

There are papers, and there are “Nature papers”. It’s not uncommon to be searching the literature, find out that a result you need to understand was published in Nature, and then find yourself desperately hoping they published something real on it somewhere useful.

Sage argued in Nature’s defence that they allow online “supplemental information”, but that’s more suited for data tables. To suggest putting necessary information in a supplement is merely another way of admitting that they don’t publish science papers but press releases/extended abstracts with graphs.

Nature isn’t trying to get the best papers, but the sexiest results. And this they often succeed at, but I don’t see why it’s in the community’s interest to have our most important results written up in a deliberately inferior format — “defective by design”, as they say.

(2) I’d always assumed that there was some team of notable astrophysicists who reviewed the submissions and decided if they were Nature-worthy results, independent of the refereeing process. It turns out that said team consists of Leslie Sage. (Plus cameo appearances by people he sometimes consults.) I’m sure he’s a decent enough guy, but I don’t like single-point-of-failure arrangements, and with all due respect to Dr Sage, “capturing Leslie Sage’s interest” doesn’t strike me as all that prestigious. Moreover, what if you manage to incur Dr Sage’s wrath? Then what?

In the end I suspect that we would all be better served simply by not sending our results to Nature, breaking the cycle of dependency. For various reasons people are taking a long, hard look at the way we do science publication at the moment, and it’s not at all clear how the landscape is going to look in ten years, but we can start by imagining one in which Nature doesn’t play a role.

second act 10 September 2008

Posted by DSM in astronomy, travel.
comments closed

Hooray!

Yep, back. The last few months have been incredibly hectic but great fun. During that time I visited Vienna, which was my first trip ever to the continent, for the annual meeting of the European Geophysical Union (of which I’m a member); beautiful, beautiful city. After I got over the unnerving feelings induced by being given commands over loudspeaker in German (too many WWII movies as a kid, I guess), I settled in nicely and got some sightseeing done.

Almost immediately after that I went to Japan for several weeks by the kind invitation of Nagasawa Makiko and fell completely in love with the place. I felt more comfortable in Tokyo than I had in Vienna, even though very few people there spoke English but most everyone I came across in Vienna did. I considered blogging the trip, but frankly I was having way too much fun to stop to type, and too much to describe in any case. I have to get back as soon as I can.

There’s some discussion here of bringing Nagasawa-sama over here, which would be really cool. I’m too junior to have the budget to do it myself but some of our mutual friends do! I think I embarrassed her slightly by insisting on the -sama honourific: she complained that the grad students asked her if she’d told me to call her that. (-sama’s a little above what one would ordinarily use in that context.) But she was my host, and genuine gratitude + major teasing = WIN!

For anyone who was wondering, the introduction to my talk (which I gave in Japanese– the introduction, not the talk) went very well. Everyone laughed at the right spots, and not just because of my accent, I think. So that was good.

After Japan it was off to Victoria for CASCA, which was enjoyable though I have to admit not as much fun as usual. Not sure why, although I suspect it was because not all of the usual suspects were there, including some of my favourites. Then a few weeks in Red Deer visiting the family, and then back to London!

Never done so much travelling in my life.

One mildly irritating thing happened while I was in Japan, though: I got the referee’s report back on my last paper, a report which was quite snarky. It was anonymous, as these things usually are, but from the use of idiosyncratic terminology used only bay a certain author and the fact that a considerable fraction of the report was devoted to asking why I didn’t refer to/do things the same way as said author, it’s obvious who it was. Certainly he knows a considerable amount about the subject matter, and once you correct for the steel-wool tone the report is thorough and detailed.

But surely a professor at [very famous American university --redacted] has better things to do with his time than COMPLAIN ABOUT THE NAME OF MY CODE?! Good grief.

(“Naoko”, for the record. “New Adaptive Orthochronous Kepler Orbiter”. Any relation to Yamada Naoko, the character who helps out physicist Ueda Jiro in the brilliant “Trick” series, is too much fun for the referee and so should probably be kept hush-hush.)

In any case, last Friday I fired off the revised version on which I’ve been working since my return to England, and so my promise to myself to stay away from the blog until it was done has been kept. Harsh mistress, astronomy.

it takes an IT department of millions to keep me down 27 February 2008

Posted by DSM in astronomy.
comments closed

New methods for large dynamic range problems in planetary formation
D.S. McNeil and R.P. Nelson

Modern N-body techniques for planetary dynamics are generally based on symplectic algorithms specially adapted to the Kepler problem. These methods have proven very useful in studying planet formation, but typically require the timestep for all objects to be set to a small fraction of the orbital period of the innermost body. This computational expense can be prohibitive for even moderate particle number for many physically-interesting scenarios, such as recent models of the formation of hot exoplanets, in which the semimajor axis of possible progenitors can vary by orders of magnitude. We present new methods which retain most of the benefits of the standard symplectic integrators but allow for radial zones with distinct timesteps. These approaches should make simulations of planetary accretion with large dynamic range tractable. As proof-of-concept we present preliminary science results from an implementation of the algorithm as applied to an oligarchic migration scenario for forming hot Neptunes.

The Man tried to bring me down, and destroyed hundreds of gigabytes of my work, but he’ll have to do better than that.. if all goes well I’ll submit the above paper next week and the first science paper in April!

I named the new method Naoko, after the beautiful supermagician Yamada Naoko. But if anyone asks, I’m going to say it stands for New Adaptive Orthochronous Kepler Orbiter..

cache success 28 September 2007

Posted by DSM in astronomy.
comments closed

We’ve started a new project — like I don’t have enough going on! — involving studying the intersection of our dynamical planetary formation models with cosmochemistry. Richard and I had spoken about it before, but we recently went to a conference run by the Royal Society (I kept my name badge!) on the formation of the Earth and realized there was definitely something we could bring to the table.

(Robin Canup, the opening speaker, used a graph from my thesis in her talk. I kind of geeked out a little when she asked if she could..)

A week or so ago I started experiments to see how long the simulations we wanted to do would take, and found a quirk: sometimes my code would perform dramatically better if you overloaded one of the boxes. That is, if you take a box with four cores and ran eight processes, then the code would become many times faster.. which doesn’t make a great deal of sense.

Turns out to have been a cache issue.  By increasing the number of processes I decreased the number of particles each process had to deal with, which meant that the computer didn’t have to reach very far for the memory it needed to access.

Long story short, by swapping the order of the following lines

for (i = 0; i < NumPlanets; i++) {
for (j = 0; j < localNumField; j++) {

so that it becomes

for (j = 0; j < localNumField; j++) {
for (i = 0; i < NumPlanets; i++) {

my code speeds up by a factor of two to three on the cluster machines, without any “overloading”. All I’m doing is changing the order of the loops.

Over a factor of two, without adding a single line of code, but only moving ONE line of code up ONE LINE.

Not a bad day!

the missing step 6 July 2007

Posted by DSM in astronomy.
comments closed

So far the plan looks something like this:

1. Decide to get a factor of two in speed by joining certain force calculations in your code.  The technique works perfectly in the old code, and applying it should be reasonably straightforward.

2. Spend a week gradually discovering that because of the structure of the new integrator, very few of the forces you thought you could reuse can be reused.

3. Realize after a frustrating twenty-hour coding sprint that in most real-world cases, the joined-kick code is not only far more complicated and far more fragile, but the overhead means that it’s actually slower than the non-joined version.

4. ????

5. Profit!

Suggestions welcomed.

57424 26 April 2007

Posted by DSM in astronomy.
comments closed

There’s a popular and long-running astronomy program here, The Sky at Night, hosted by Sir Patrick Moore. (That’s not the same Patrick Moore who co-founded Greenpeace and was later excommunicated from the environmental movement for his good sense.) Richard appeared on the show last year to talk about planet formation, and covered the Nice model that Hal Levison and company came up with. The episodes I’ve seen were very good, and didn’t dumb down the science nearly as much as you’d expect.

There was a party on Tuesday evening in honour of the program’s fiftieth anniversary — the boss went, to celebrate with the Great and the Good — at which it was announced that an asteroid was named after the show. I can’t find any Web coverage of the story, but I suspect it’s 57424 Caelumnoctu, for the obvious reason..

There’s a tragic-romantic aspect to Moore’s life as well:

The war had a significant influence on his life: his only known romance ended when his fiancée Lorna, a nurse, was killed by a bomb which fell on her ambulance. Moore subsequently explained that he never married because “There was no one else for me… second best is no good for me…I would have liked a wife and family, but it was not to be.”

Huh.

Anyway, Richard guested on the July 2006 episode.

UPDATE: Paul Sutherland of Skymania dropped a note pointing out that he did a brief writeup on the event; links to photographs are included.

I also asked Richard about how the evening went. He skipped off to Paris for a few days afterwards to plan a conference in honour of John Papaloizou with Steve Balbus (yeah, that Balbus, the one from the magnetorotational instability) and Caroline Terquem, so I couldn’t ask until Friday. The boss agreed that it was a good deal of fun, and that even at eighty-odd years, Sir Patrick can still summon the energy when he needs to: it’s like flicking a switch when the attention’s on him.

I know there were some behind-the-scenes efforts to get the presentation here at Queen Mary — Sir Patrick’s a Fellow of the College, and taught here for about a decade — but they fell through, alas. Too bad: I could’ve probably soc-eng’d my way in.

one pi, two pi 29 March 2007

Posted by DSM in astronomy.
comments closed

Beware averaging angles!

I just lost an hour and a half or so tracking down an obscure bug in my visualization code.  Every now and then, Saturn’s F-ring would suddenly decide not to fit on the surface density plot anymore.

(Yep, I’m back on Cassini work — there’s a paper the team wants to submit to Nature in a month, so it’s time for some quick sims studying embedded objects.)

It turned out to be because the simple algorithm I was using to fit an ellipse to the F-ring and straighten it out involved taking the mean of the longitudes of the ring particles’ orbits.  As usual, I’d normalized them (in this case to [-pi, pi]) which tends to avoid headaches.. but it won’t get you out of every problem, and when the angles rolled around, the mean didn’t know about the 2 pi periodicity of trig functions and therefore stopped returning useful numbers.

For the record: average the angles in vector or exponential form to get the right answer.  You can even cast back into trig space and come up with a cute expression if you’d like, which is left as an exercise for the reader.

nonperiodic tilings of the plane 14 February 2007

Posted by DSM in astronomy, physics.
comments closed

[Currently playing: "Love is All Around", a version of which was used as the Mary Tyler Moore theme song.  Turns out to have been written by Sonny Curtis, who also wrote "I Fought the Law".  The things you learn from listening to the Diner!]

This week’s full of a lot of talks to launch EPSTAR, the Experimental Particle, String Theory and Astronomy Research consortium — although by astronomy they have in mind cosmology and not planetary dynamics.  Professor Sir Roger Penrose, Fellow of the Royal Society, Order of Merit, as he’s formally introduced, is the Very Special Guest.

On Monday he gave a public lecture on “Before the Big Bang”.  I tried to record it but something went wrong, which is too bad: think what a bootleg copy of a Penrose talk could bring on the black market!  [nothing --ed.  spoilsport! --me]  He presented various ideas of different levels of plausibility about what (if anything) happened before, and whether or not there were ways to mathematically continue the models past/through/around the initial singularity, assuming there was one.  Much of his talk was actually focused on what happens at the hypothetical heat death of the universe, and considered whether in a massless and radiation-dominated regime, the inability to construct a clock (because you don’t have any mass out of which to build anything) means that the standard picture of spacetime will break down in a way similar to the way we expect it breaks down at the earliest period of the universe.  (Richard was also there, and he wondered if Penrose’ ideas required proton decay or not.  Penrose was ambiguous on this point.)

The hall was packed — the cult of (scientific) celebrity, as someone said — and either the British education system is better than I’ve been led to believe or he may have aimed high in assuming that the audience was comfortable with conformal transformations.  (Mappings which preserve angles, both magnitude and direction, but can let other things like size vary.)

Yesterday he gave another talk, a longer and more technical lecture, on his pet idea, twistor theory.  Room was also packed: people were standing.  The algebra was pretty rough slogging unless you’re more used to working with spinors than I am, but you could follow the overall argument well enough if you paid attention.  I think I’d have been completely lost if I hadn’t reread chapter 33 of his book “The Road to Reality” beforehand: he stayed pretty close to his presentation there, just with more of the details.

He had a cute line about first cohomology, also from the book: it’s a precise, nonlocal measure of the degree of physical impossibility of an object, and gave the impossible triangle as an example.  Locally, the triangle’s perfectly constuctible — there’s nothing weird about it.   And if you remove a corner, you can build it.  But you can’t build the object as a whole, and that impossibility of globally satisfying certain connection constraints is what first cohomology measures.  (The triangle case is a particularly simple case of this.)  He noted that he didn’t know of an equivalent easy way to explain second cohomology, but that just as twistors are naturally useful for dealing with 1-particle wavefunctions because of their first cohomological properties, to handle such things as EPR entanglement second cohomology may be important.

He intermittently returned to the GR/QM unification theme, and suggested that his twistor program (in which the lightcone stays fixed but the idea of an “event” gets fuzzy) has advantages over some other proposals (in which the lightcone gets fuzzed up) as a road to quantum gravity.  I’ll go back on Thursday for part two.

In an hour or so the lectures start up again, but no Penrose today.  Instead it’s Peter Coles, once of Queen Mary and now of Nottingham, on dark matter and dark energy; Michael Green, once of Queen Mary and now of Cambridge, on string theory (yeah, that Michael Green); and Bryan Webber, never of Queen Mary and now of Cambridge, on the frontiers of particle physics.

Should be fun!

crack in the pavement 7 February 2007

Posted by DSM in astronomy, physics.
comments closed

Yet another installment in my numerical adventures.

Had a meeting with Richard yesterday where I showed him the results of many of my test suites designed to show that my new two-timestep code was behaving pretty well. Ran some followup tests before I left for the day: he’d expressed interest in knowing exactly where it was the integrator broke down, and that sounded like a good idea.

Originally I’d planned to use a smooth transition function from the outer to the inner regions, but the analytics became a nightmare almost immediately so I’d have to have switched from the Duncan-style recursion to Chambers-style numerical integration.. and I wanted to put that off for a while. If the method worked pretty well except for transiting objects, then switching to a smooth transition would probably solve that, but if it didn’t work at all, then smoothing the transition wouldn’t help.. so it made sense to try the simple thing first.

I managed to show that the code works surprisingly well in most situations, with a handful of exceptions which I suspect are due to numerical resonances. I think this is because the forces are admittedly becoming more inaccurate on the inside but they’re also less important, and an averaged behaviour is a better approximation. However, when objects cross the boundary between inner and outer zones repeatedly — for example, an object with a respectable eccentricity with semimajor axis at the transition point — then they don’t behave so nicely. They become artificially eccentric.

I can only think of two ways to get around this. The first is to forbid objects from switching back to an outer zone timestep even if they move into the outer zone, but that’d cause problems with the way I’m handling my close encounters. The second, unfortunately, is to put in a smooth transition, which means that I have to finally finish my Chambers code. Since the boss is away for a few days, now’s the time.

On the bright side, given the subtleties of the problem, I can probably release a short paper on the technique aside from the science we’re going to generate, which is a plus..

a four-pipe problem 30 January 2007

Posted by DSM in astronomy, planets.
comments closed

I’ve mentioned several times recently that I’ve been working on techniques to allow me to study the formation of hot Neptune systems without the simulations taking fifty times longer than they used to.  (See, e.g. here; I don’t think people looking for “astral projection” found what they wanted!)

That factor of fifty’s not an exaggeration, by the way: the orbital period at 0.05 AU is ~0.01 yrs.  Even if I only take ten steps an orbit, which is pushing things a little, that means I have to take a timestep of 0.001 yrs.. for comparison, my usual timestep for terrestrial planet formation is 0.05 yr.  For the first part of the evolution, which lasts ~5 Myr, this means I’d need five billion steps.  Assuming each step took 10 milliseconds, this simulation would take 50 million seconds, or 578 days.. completely impractical.   I want something that’ll take a few weeks at most.

Well, I have some good news to report!  My most recent attempt is behaving quite nicely, despite the small violations of momentum conservation.  (These come about because to compute the forces between the inner and outer zones I use the “current” inner particle positions — they’re updated on a short timescale — but “expired” outer particle positions, and the sampling frequency isn’t as short as it should be to resolve the inner potential completely.)  The inner objects are treated using the same code as before, so I know the close encounters are being treated correctly; likewise the outer objects; only the transition from zone to zone (which turns out to be quite smooth) and the force coupling between the inner and outer zones (which seems okay) are potential problems.  Had to play some crazy pointer games to avoid modifying what I’d already written, but now isn’t the time to go breaking things which work.

Preliminary results are very encouraging.  For example, in a test case with two 18 Earth-mass objects undergoing strong migration in a heavy (five times standard) gas disc, it’s basically impossible to determine from the semimajor axis and eccentricity evolution which code I used (the standard approach or my new version) or where the transition point is.

Tomorrow I’ll do as I promised and plot graph after graph to convince Richard that the code is working, and then hopefully we can get the low-resolution runs started soon, if not by the end of this week then the beginning of next..

b is not h 24 January 2007

Posted by DSM in astronomy, physics, planets.
comments closed

I’ve mentioned previously that I’m currently working on numerical techniques which will allow me to handle a small number of protoplanets orbiting close to their parent star without having to use the small timestep their fast orbits necessitate for all of the objects in my system. It’s tough to do in a symplectic fashion, but I’m making progress — and am helped somewhat by the fact it’s guaranteed in my particular domain that the number of particles in that region will always be very small compared to the total.

The other week, just out of curiosity, I started a sim with only a few protoplanets but using the small timestep, to see what the gross properties were likely to be. I had a look at the results yesterday and saw some very strange behaviour. I expected a nice linear infall: for the particular surface density I chose, the migration rate is independent of orbital semimajor axis, so if you use the same masses for all your objects they should migrate in tandem.

However, interior to 0.2 AU or so the objects instead started accelerating, and there was no obvious reason for that. Spent most of the afternoon trying to sort out what was going on. At one point I was convinced that it was working on my desktop machine and not working on the cluster, which was very frustrating..

The effect appeared dependent on timestep, which suggested a numerical instability. I’d never tried the migration code at such high densities and so close to the Sun, so it was possible that there was some criterion for the change in energy or angular momentum per timestep that I was now violating. But that didn’t make much sense: the migration rate I was using now was much slower than the migration rate I used in my thesis and you should be able to scale most of the semimajor axis dependence away, so the integration shouldn’t really notice that I’m now closer in. (Annoyingly, they redid the theory on me mid-thesis; fortunately we’d used a number of different migration rates to account for the uncertainty.)

Then things got even weirder: I wanted to see how the unexplained acceleration depended on the mass of the protoplanet, and it turned out that the problem got worse the lighter the planet was! This was downright perverse. Not only should most numerical problems go away the smaller the mass, but type I migration (the kind I’m working with) scales linearly with the mass. You cut the mass in ten, the migration rate drops by ten, so the perturbation per timestep should be much, much smaller — but instead the problem was getting ten times worse!

This turned out to be the key clue. I couldn’t believe that any type I-related numerical instability would behave like that. What kind of effect gets stronger the lighter the planet?

Aerodynamic drag. The aerodynamic drag formula that I use scales inversely with the density of the planet and the radius of the planet. For my test cases, I was leaving the radius alone and just decreasing the mass, which means that I was decreasing the density: so the aerodynamic drag was getting stronger.

So now I knew what was breaking — nothing to do with the strong type I migration, but the easily-overlooked weak aerodynamic drag. It should have been far too weak to do anything, even at these high gas densities, because my protoplanets had very large radii.. once you get above a few hundred km or so there should have been little-to-no effect. I went home, and left solving the problem for today.

Woke up early this morning and tossed in bed for a while, and wondered if it was a scale height issue. Generally speaking, integrators prefer to work with smooth functions. In the inner parts of my disc — much further inside that I’d ever tested before — the disc becomes very thin. If the orbits of my protoplanets were too inclined to the plane, then they might not be smoothly sampling the vertical profile of the disc, which could lead to numerical problems.. but working the numbers in my head it looked like I should be safe. I’ve learned not to trust my before-seven-o’clock arithmetic, though, so it was worth a try.

Tested this theory when I came to the office by putting down a protoplanet right in the midplane, making it a two-dimensional problem, in which it shouldn’t ever notice there’s a vertical gradient.. but it continued to fail noisily. Manually changing the scale height and making the disc thicker didn’t help either, although the midplane test was stricter in any case.

So I fell back on the old standby: uncommenting all the debugging printfs in the aerodrag routine and looking to see if the intermediate numbers provided any insight.

After that it took about thirty seconds. The accelerations on the protoplanets that the aerodynamic drag were reporting were varying by orders of magnitude from one call to the next, which couldn’t be right.

I soon realized what was going on: I was using the barycentric positions instead of the heliocentric positions as a result of some changes I’d made to the code a while back. This meant that the acceleration vector had the wrong magnitude and was pointing in the wrong direction half the time. It’d be hard to notice at large semimajor axis, where the orbital velocity is slower and the accelerations smaller, but the problems due to the asymmetry leap out at you when the accelerations get large enough.

The necessary change, after all that?

r = obj->rb;

had to become

r = obj->rh;

Just another day in the life of a numerical programmer.

While I’m rambling on the subject of numerics, let me put in a good word for Piet Hut and Jun Makino’s brilliant work on the various Art of Computational Science projects. Their dialogue-style tutorials and introductions to N-body methods not only give you an understanding of the details of the field, but they do about as good a job as it’s possible to imagine a static text doing of conveying the “tacit knowledge” that lurks in the background of the discipline.. the sorts of things you should try, and the sorts of mistakes that crop up. All fellow computational astrophysicists should take a look, and we owe them a debt of gratitude for their efforts.

astral projection 5 January 2007

Posted by DSM in astronomy, planets.
comments closed

Well, here I am in the office early in the morning. Why, you ask?

Had trouble getting to sleep last night, and then woke up at about five. Tossed for an hour and change before giving up and coming in. I have renewed sympathy for people with major sleep problems (hi Dad!).. even this one night of restlessness was frustrating. Not sure why I couldn’t sleep, but a research problem I’ll describe in a minute was proving very distracting.

(All-time best remains one evening when I was out with a gorgeous young woman at a family-run hole-in-the-wall restaurant in Kingston. The food was very tasty, but the coffee was do-it-yourself and I accidentally spilled an entire enormous chunk of the grounds into my cup; it took up about a third of the volume. Rather than writing off the cup as a failure, I forced myself to drink it, and only put in a little bit of extra water.

I spent the night being exhausted beyond belief and yet wired like I’ve never been in my entire life. If I’d had sleeping pills available I’d probably be dead now, because I’d have swallowed the bottle whole and not stopped to think about appropriate dosages.)

To understand my problem, you need some background. Most of my work in planet formation involves simulating the formation process using N-body integrations. The code accepts a list of objects (N objects, or bodies, hence the name), which specifies their masses, their positions, and their velocities. Then the code computes the trajectories of the objects as the result of their mutual interactions: you compute the forces, which gives you the accelerations, and so you change the velocities a bit; then you have an updated velocity, so you change the position a bit; etc. In practice there are all sorts of clever things people have dreamed up to do this efficiently and robustly, but at heart you’re just approximating the continuous path by dividing it up into small steps and advancing each part. (The relationships between the posititions, the velocities, and the accelerations involve differential equations, so solving them is an “integration”: you add up the little changes to get the final answer.)

The particular kind of integrator that I have expertise with is called “symplectic”, which is a subcategory of geometric integrators. Basically, geometric integrators build information about the structure of the equations right into the method you use to solve them, in the hopes of improving the stability and the accuracy of the integrations.

It’s sometimes easy to get the structure right: for example, if you’re modelling a spherically symmetric system, then you only have one distance variable: the radius. You *could* use Cartesian x, y, and z coordinates, but (1) it’s more work, and (2) since the method you’re using isn’t enforcing spherical symmetry, you’d expect that little errors would build up over time and eventually your spherical shells wouldn’t be spherical any more.. which tends to be what happens.

In the case of spherical symmetry, choosing the right coordinates is so obvious that we don’t even notice we’re doing it. Not every geometric structure is so straightforward to handle, and appropriate coordinate choice (though important) isn’t the only way to get your equation solver to respect the properties of the system.. which is where symplectic integrators come in.

“Symplectic” comes from the Greek for “structure”, if I remember right, and the particular kind of structure that the integration is trying to preserve here is the relationship between the positions and the velocities that Newton’s laws give us, which turns out to be roughly equivalent to preserving areas. By designing our integrators in a way which respects this, we can get much better energy conservation (the total energy stays what it should), we can take much larger timesteps (speeding up the calculation by orders of magnitude), and generally do a better job of representing the long-term dynamics, the overall shape of the evolution.

For the planetary work that I do, there’s even more structure we can build in: the Sun is by far the dominant mass in the system, so to first order you can neglect all the other planets. My hero Kepler showed that the planets orbit the Sun on near-ellipses, so if we write the equations as a Kepler orbit around the Sun — which we can solve very easily — plus a little perturbation due to the other planets, then our integration method by construction keeps us close to where we want to be. This works amazingly well, but there are a number of complications I won’t get into here which mean that getting a symplectic integrator to be tuned to the Kepler problem was very challenging. It wasn’t done until 1991 by Wisdom & Holman on one side of the Pacific and Kinoshita, Yoshida, and Nakai on the other.

There’s actually a bit of a controversy over who should be credited with the result. WH were in a way closer to what we do now, but they derived it using a method which wasn’t easily generalizable. KYN were in a way further off, but used methods which have become standard because of their simplicity. (I think in one of Tremaine’s papers he wrote something to the effect that “we follow WH’s algorithm but KYN’s analysis”, which says it pretty well.) For a while in the 90s the Kepler trick I mentioned above was known as “mixed-variable symplectic” — the mixed variables being Cartesian (for the interplanet forces) and Keplerian (for the orbits around the Sun) — which I didn’t like much because it’s not obvious what the mixing is unless you already know. These days we call it the Wisdom-Holman mapping, which I don’t like because the name doesn’t tell you anything about what you’re doing, only one of the teams who dreamed it up. I’d have called it the standard Kepler mapping, or Jacobi-Kepler mapping if we want to be technical. (Jacobi here referring to the coordinates you use.)

Recently, i.e. post-1998, a descendant of the W-H map due to my old supervisor Martin Duncan, Hal Levison, and Man Hoi Lee has become more popular because it allows you to handle close encounters between the objects, which the original map couldn’t. And, again, there’s a naming problem. Duncan et al. called their coordinate system “democratic heliocentric” (where “democratic” refers to the fact that all objects apart from the Sun are treated equally in the system); John Chambers called the same coordinate system “mixed-centre” (because the positions are measured with respect to the centre of the Sun, but the velocities are measured with respect to the barycentre); and Jack Wisdom has called it “canonical heliocentric” (because the positions are with respect to the Sun and the velocities are what they have to be to make the coordinate system canonical, which means appropriate for the underlying equations). Who knows what they’ll be calling it next year?

This Duncan et al. approach is the method I use in the code I wrote for my thesis. Unfortunately, though it’s very good at handling the case where bodies get very close to one another, it’s not so good for handling a wide range of orbital radii. The inner planets, closer to the Sun, move much faster than the outer ones, and you need to choose one base timestep to integrate all the orbits on. This means that if I have an object close to the Sun then I have to choose a timestep small enough to resolve its orbit. But this can be hundreds of times smaller than I need to handle objects further out, and if an object is close enough then it can slow my simulation down by a depressing factor.

As I’ve mentioned before, one of the projects we’re working on involves “hot” Neptunes, where the “heat” here isn’t thermal but dynamical. They’re not hot in the don’t-touch-them sense, they’re “hot” because they’re moving so fast, because they’re very close to their parent stars. For example, in the system HD69380, there are three planets each with masses less than 1 Neptune mass all inside 1 AU (the Earth’s distance from the Sun). The closest planet is 0.0785 AU, or less than a tenth the Earth’s distance from the Sun, which is just plain silly. (“Who ordered that?”)

Right before Christmas we did some quick runs studying what initial conditions we’d need to reproduce this system, and found some promising results, but only by neglecting the detailed evolution of the inner part of the system.. which is exactly what we care about.

So I’m experimenting with ways to allow more distant objects to evolve on their own timesteps. There are a number of approaches in the literature, but it’s difficult to have multiple timescales and simultaneously (1) stay symplectic, (2) allow close encounters, and (3) stay fast. I can’t give up the last two. If I give up symplecticity it’s trivial, but if I do that then I have to take far more steps an orbit than I’d like, which causes speed problems. It’s probably still a net improvement, but not by enough.

Once — just once — I’d like to study a problem which doesn’t involve endless amounts of brainwork, one where I could simply use what we’ve already done and not have to dream up new methods.

*sigh*

grad F = J 13 December 2006

Posted by DSM in astronomy, faith.
comments closed

Everyone has heroes. Sometimes you’re fortunate enough to have heroes in your own line of work.

I’ve always been fond of Kepler, both scientifically and personally as a man of great integrity and peace. (In many ways he’s the anti-Tycho Brahe.) It’s not every researcher who has to take time off to defend his mother against charges of witchcraft, and whenever I start grumbling about my trivial challenges I should remember his..

In the forward to my master’s thesis, I quoted my favourite prayer of Kepler’s:

If I have been allured into brashness by the wonderful beauty of
Thy works, or if I have loved my own glory among men,
while advancing in work destined for Thy glory,
gently and mercifully pardon me:

and finally,
deign graciously to cause that these demonstrations
may lead to Thy glory, and to the salvation of souls,
and nowhere be an obstacle to that.

Amen.

Johannes Kepler
Harmonice Mundi V:IX

Since I was quoting one of the greatest men ever to work in the field, and quoting one of the most important works ever written in planetary dynamics, I didn’t think anyone would object. For the PhD I decided to cut out the middleman and go directly to Scripture, quoting the famous passage where God replies to Job:

Who is this that darkeneth counsel
by words without knowledge?
Gird up now thy loins like a man;
for I will demand of thee, and answer thou me.
Where wast thou when I laid the foundations of the earth?
Declare, if thou hast understanding.
Who hath laid the measures thereof, if thou knowest?
Or who hath stretched the line upon it?
Whereupon are the foundations thereof fastened?
Or who laid the corner stone thereof;
When the morning stars sang together,
and all the sons of God shouted for joy?

Job 38:2-7

The whole chapter’s gorgeous.

Another hero of mine is the great James Clerk Maxwell. He was unquestionably one of the best mathematical physicists in history, and as a Scot was the only physicist whose name was our kitchen wall growing up.. in a list with other great Scots, on a poster replying to some imaginary anti-Scots Englishman with proof that you couldn’t avoid Scottish inventions. Diaspora Scots: more Scots than the Scots!

Peter Woit linked to a very interesting article on Maxwell which describes not only his accomplishments in electromagnetic theory but his achievements in countless other fields. (I didn’t know he took the first colour photograph!) One thing that the article doesn’t mention, but which also endears me to him, is that Maxwell was also a scientist of deep faith, with views on the interrelationship of faith and study I find myself sympathetic to. He grew up half-Anglican and half-Presbyterian (like me!) and then started hanging out with more evangelical types in college. (Hmm, also like me.) Note that the faith of Kepler and Maxwell was a confessional one, by which I mean that it wasn’t the generic poetic deism to which several more recent scientists (e.g. Einstein) subscribed, or a wacky mix of speculations and alchemy and half-baked heresy (e.g. Newton, the last sorcerer), but something far more orthodox.

I’ll let Maxwell have the last word, in a prayer very reminiscent of Kepler’s:

Almighty God, Who hast created man in Thine own image, and made him a living soul that he might seek after Thee, and have dominion over Thy creatures, teach us to study the works of Thy hands, that we may subdue the earth to our use, and strengthen the reason for Thy service; so to receive Thy blessed Word, that we may believe on Him Whom Thou hast sent, to give us the knowledge of salvation and the remission of our sins. All of which we ask in the name of the same Jesus Christ, our Lord.

(There. Now if that post’s not Binkybait I dunno what is..)

and he was far at sea 8 December 2006

Posted by DSM in astronomy, planets.
comments closed

I’ve been brushing up on the literature about structures formed in Saturn’s rings, and pretty much everything I know from terrestrial planet formation is wrong. Robin Canup has a 1995 paper (co-authored with Larry Esposito) on accretion in the Roche zone, and it’s a crazy regime. The tidal forces due to Saturn suppress the merger of like-size bodies and runaway accretion, although self-gravity may help counteract this, and many of the Japanese teams (e.g. Daisaka and Ida, and Tanaka) have been studying the dynamics of self-gravitation-produced clumps.

One thing I’m coming to believe is that the issue of self-gravity is unrelated (at first order, anyhow) to the problem I mentioned earlier. Recall that there are these sharp features in the F-ring, and Murray et al. explain them using a simple model in which Prometheus pulls ring particles towards it when it’s nearest the ring, and then the particles oscillate back and forth, which explains why the features change direction every half-period. (Although the Cassini guys around here don’t seem to agree, it seems to me there are some F-ring features which point the wrong way for their model. I’m going to have to crunch some numbers before I declare war on the point, though, in my animations there are moments when you stop it where the differential response leads to what look like phase errors, though everything’s behaving exactly as it should.)

However, there’s a sense in which the problem they’ve solved isn’t the interesting one. As I’ve mentioned before, their model works well on a pristine ring, but doesn’t explain why the ring (after a full synodic period, when Prometheus laps the ring, like the inner car on a racetrack) doesn’t show signs of disruption on earlier passages. This is the point at which the locals tend to wave their hands and say “self-gravity” or “collisions”. I might believe the latter, but not the former: assuming the F-ring core mass is comparable to Prometheus, then the mass in the region of a feature is down by a factor of 100 or so (roughly estimating from one of my last runs). There’s no reason to believe that’s going to wash away the spikes, with or without the clumps that Daisaka et al. find.

Collisions might do it, but it’s tough to see what effect self-gravity should have, and so far in my simulations it hasn’t had any.. at least for reasonable disc masses. (You put a Jupiter mass in the F-ring and interesting things happen, but I think it’s fair to say that’s ruled out by the observations..)

To prove this, of course, I’m going to have to modify my code to handle the collisional evolution of the rings. That’s actually not going to be as difficult as it sounds: the hard parts (the close encounter resolution and the treecode) are already done and working. In principle, all I have to do is take the near-neighbour list produced by the treecode and feed that potential-encounter list into my encounter routine. In practice, I need to be careful to make sure that (1) all forces on encountering particles are being computed directly (with no tree approximations) before they’re sent off, and (2) the number of encounter candidates is kept close to the number of real encounters. My first attempt, for merely ~0.1 M particles, produced >5M encounter pairs, but almost none of those were actually going to get anywhere near each other, much less within 10 Hill radii (where the Hill radius is the size of the region in which your gravity is more important than the central body’s.)

I think I may spend time looking at the non-self-gravitating models for a while.. one thing I’ve been wondering about is whether there are any interesting dynamics with the small ring moonlets analogous to the behaviour of Earth’s quasi-satellites. That is, for the ring-crossers, how much do their orbits change qualitatively due to interactions with Prometheus, the ring, and Pandora?

unsolving the solar neutrino problem 5 December 2006

Posted by DSM in QOTD, astronomy.
comments closed

“The sun energy source [sic] is not nuclear fusion but magnetic fields from the center of the Galaxy.”

Today’s addition to my crank-science-spam folder.

UPDATE: The author sent another email, this one containing an abstract and a link to his paper on the topic — the first contained only the above line as the message subject — but I think it’s uncharitable to post the whole thing.  Some things are better passed over in silence.

walking through molasses 29 November 2006

Posted by DSM in astronomy, planets.
comments closed

Some days you feel full of energy, like you can do anything. I thought today was going to be one of those days: it was bright and blue when I walked to the office, with a cool spring-though-it’s-autumn breeze.

Since then it’s been a series of minor disasters.

Remember the Prometheus/F-ring work I’ve been doing?

I had a look at data from some sims I ran earlier this week. First it turned out I managed to get Prometheus’ eccentricity wrong: instead of being 0.002 and 0.003, it was 0.000 and 0.000. Much less interesting, although I did notice something odd that I’ll have to talk to Richard about later. Then I thought that I’d screwed things up even worse, because the self-gravitating rings had zero mass (which made the force calculations quick but utterly unnecessary).. so I deleted the useless duplicate outputs. Always a bad idea, deleting things.

Turned out that I’d used a symbolic link to point to the ring data, and the link pointed to the right place, so I’d erased data which was actually informative. Unfortunately what it’s informing me is that it doesn’t look like there’s a lot of interesting self-gravitational effects when the ring mass is comparable to Prometheus, because the mass in the region which is being strongly influenced by Prometheus is much lower. This isn’t what I was hoping for.

So I fired off yet another suite, but ran a quick low-N test-particle case to see what to expect. As predicted, after a synodic period (120 years or so), when Prometheus has managed to lap the edge of the ring, the kicks it gives the ring don’t quite match up with the kicks it gave on the earlier go-round, so the ring structure gets increasingly noisy. (Units as before.)

I don’t understand how the real ring core manages to avoid this problem and produce such clean signals. The in-house explanation works on a pristine ring over one synodic period very nicely, but I don’t see how it works on the second pass. I’m missing something obvious, I think, and I’ll ask Carl at tomorrow’s meeting.

And then a former coauthor (I have trouble saying “collaborator”.. makes it sound like you’re working with the Nazis in Vichy France or something) dropped a note asking if he could get a look at data from an earlier paper of ours for a talk he’s giving.. a talk which is next week, which means he really needs the data right now. So now to my list of things I’m behind on I have to add digging through old files and making them fit for public viewing.

Plus I ate too many of the yogurt-coated peanuts and raisins I picked up as a snack, and they’re implanting in my stomach like alien vines would on some cheap Outer Limits knockoff.

Woe, woe is me!

</self-pity>