How we look inside stars: stellar evolution codes & Mathieu - - PowerPoint PPT Presentation

how we look inside stars stellar evolution codes
SMART_READER_LITE
LIVE PREVIEW

How we look inside stars: stellar evolution codes & Mathieu - - PowerPoint PPT Presentation

Computational Astrophysics 18/01/16 How we look inside stars: stellar evolution codes & Mathieu Renzo, PhD student @ API, UvA Traditional scientific knowledge has generally taken the form of either theory or experimental data.


slide-1
SLIDE 1

Computational Astrophysics – 18/01/16

How we “look” inside stars: stellar evolution codes &

Mathieu Renzo, PhD student @ API, UvA “Traditional scientific knowledge has generally taken the form of either theory or experimental data. However, where theory and experiment stumble, simulations may offer a third way.” Simulation, Johannes Lenhard et al.

1 / 24

slide-2
SLIDE 2

Outline

The most important thing What is (Computational) “Stellar Astrophysics”? The stellar evolution code

  • Basic Assumptions
  • Discretization
  • Translation of the Physics for the Computer
  • Example of input Physics: Nuclear Reaction Networks
  • How the Computer Solves the Equations

What do I do with it?

2 / 24

slide-3
SLIDE 3

Outline

The most important thing What is (Computational) “Stellar Astrophysics”? The stellar evolution code

  • Basic Assumptions
  • Discretization
  • Translation of the Physics for the Computer
  • Example of input Physics: Nuclear Reaction Networks
  • How the Computer Solves the Equations

What do I do with it?

3 / 24

slide-4
SLIDE 4

The most important thing

This is what should not happen grep is your friend! (see man grep on *nix)

4 / 24

slide-5
SLIDE 5

Outline

The most important thing What is (Computational) “Stellar Astrophysics”? The stellar evolution code

  • Basic Assumptions
  • Discretization
  • Translation of the Physics for the Computer
  • Example of input Physics: Nuclear Reaction Networks
  • How the Computer Solves the Equations

What do I do with it?

5 / 24

slide-6
SLIDE 6

How can we “look” inside a star?

Figures Credits: NASA

?

6 / 24

slide-7
SLIDE 7

How can we “look” inside a star?

Figures Credits: NASA

?

We simply can’t!!

Other Q: How can we observe how one star evolves?

6 / 24

slide-8
SLIDE 8

So what to do?

1 Build a theory from first

principles;

2 Plug it in a computer; 3 Get out a model; 4 Find a smart way to

compare it to what we can observe.

Advantages

  • Full control over the parameters

⇒ Numerical Experiments;

  • Allow to focus on interesting

things (e.g. no reddening!);

  • Allow to deal with long-lasting,

rare, inaccessible phenomena;

Drawbacks

  • Numerical errors;
  • Limited computational resources;
  • Nature ≫ Theory ≫ Model.

“All models are wrong, but some are useful” – G. Box

7 / 24

slide-9
SLIDE 9

Outline

The most important thing What is (Computational) “Stellar Astrophysics”? The stellar evolution code

  • Basic Assumptions
  • Discretization
  • Translation of the Physics for the Computer
  • Example of input Physics: Nuclear Reaction Networks
  • How the Computer Solves the Equations

What do I do with it?

8 / 24

slide-10
SLIDE 10

The Stellar Evolution Code: is a tool, not a theory!

What does it stand for?

Modules for Experiments in Stellar Astrophysics

References: Paxton et al. 2011, ApJs192,3 Paxton et al. 2013, ApJs208,4 Paxton et al. 2015, ApJs220,15 mesa.sourceforge.net mesastar.org

Open Source ⇔ Open Know How “An algorithm must be seen to be believed” – D. Knuth

How to get MESA: svn co -r 7624 svn://svn.code.sf.net/p/mesa/code/trunk mesa9 / 24

slide-11
SLIDE 11

Modules overview

10 / 24

slide-12
SLIDE 12

Numerical Methods: 1D (or 1.5D) Prohibitive computational cost of 3D simulations

⇒ 1D, but stars are not spherical-symmetric!

Need of parametric approximations for:

  • Rotation ⇒ “Shellular Approximation”;
  • Magnetic Fields;
  • Convection ⇒ Mixing Length Theory (MLT);
  • (Some) mixing processes;
  • ...

Beware of systematic errors!

(Recall: Nature ≫ Model)

11 / 24

slide-13
SLIDE 13

Numerical Methods: Hydrostatic code...

dP dr = −Gm(r)ρ r2 ... but stars are not necessarily static!

Figure: η Car, APOD.

Other examples:

  • He flash,
  • Outburst and Eruptions,
  • Impulsive mass loss,
  • RLOF

,

  • ...

12 / 24

slide-14
SLIDE 14

Numerical Methods: Discretization

For numerical solutions: df dx → f(xk+1) − f(xk) xk+1 − xk

⇒ Discretization of space (mesh or grid) and

time (timesteps)

(Recall: Nature ≫ Model)

13 / 24

slide-15
SLIDE 15

Spatial Discretization (Meshing)

toward surface toward center mk−1, rk−1, Lk−1, vk−1, ...

face k-1

mk, rk, Lk, vk, σ σ

k,

, , Fi,k , dmk P

k, T k, ∇T , k

face k

mk+1, rk+1, Lk+1, vk+1,

k+1, Fi,k+1, ...

face k+ 1

dmk−1 ρk−1, Tk−1, Xi,k−1, Pk−1, ...

cell k-1

dmk ρk, Tk, Xi,k, Pk, ∇

ad,k εnuc,k εgrav,k

cell k

Figure: From Paxton et al. 2011, ApJs, 192, 3

  • Intensive quantities

(e.g. T,ρ) averaged by mass within each cell;

  • Extensive quantities

(e.g. m,L) calculated at outer cell boundary.

Need to check that your physical results do not depend on the way you discretize space.

14 / 24

slide-16
SLIDE 16

Numerical Methods: Timestep selection

∆tn: Large enough, but τKH, τ ˙

M, etc.

Need to find the best ∆tn at each step – few×100total n few×104

15 / 24

slide-17
SLIDE 17

Reformulation of the (1D–) Equations

Physical Theory: Numerical Implementation:

dP dr = − Gm(r)ρ r 2

  • +

F 4πr 2

dm dr = 4πr 2ρ

dT dr = − 3 16πac κρL r 2T 3

dL dr = 4πr 2ρε

⇔ P ≡ P(ρ, µ, T) ⇔

dXi dt

  • r

=

j

Pj,i(T, ρ) − ∑

k

Di,k(T, rho, )

  • +
  • σi∇2Xi

16 / 24

slide-18
SLIDE 18

Reformulation of the (1D–) Equations

Physical Theory: Numerical Implementation:

dP dr = − Gm(r)ρ r 2

  • +

F 4πr 2

Pk−1−Pk 0.5(dmk−1−dmk) = − Gmk 4πr 4

k −

ak 4πr 2

k

dm dr = 4πr 2ρ

⇔ ln(rk) = 1

3 ln

  • r 3

k+1 + 3 4π dmk ρk

  • dT

dr = − 3 16πac κρL r 2T 3

Tk−1−Tk (dmk−1−dmk)/2 = −∇T,k

  • dP

dm

  • k
  • ˜

Tk ˜ Pk dL dr = 4πr 2ρε

⇔ Lk − Lk+1 = dmk{εnuc − εν + εgrav} P ≡ P(ρ, µ, T) ⇔ P ≡ P(ρ, µ, T)

dXi dt

  • r

=

j

Pj,i(T, ρ) − ∑

k

Di,k(T, rho, )

  • +
  • σi∇2Xi

Xi,k(tn + ∆tn+1) = Xi,k(tn) + ∆tn+1

  • dXi,k

dt

  • nuc + (Xi,k−Xi,k−1)σk ∆tn+1

0.5(dmk−1−dmk)

16 / 24

slide-19
SLIDE 19

Reformulation of the (1D–) Equations

Physical Theory: Numerical Implementation:

dP dr = − Gm(r)ρ r 2

  • +

F 4πr 2

Pk−1−Pk 0.5(dmk−1−dmk) = − Gmk 4πr 4

k −

ak 4πr 2

k

dm dr = 4πr 2ρ

⇔ ln(rk) = 1

3 ln

  • r 3

k+1 + 3 4π dmk ρk

  • dT

dr = − 3 16πac κρL r 2T 3

Tk−1−Tk (dmk−1−dmk)/2 = −∇T,k

  • dP

dm

  • k
  • ˜

Tk ˜ Pk dL dr = 4πr 2ρε

⇔ Lk − Lk+1 = dmk{εnuc − εν + εgrav} P ≡ P(ρ, µ, T) ⇔ P ≡ P(ρ, µ, T)

dXi dt

  • r

=

j

Pj,i(T, ρ) − ∑

k

Di,k(T, rho, )

  • +
  • σi∇2Xi

Xi,k(tn + ∆tn+1) = Xi,k(tn) + ∆tn+1

  • dXi,k

dt

  • nuc + (Xi,k−Xi,k−1)σk ∆tn+1

0.5(dmk−1−dmk)

16 / 24

slide-20
SLIDE 20

Reformulation of the (1D–) Equations

Physical Theory: Numerical Implementation:

dP dr = − Gm(r)ρ r 2

  • +

F 4πr 2

Pk−1−Pk 0.5(dmk−1−dmk) = − Gmk 4πr 4

k −

ak 4πr 2

k

dm dr = 4πr 2ρ

⇔ ln(rk) = 1

3ln

  • r 3

k+1 + 3 4π dmk ρk

  • dT

dr = − 3 16πac κρL r 2T 3

Tk−1−Tk (dmk−1−dmk)/2 = −∇T,k

  • dP

dm

  • k
  • ˜

Tk ˜ Pk dL dr = 4πr 2ρε

⇔ Lk − Lk+1 = dmk{εnuc − εν + εgrav} P ≡ P(ρ, µ, T) ⇔ P ≡ P(ρ, µ, T)

dXi dt

  • r

=

j

Pj,i(T, ρ) − ∑

k

Di,k(T, rho, )

  • +
  • σi∇2Xi

Xi,k(tn + ∆tn+1) = Xi,k(tn) + ∆tn+1

  • dXi,k

dt

  • nuc + (Xi,k−Xi,k−1)σk ∆tn+1

0.5(dmk−1−dmk)

16 / 24

slide-21
SLIDE 21

Reformulation of the (1D–) Equations

Physical Theory: Numerical Implementation:

dP dr = − Gm(r)ρ r 2

  • +

F 4πr 2

Pk−1−Pk 0.5(dmk−1−dmk) = − Gmk 4πr 4

k −

ak 4πr 2

k

dm dr = 4πr 2ρ

⇔ ln(rk) = 1

3ln

  • r 3

k+1 + 3 4π dmk ρk

  • dT

dr = − 3 16πac κρL r 2T 3

Tk−1−Tk (dmk−1−dmk)/2 = −∇T,k

  • dP

dm

  • k
  • ˜

Tk ˜ Pk dL dr = 4πr 2ρε

⇔ Lk − Lk+1 = dmk{εnuc − εν + εgrav} P ≡ P(ρ, µ, T) ⇔ P ≡ P(ρ, µ, T)

dXi dt

  • r

=

j

Pj,i(T, ρ) − ∑

k

Di,k(T, rho, )

  • +
  • σi∇2Xi

Xi,k(tn + ∆tn+1) = Xi,k(tn) + ∆tn+1

  • dXi,k

dt

  • nuc + (Xi,k−Xi,k−1)σk ∆tn+1

0.5(dmk−1−dmk)

16 / 24

slide-22
SLIDE 22

Numerical Methods: Nuclear Networks

What matters:

  • Total Number
  • f Isotopes Niso;
  • Which Isotopes;
  • Number of Nuclear

Reactions.

(Ex. of) tricks under the hood:

  • Compound reactions, e.g. 3α:

α + α → 8Be + α → 12C + γ;

  • (Quasi Statistical Equilibrium

Networks for advanced burning stages); High impact on:

  • Computational cost (∝ N2

iso)

⇒ Run time;

  • εnuc ⇒ L, Tc, ρc, etc.;
  • Free electrons (Ye) ⇒

Final fate (BH,NS, WD, etc.)

17 / 24

slide-23
SLIDE 23

Numerical Methods: The Matrix to Solve

P T L R

1H 3He 4He 12C 14N 16O 20Ne 24Mg

Variables Equations for cell k

cell k-1 cell k cell k+1

d(structk) d(structk-1) d(chemk) d(chemk-1) d(chemk) d(chemk+1) d(chemk) d(chemk) d(chemk) d(structk) d(structk) d(structk+1) d(structk) d(structk) d(structk) d(chemk)

Figure: From Paxton et al. 2013, ApJs, 208, 4. Black dots are non-zero entries.

18 / 24

slide-24
SLIDE 24

Numerical Methods: Algorithm

  • MESA solves simultaneously the fully coupled set for

the structure and composition;

  • Henyey code: varies all the quantities in each zone until an acceptable

solution is found (= Shooting Method);

  • Generalized Newton-Raphson solver (⇒ FIRST ORDER):

0 = F(y) ≃ F(yi + δyi) = F(yi) + dF(y) dy

  • i

δyi + O((δyi)2) ; δyi ≃ − F(yi)

  • dF(y)

dy

  • i

⇐ yi+1 = yi + δyi Figure: From Wikipedia

19 / 24

slide-25
SLIDE 25

Numerical Methods: NR-Solver Iterations

1 2 3 4 5 6 7 8 9 M[M⊙] 0.0 1.0 2.0 3.0 4.0 5.0 T[107K] M = 9M⊙, Z = Z⊙, custom initial model, TAMS 1st iter 2nd iter 3rd iter 4th iter 5th iter Figure: Two models after the end of core hydrogen burning

20 / 24

slide-26
SLIDE 26

Outline

The most important thing What is (Computational) “Stellar Astrophysics”? The stellar evolution code

  • Basic Assumptions
  • Discretization
  • Translation of the Physics for the Computer
  • Example of input Physics: Nuclear Reaction Networks
  • How the Computer Solves the Equations

What do I do with it?

21 / 24

slide-27
SLIDE 27

What do I do with ? Massive Stars

22 / 24

slide-28
SLIDE 28

Wind Mass Loss in Evolutionary Codes

Figure: From Smith 2014, ARA&A, 52, 487S

(Semi–)Empirical parametric models. Uncertainties encapsulated in efficiency factor: ˙ M(L, Teff, Z, R, M, ...)

η ˙ M(L, Teff, Z, R, M, ...)

η is a free parameter:

η ∈ [0, +∞)

23 / 24

slide-29
SLIDE 29

My current problem:

  • I Want to see small effects ⇒ need high spatial resolution (⇔

also high temporal resolution);

  • I want to see them right-before the SN-explosion ⇒ need to deal

with advanced burning stages ⇒ Need Large Nuclear Reaction Network; Typically:

# cells NZ ∼ 105 − 106 # isotopes Niso ≥ 200 64bit float ∼ 8 bytes ⇒ N ≃ Nz × Niso ∼ 108 ⇒ N 2 × (8 bytes) ∼ 1017 bytes ∼ 108 Gb!!

24 / 24

slide-30
SLIDE 30

My current problem:

  • I Want to see small effects ⇒ need high spatial resolution (⇔

also high temporal resolution);

  • I want to see them right-before the SN-explosion ⇒ need to deal

with advanced burning stages ⇒ Need Large Nuclear Reaction Network; Typically:

# cells NZ ∼ 105 − 106 # isotopes Niso ≥ 200 64bit float ∼ 8 bytes ⇒ N ≃ Nz × Niso ∼ 108 ⇒ N 2 × (8 bytes) ∼ 1017 bytes ∼ 108 Gb!! How can solve it?

Lower Nz &

Fig: Cartesius

slide-31
SLIDE 31

My current problem:

  • I Want to see small effects ⇒ need high spatial resolution (⇔

also high temporal resolution);

  • I want to see them right-before the SN-explosion ⇒ need to deal

with advanced burning stages ⇒ Need Large Nuclear Reaction Network; Typically:

# cells NZ ∼ 105 − 106 # isotopes Niso ≥ 200 64bit float ∼ 8 bytes ⇒ N ≃ Nz × Niso ∼ 108 ⇒ N 2 × (8 bytes) ∼ 1017 bytes ∼ 108 Gb!! How can solve it?

Lower Nz &

Fig: Cartesius

Thank you for your attention!

24 / 24

slide-32
SLIDE 32

Numerical Methods: Timestep selection

To choose the next timestep ∆tn+1:

1 vc ≤ vt ∼ 10−4, vc unweighted average over all cells of the

relative variations of log10(R), log10(T), log10(ρ): ∆tn+1 = ∆tn × g g(vt/vc,n)g(vt/vc,n−1) g(∆tn/∆tn−1) 1/4 g(x) def

= 1 + 2 tan−1(0.5(x − 1)) ;

2 extra controls on relative variations of many quantities (Xi,k,

εnuc,k, Lk, Teff, etc.); It is always possible that you need to reduce ∆tn If MESA fails: first retry then backup Back

25 / 24