It turns out that pure second-order spatial discretization with first-order explicit Euler timestepping is unstable for inviscid compressible flow. Because the combined fluid equations, discretized in space, are a second-order differential equation with a negative real coefficient, and thus the solution's on the imaginary axis, and a first-order explicit Euler timestep has a stability region that's a circle centered on the negative real axis and only touching the imaginary axis, so of course it doesn't ever get stable although it gets really really close if I make the timesteps small.

And that's why including the viscosity, when I was doing that by accident, makes such a difference -- it pushes the poles slightly into the negative real side of things, and suddenly we've got an actual stability region. A pretty tiny one, though, it seems, still.

And I should have remembered this, because that was actually a very specific example from one of the classes that I've taken. I don't remember where, but it somewhere I have a memory of the information that a second-order spatial discretization and a first-order explicit Euler timestepping -- that being the simplest and most obvious way to approach the problem -- doesn't work even with the hack of making the timestep really small and letting the machine crunch forever.

And, of course, once I remembered that, I felt like I should have remembered it in the first place.... But I'd thought I also remembered that a staggered grid fixed the problem, and I didn't really investigate that much. Now that my memory is cleared with being reminded, I remember that the staggered grid just fixes the checkerboarding problem; it doesn't actually add any other stability. And using a timestepping method -- say, an RK-5 for the sake of genericity, although I think a predictor-corrector step might work as well -- that's got a stability region that covers a reasonable bit of the imaginary axis ought to fix the stability problem, but it wouldn't fix the checkerboarding if I'd used a colocated grid (like my other code uses), and that's a fair part of what all the artificial dissipation takes care of.

So I understand now. Whee! All I have to do is implement it, and that should fix that (large) bug.

And I post the above, on the grounds that it was pretty much exactly my thought process as I was walking home tonight, and I figure that enough of my friends-of list presumed-readers write sf and can use it with words substituted as a template for technobabble as she is spoke by a Real Engineer

^{(tm)}, with all the caveats and entertainments thereby implied. And there's always the amusing possibility that someone might understand.

It's also a good argument for the existence of jargon; there are at least a half-dozen words in there that would take a couple of paragraphs to explain in non-jargon terms, and there's no way to have a thought-pattern like that if you've got to stop every half-sentence and explain all that.

On the other hand, I could probably outline a fairly complete computational fluid mechanics course that did little more than explain the above post. *grin*

- Brooks

## Error

Your reply will be screened

Your IP address will be recorded

You must follow the Privacy Policy and Google Terms of use.