22
Physical processes by characteristic timescale Diffusive timescale Sound-crossing timescale Flow timescale Free-fall timescale Cooling timescale Reaction timescale t flow ~ L u t sound ~ L a t ff ~ 1 G t diff ~ L 2 D t cool ~ ∣− ∣ t react ~ min i X i X i ~ 1 max i j X j R ij largest smallest

Physical processes by characteristic timescale

  • Upload
    others

  • View
    10

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Physical processes by characteristic timescale

Physical processes by characteristic timescale

Diffusive timescale

Sound­crossing timescale

Flow timescale

Free­fall timescale

Cooling timescale

Reaction timescale

t flow~Lu

t sound~La

t ff~1

G

t diff~L2

D

t cool~∣−∣

t react~mini

X i

∣X i∣~

1maxi∣∑j

X j Rij∣

largest

smallest

Page 2: Physical processes by characteristic timescale

Continuity equation source terms

Multiple fluid components

Reactions that convert one fluid component into another

Mass diffusion – usually negligible in astrophysical settings

123...N f=

X1X2X3...X N f=1} X i≡

i

∂i

∂ t∇⋅i u=0

∂X i

∂ tu⋅∇ X i=0

∂∂ t∇⋅u=∇⋅[D∇ ]

∂X i

∂ tu⋅∇ X i=∑

j=1

N f

X i X j R ij

Page 3: Physical processes by characteristic timescale

Importance of conservation in continuity equations

The sum is not always preserved by an update step:

● Interpolants:  different flattening of the Xi

● Source terms:  not always guaranteed to preserve sum

Solutions:

● Rescaling

● Restricting

Problem:  no error control

● Solving only Nf–1 equations

Problem:  error tends to accumulate in the assumed fluid abundance

● Flatten all abundances when                           , otherwise none of them

Problem:  reduces spatial order, leads to numerical mixing 

∑ X i=1

X i X i

∑ jX j

X i min[1,max 0, X i]

X N f=1−∑

j=1

N f−1

X j

∣∑ X i−1∣

Page 4: Physical processes by characteristic timescale

Momentum equation source terms

Gravitational forces and viscosity

For momentum equation these terms can be written as the divergence of a conserved flux.

Can also have “true” momentum source terms:  e.g., AGN jets modelled as pistons

∂ u∂ t∇⋅u u ∇ P=g∇⋅D

=∇⋅[GD ]  

Page 5: Physical processes by characteristic timescale

Energy equation source terms

Energy sources/sinks – gravity, radiation

Thermal conduction and viscous heating

Equation of state

for ideal gases:  Dalton's law of partial pressures

∂∂ tu⋅∇

P∇⋅u=

∂ E∂ t∇⋅[EPu ]=u⋅g−

≡ , T , X1 ,... , X N f

∂∂ tu⋅∇

P∇⋅u=∇⋅[K ∇] 1

2∥D∥2

Dij=∂u i

∂ x j

∂u j

∂ x i

−23ij∇⋅u

P=P 1 ,T P2 , T ...P N f, T

Page 6: Physical processes by characteristic timescale

Unsplit methods

Solve the advection, diffusion, and source terms together

e.g., upwind differencing for advection, FTCS for diffusion, and FT for source:

where   s = 1 if uin < 0, s = 0 if u

in > 0

Advantage: avoids errors introduced by operator splitting

Disadvantage: difficult to develop Godunov­type methods and multidimensionalmethods; usually no exact solution to Riemann problem

∂ q∂ t=−∂ qu∂ xD∂2 q

∂ x 2

q in1=q i

n− t x [ qui s

n −qu is−1n − D

x q i1n −2 qi

nqi−1n −i

n]

Page 7: Physical processes by characteristic timescale

Split (fractional­step) methods

Apply difference operators for each piece of physics in sequence.  Consider

First order (time):

Second order (time) – Strang splitting:

With operator splitting we cannot do better than the time accuracy of the splitting method, no matter what the accuracy of the component operators is.

Solve the advection part of our equation with a standard CFD method, with the diffusion terms split off and solved with a parabolic solver, and the source terms split off and solved with an ordinary differential equation solver:

∂q∂ t=−∂ qu∂ xD∂2 q∂ x 2 {

∂q∂ t=−∂ qu∂ x

∂ q∂ t=D∂2 q∂ x2

d qd t=

D[q] = D1

1/2[D2

1/2[D3

1/2[D3

1/2[D2

1/2[D1

1/2[q]]]]]] + O(t2)

D[q] = D1[D

2[D

3[q]]] + O(t)

D = D1 + D

2 + D

3

Page 8: Physical processes by characteristic timescale

Stiffness

Often have very different timescales for flow and source terms.

e.g., thermonuclear runaway in a white dwarf (Type Ia supernova)

nuclear burning timescale (12C + 12C)

sound­crossing timescale 

If we stick to explicit time­integration schemes, we are forced to integrate on the shortest timescale in order to maintain numerical stability!

Yet doing everything implicitly causes problems when shock waves are involved.

So commonly we:

● Use explicit methods for longest­timescale physics (advection, diffusion)● Use implicit methods for shortest­timescale physics (reactions, diffusion)● Set timestep using explicit method and then “sub­cycle” the implicit method

t burn~~ 4×1018 n

cm−3 −1

sec~ 10−12 sec∙

t sound ~Ra~

6×108 cm2×10−2 c

~ 1 sec

Page 9: Physical processes by characteristic timescale

Sub­cycling

Intervals tn between    determined by stability needs of explicit scheme

Intervals tn,m

 between    determined by accuracy needs of implicit scheme; last 

interval set to make tn,mmax

 = tn+1

Cannot have tn ≫ max

m t

n,m – causes advection and source terms to decouple

t

q(x,t)

tn

tn+1

tn+2

qn

qn+1

qn+2

advection

source term

total

tn,1

tn,2

tn,3

tn,4

tn,5

tn,6

tn,7

Page 10: Physical processes by characteristic timescale

Explicit ODE methods

Consider the system of linear ordinary differential equations

with A symmetric and positive definite (all positive eigenvalues).

The number of elements in the vector q is the number of simultaneous source­term equations we are solving.  One such system is solved for every zone in our grid.

Forward Euler (explicit) differencing gives

For stability, the timestep must satisfy

where max

 is the maximum eigenvalue of A.

d qdt=−A⋅q

qm1=I−A t ⋅qm

∣1−max t∣1 ⇒ t2max

Page 11: Physical processes by characteristic timescale

Runge­Kutta methods

Explicit ODE integration schemes that achieve higher order than forward Euler by computing derivatives at intermediate points

Combine with adaptive step size control for robust integration to modest accuracy (~ 10­4) – either by halving t or by combining different orders to get error estimate (“embedding”)

Second­order Runge­Kutta (midpoint method):

Fourth­order Runge­Kutta method:

k1= t f t m ,qm

k2= t f tm12 t ,qm

12

k1qm1=qmk2O t 3

k1= t f tm , qm

k2= t f tm12 t , qm

12

k1k3= t f tm

12 t , qm

12

k2k4= t f tm t , qmk3

qm1=qm16

k113

k213

k316

k4O t 5

t

q(t)

tm

tm+1

qm qm+1

k1

k2

tm+1/2

k3

k4

Page 12: Physical processes by characteristic timescale

Bulirsch­Stoer method

Can also use midpoint method on successively smaller intervals t and use Richardson extrapolation to estimate solution at t  0.

Advantage:  much more efficient than Runge­Kutta for large systems & high accuracyDisadvantage:  not as robust for nonsmooth or singular source terms

t

q(t)

tm

tm+1

qm

qm+1

2 steps

4 steps6 steps∞ steps

Page 13: Physical processes by characteristic timescale

Implicit and semi­implicit ODE methods

Backward Euler (implicit) differencing gives

which is unconditionally stable, since

for all eigenvalues  and timesteps t.

For nonlinear systems of equations

we use Newton's method:

∂f/∂q is the Jacobian matrix.  This type of method is called semi­implicit.

qm1=qm−A qm1 t

qm1=IA t −1⋅qm

1 t −11

d qdt=f q qm1=qmf qm1 t

qm1=qm t [ I− t∂ f∂q∣m]

−1

⋅f qm

Page 14: Physical processes by characteristic timescale

Rosenbrock methods

Semi­implicit generalization of Runge­Kutta methods.

Look for a solution of the form

where

s is the order of the method.

By combining third­ and fourth­ order methods, can obtain an estimate of truncation error to use for adaptive step size control.

Method is not guaranteed to be stable (semi­implicit), but fairly robust nevertheless, even for nonsmooth right­hand sides (e.g., from tabular interpolation).

For large vectors q (> 10 elements) and high accuracy (< 10­5), methods based on Richardson extrapolation are more efficient.

qm1=qm∑i=1

s

c i ki

I− t∂ f∂q∣m⋅ki= t f qm∑

j=1

i−1

ij k j t∂ f∂q∣m⋅∑j=1

i−1

ij k j

Page 15: Physical processes by characteristic timescale

Intermission

Page 16: Physical processes by characteristic timescale

Reaction networks – example:  diffuse gas + radiation

Partially or fully ionized diffuse gas experiences several types of “reaction:”

● Photoionization: X +   X+ + e● Recombination: X+ + e  X + ● Photon absorption: X +   X*● Photon emission: X*  X +  ● Stimulated emission: X* +   X + 2 ● Collisional excitation: X + e  X* + e● Collisional ionization: X + e  X+ + 2e +  ● Charge exchange: X + p  X+ + H● Dielectronic recombination: X+ + e  X*● Bremsstrahlung: X + e  X + e +  ● ...

Again, we treat different elements and ionization states as different fluids:

H0, H+, H–, He0, He+, He++, ...

Overall charge neutrality gives free electron number density:

In optically thin limit all radiation escapes; in optically thick limit it is absorbed; in other regimes we need to keep track of radiation field and do radiation transfer

ne=∑iZ i ni

Page 17: Physical processes by characteristic timescale

Thermal and ionization equilibrium

If we have local thermodynamic equilibrium conditions (necessary for a fluid approach!), the Boltzmann relation gives relative abundances of excited states:

ni

= number density of atomic/ionic species in ith excited state

n = total number density of speciesU

i= partition function for ith state

gi

= statistical weight for ith state

Ei

= energy of ith state relative to ground state

If we have ionization equilibrium conditions, we can use Saha equation to determine ionic abundances rather than following them separately:

ni

= number density of ions in ionization state i

ne

= free electron number density

Ui

= partition function for ionization state i

i

= ionization energy of for ionization state i

Then we just track the atomic abundances and use the Saha equation whenever we need an ionic abundance.

n i1 ne

n i

=2U i1

Ui 2me kT

h2 3 /2 e−i /kT

n i=n

U i

gi e−E i/ kT

Page 18: Physical processes by characteristic timescale

Collisional ionization equilibrium

A common situation in the intergalactic medium is collisional ionization equilibrium, in which atoms are collisionally ionized and radiatively recombine.  If the gas is optically thin, this causes a net loss of energy from the gas.

Treat this situation using:

● One continuity equation for each element (or a single metallicity for all of them)

● Ionization fraction is a known function of temperature and abundances – use to determine n

e (needed for emissivity and equation of state)

● Radiative cooling via a local energy sink term – cooling rate is a known function of density, temperature, and abundances:

n X ,i≡nX , iT , nH , nH , nHe , nHe , nHe ,...

P= ne∑X ,inX , i kT

d dt=−T , nH , ...

Page 19: Physical processes by characteristic timescale

Radiative cooling rate for collisionally ionized gas

Primordial abundances (from Black 1981)

        4              5              6              7              8log T (K)

log 

/nH

2  (er

g s­1

 cm

3 )­22

­23

­24

­25

H

H

H

He+

He+

He+

HeHe

totalexcitationionization

recombinationbremsstrahlung

Page 20: Physical processes by characteristic timescale

Photoionization equilibrium

Another common situation:  a source of ultraviolet photons ionizes nearby gas; medium is optically thick to recombination photons (“Strömgren sphere”)

In the interior of the nebula the ionization state is setby the equilibrium between:

● Photoionization by photons from central sourceand from locally produced recombination photons

● Collisional ionization by local free electrons● Recombination

The size of the nebula increases with time unlesscollisional processes produce radiation that can escape.

Inside cloud treat using:● Ionic abundances from photoionization equilibrium given known external photon 

source:  varying optical depth to known source, local recombination radiation produces local re­ionization (“on­the­spot” approximation)

● Net heating source term for energy equation includes collisional cooling effects● Near the edge of the cloud finite optical depth to local recombination photons 

must be taken into account

Neutral gas

Ionized gas

0.01 pc

5 pc

O star

Page 21: Physical processes by characteristic timescale

Photoionization equilibrium – 2

Case 1:  no external radiation field, optically thin, collisional cooling only – T decreases with time

Case 2:  known external radiation field, net photoionization energy input exceeds collisional cooling rate – T increases with time

Case 3:  known external radiation field, collisional cooling rate exceeds net photoionization energy input – T decreases with time

Case 4:  known external radiation field, net photoionization energy input balances collisional cooling – thermal equilibrium

((    ))

((    ))

((    ))

Page 22: Physical processes by characteristic timescale

Cooling curves including photoionization

Representative curves for uniform external J = 10­22(

L/) erg s­1 cm­2 sr­1 Hz­1  (N. Katz)

● At lower density, almost complete ionization – so gas transparent to recombination photons, allowing them to act as a coolant

● At higher density, recombination photons are locally absorbed – cooling occurs by collisionally excited line emission and bremsstrahlung

      4          5          6           7          8log T (K)

log 

|–

|/n H

2  (er

g s­1

 cm

3 )

­22

­23

­24

­25

nH = 2.89×10­6 cm­3 n

H = 2.89×10­3 cm­3

      4          5          6           7          8log T (K)

­22

­23

­24

­25

Heating

Equilibrium temperature