gradient particle magnetohydrodynamics and adaptive particle refinement astrophysical fluid dynamics...

36
Gradient Particle Magnetohydrodynamics and Adaptive Particle Refinement Astrophysical Fluid Dynamics Workshop Grand Challenge Problems in Computational Astrophysics Institute for Pure and Applied Mathematics UCLA 4-9 April 2005 Gregory G. Howes Department of Astronomy UC Berkeley

Upload: norman-george

Post on 26-Dec-2015

220 views

Category:

Documents


3 download

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 ,

Sound Wave Dispersion

Polar Plot of MHD Waves

Magnetic Divergence

MHD Shocks

Kelvin-Helmholtz Instability

QuickTime™ and aGIF decompressor

are needed to see this picture.

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

hh

Adaptivity to Reduce Error

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.

Refinement

• Typical values are:

• Two tests: If

and

if

then refine (add a particle)

Unrefinement

• If

then unrefine (combine two particles)

• Typical value is:

Other Adaptivity ParametersThree parameters should control adaptive

scheme:• Minimum/Maximum scales: and • Sensitivity Threshold:

Other parameters , , and should not control the overall performance.

1-D Hydrodynamic Shock

2-D Hydrodynamic Shock

QuickTime™ and aGIF decompressor

are needed to see this picture.

2-D Magnetized Vortex

Disconnection Error

Disconnection Error and InstabilityDisconnection can cause GPM to suffer both error

and a virulent computational instability

Disconnection Instability

QuickTime™ and aGIF decompressor

are needed to see this picture.

Disconnection 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

References Fan, J. and Gijbels, I. (1996) Local Polynomial Modeling and Its Applications (New York: Chapman and Hall).

Maron, J. L. and Howes, G. G. (2003) Gradient Particle Magnetohydrodynamics: A Lagrangian Particle Code for Astrophysical Magnetohydrodynamics, ApJ, 595:564.