|
The numerical approach adopted by Woodward and Porter
models the Euler equations for mass dynamics.
Formulated in the 18th century by Swiss mathematician
Leonhard Euler, they are the simplest gas dynamics
equations -- satisfying the laws of conservation of
mass, momentum, and energy while ignoring viscosity,
magnetic fields, and -- in this case -- ionization.
Their model also approximates the core -- pumping heat
steadily into the envelope rather than computing
nuclear fusion.
By approximating physical effects, Woodward and Porter
are able to focus on the hydrodynamics, explicitly
following the movement of gas and sound through the
star, down to the smallest scale represented on their
grid. They chose sound to follow because it is the
fastest signal in red giants -- beating out photons,
which bounce randomly from one atom to another,
scattering many times before they make much progress.
Also, resolving sound in detail resolves convection
because in red giants the velocities of the two are
nearly equivalent.
Following sound explicitly requires small time steps
-- so small that a sound wave cannot cross more than one
grid cell per time step. Small time steps require many
computational cells -- in this case, 134 million (the
mesh cube is 512 grids on a side) to advance the
system by 7,000 time steps. Such a large number of
computational cells is manageable, though, because the
calculations associated with each time step are
completely local. "Our model can update the state of
the fluid at one grid point without needing to know
what is happening at other, distant grid points," says
Woodward.
Exploiting this localized model, the LCSE code divides
the model into pencils, groupings of grid cells -- 8 on
a side and 512 long -- that can be updated
independently of each other and computed in parallel
on the SGI/CRAY Origin2000. A given processor
retrieves into its cache memory a pencil from shared
memory, updates the pencil, returns it to global
shared memory, then moves on to the next pencil in the
queue. If one chunk of grid takes longer to update
than another, the next processor in line simply moves
on to the next pencil, no longer tied to a particular
computation because of its access to shared memory.
All the updates are overseen by a
self-scheduling master loop that ensures each
1D sweep is completed before it executes the next.
The ability of their
code to appropriate computing time where needed is what
enabled Woodward and Porter to treat the star's
hydrodynamically active surface more realistically
without compromising the size of the computation nor
resorting to irregular meshes or curvilinear
coordinates -- the very complicated means by which
irregular surfaces are usually computed. Their
simulation is the first to model irregular problems
-- like the red giant's pulsating surface -- on
regular 3D Cartesian grids.
"We got the best of both worlds -- irregular
boundaries but a regular internal mesh," says Porter.
"And these spherical systems are the first examples of
what we can do with this. The surface is actually free
to move through the mesh. It can deform and change its
topology. It can splash. It allows for a wider range
of fluid dynamical behavior."
Woodward concurs. "With the development of distributed
shared-memory machines we saw an opportunity to go
beyond regular calculations and do irregular types,
which opens up a whole new class of applications."
These new applications won't be limited to stellar studies
but that's where Woodward and Porter are headed. Not
satisfied with a partial simulation of a red giant, their next
goal is to peer into its very core.
|