gradient particle magnetohydrodynamics and adaptive particle refinement astrophysical fluid dynamics...
TRANSCRIPT
Gradient Particle Magnetohydrodynamics
and Adaptive Particle
Refinement
Astrophysical Fluid Dynamics WorkshopGrand Challenge Problems in Computational Astrophysics
Institute for Pure and Applied Mathematics UCLA
4-9 April 2005
Gregory G. HowesDepartment of Astronomy
UC Berkeley
Collaborators
Steve Cowley, Mark MorrisUCLA Department of Physics and
Astronomy
Jim McWilliamsUCLA Department of Atmospheric Science
Jason MaronAmerican Museum of Natural History
Outline1. Gradient Particle Magnetohydrodynamics (GPM):
a) Astrophysical Motivationb) Lagrangian Methodsc) GPM Algorithm (see Maron and Howes (2003) ApJ,
595:564.)
d) Convergence and Stabilitye) Magnetic Divergencef ) Test Results for Standard GPMg) Potential Weaknessesh) Error in Lagrangian Methods
2. Adaptive Particle Refinement:a) Strategy for Achieving General
Adaptivityb) Preliminary Results
3. Disconnection Error and Computational Instability
Astrophysical Motivation
Galactic Magnetic Field• To understand the origin and evolution of the large-scale Galactic magnetic field• Focus on the effect of the global geometry on the field
Supernova explosion
Vertical Field in Center B ~1mG
Horizontal Field in Disc B ~ 3μG
R ~ 10 kpc
Why Lagrangian?Advantages
Disadvantages
• Inherently adaptive (but only in density)• Easier implementation and setup• No preferred direction
• Typically lower order of convergence• More noisy than grid-based methods• MHD is notoriously difficult
Lagrangian MHD Simulation
Advancement in time requires knowledge of the values and gradients at the particle
position
General Idea Behind GPM
h
The gradient is recovered by a local polynomial least squares fit.
The local neighborhood is sampled by all particles within the a smoothing sphere, weighted by a smoothing function.
Gradient Particle Magnetohydrodynamics (GPM)
• Consider a fluid quantity with 1-D spatial profile• Constructing the quantities
• Substituting for , we obtain a matrix equation for the mean , and the gradient .
• In 3-D, a 2nd-order fit yields a 10 x 10 matrix
Convergence PropertiesFan and Gijbels (1996) review two decades
of progress studying Local Polynomial Regression in Statistics• For a th-order fit over smoothing radius ,the local truncation error in th derivative is
of order
• The optimal kernel (minimizing mean squared error) is the Epanechnikov kernel,
The error for the 2nd order GPM algorithm for fitting gradients ( ) is thus .
Stability PropertiesNo rigorous proof of computational stability exists
• Smoothing: In practice, periodic smoothing over the sphere is necessary to inhibit growth of noise and maintain stability. • Particle Separation: Particle separation both improves stability and ensures better efficiency by preventing two particles from sampling the same point.
Magnetic Divergence• The induction equation can be written in terms of vector potential
with magnetic field calculated in an intermediate step
• This works for most applications, but requires twoderivatives to yield the gradient of magnetic field.• In some applications, the resulting error can swamp the gradual accumulation of magnetic field over long time periods.
A better alternative exists . . .
Lagrange Multipliers for
• Add magnetic divergence constraint to minimization as a Lagrange multiplier,
with no guarantee that
• Smoothing is necessary to maintain for particle values.
• The GPM algorithm minimizes the weighted least squares fit for each magnetic field component ,
Potential Weaknesses of GPM
• Not conservative
• Divergence cleaning may be inadequate or cause excessive smoothing of magnetic field
• Smoothing periodically is required for stability
• Adaptivity is based only on density
• Robustness to unfavorable particle distributions
Error in Lagrangian Methods
Truncation Error: • Error in local least squares fit• Adaptive methods can reduce
this error
Disconnection Error:• Error arising from poor sampling
within the smoothing sphere• Adaptive methods adjusting to the
error in the local fit do not resolve this
problem• Requires correction separate from
adaptivity
Two types of error plague Lagrangian methods
h
Adaptive Particle Refinement
Error EstimationAMR: Richardson Extrapolation
• Repeat calculation at same order but different resolutionAPR:
• Repeat calculation at same resolution but different order
For an order fit at position , denoted by
Refinement/unrefinement is determined by the ratios
, , and .
Refine, Unrefine, or Smooth?Depending on the quality of the fit, you must
choose to refine, smooth, unrefine, or do nothing.
Other Adaptivity ParametersThree parameters should control adaptive
scheme:• Minimum/Maximum scales: and • Sensitivity Threshold:
Other parameters , , and should not control the overall performance.
Disconnection Error and InstabilityDisconnection can cause GPM to suffer both error
and a virulent computational instability
Correction for Disconnection
Two measures prevent disconnection
1. If quadrant contains no neighbor,
add particle in center of that
quadrant
2. If the closest neighbor in each
quadrant is not a mutual neighbor, add a particle
midwayin between
Summary• Gradient Particle Magnetohydrodynamics (GPM): - New numerical method for Lagrangian particle simulation of astrophysical MHD systems
• Adaptive Particle Refinement (APR):- Strategy to introduce general adaptivity to
Lagrangian particle methods- Preliminary results are promising
• Disconnection Error and Instability:- Disconnection can wreak havoc in
Lagrangian particle codes- Ensuring mutual neighbors can reduce the
error and prevent growth of the instability