Presentation is loading. Please wait.

Presentation is loading. Please wait.

High-order codes for astrophysical turbulence

Similar presentations


Presentation on theme: "High-order codes for astrophysical turbulence"— Presentation transcript:

1 High-order codes for astrophysical turbulence
Axel Brandenburg (Nordita, Stockholm) Boris Dintrans (Univ. Toulouse, CNRS) Lectures given at Ecole Evry Schatzman, 22 September 2009, Aussois (...just google for Pencil Code)

2 Kolmogorov spectrum nonlinearity constant flux e [cm2/s3] [cm3/s2]
E(k) e e a=2/3, b= -5/3 k

3 Scintillations Big Power Law in Sky
Armstrong, Cordes, Rickett 1981, Nature Armstrong, Rickett, Spangler 1995, ApJ

4 Simulation of turbulence at 10243
(Porter, Pouquet,& Woodward 1998)

5 Direct vs hyper at 5123 Biskamp & Müller (2000, Phys Fluids 7, 4889)
Normal diffusivity With hyperdiffusivity

6 Ideal hydro: should we be worried?
Why this k-1 tail in the power spectrum? Compressibility? PPM method Or is real?? Hyperviscosity destroys entire inertial range? Can we trust any ideal method? Needed to wait for direct simulations

7 Non-ideal equations

8 Hyperviscous, Smagorinsky, normal
height of bottleneck increased Haugen & Brandenburg (PRE, astro-ph/ ) onset of bottleneck at same position Inertial range unaffected by artificial diffusion

9 Bottleneck effect: 1D vs 3D spectra
Why did wind tunnels not show this? Compensated spectra (1D vs 3D)

10 Relation to ‘laboratory’ 1D spectra
Dobler, et al (2003, PRE 68, )

11 MAGMA

12 Pencil Code Isotropic turbulence Stratified layers Shearing box
Started in Sept with Wolfgang Dobler High order (6th order in space, 3rd order in time) Cache & memory efficient MPI, can run PacxMPI (across countries!) Maintained/developed by ~40 people (SVN) Automatic validation (over night or any time) Max resolution so far , 4096 procs Isotropic turbulence MHD, passive scl, CR Stratified layers Convection, radiation Shearing box MRI, dust, interstellar Self-gravity Sphere embedded in box Fully convective stars geodynamo Other applications Homochirality Spherical coordinates

13 Pencil formulation In CRAY days: worked with full chunks f(nx,ny,nz,nvar) Now, on SGI, nearly 100% cache misses Instead work with f(nx,nvar), i.e. one nx-pencil No cache misses, negligible work space, just 2N Can keep all components of derivative tensors Communication before sub-timestep Then evaluate all derivatives, e.g. call curl(f,iA,B) Vector potential A=f(:,:,:,iAx:iAz), B=B(nx,3)

14 Switch modules magnetic or nomagnetic (e.g. just hydro)
hydro or nohydro (e.g. kinematic dynamo) density or nodensity (burgulence) entropy or noentropy (e.g. isothermal) radiation or noradiation (solar convection, discs) dustvelocity or nodustvelocity (planetesimals) Coagulation, reaction equations Chemistry (reaction-diffusion-advection equations) Other physics modules: MHD, radiation, partial ionization, chemical reactions, selfgravity

15 High-order schemes Alternative to spectral or compact schemes
Efficiently parallelized, no transpose necessary No restriction on boundary conditions Curvilinear coordinates possible (except for singularities) 6th order central differences in space Non-conservative scheme Allows use of logarithmic density and entropy Copes well with strong stratification and temperature contrasts

16 (i) High-order spatial schemes
Main advantage: low phase errors Near boundaries: x x x x x x x x x ghost zones interior points

17 Wavenumber characteristics

18 Higher order – less viscosity

19 In the exercises: Order k Description 10 2e-5 Very sharp 6 1e-4 Ok 2
Very poor

20 Less viscosity – also in shocks

21 (ii) High-order temporal schemes
Main advantage: low amplitude errors 2N-RK3 scheme (Williamson 1980) 2nd order 3rd order 1st order

22 Low order cheaper? Order CFL Time 3 0.7 2.8 2 0.2 6.3 1 0.01 14

23 Shock tube test

24 Increase in # of auto tests

25 Evolution of code size User meetings: 2005 Copenhagen 2006 Copenhagen
2007 Stockholm 2008 Leiden 2009 Heidelberg 2010 New York

26 Pencil Code check-ins

27 Faster and bigger machines

28 Cartesian box MHD equations
Magn. Vector potential Induction Equation: Momentum and Continuity eqns Viscous force forcing function (eigenfunction of curl)

29 Vector potential B=curlA, advantage: divB=0
J=curlB=curl(curlA) =curl2A Not a disadvantage: consider Alfven waves B-formulation A-formulation 2nd der once is better than 1st der twice!

30 Comparison of A and B methods

31 256 processor run at 10243

32 Online data reduction and visualization
non-helically forced turbulence

33 Scalars on periphery of the box

34 MRI turbulence MRI = magnetorotational instability
2563 w/o hypervisc. t = 600 = 20 orbits 5123 w/o hypervisc. Dt = 60 = 2 orbits

35 Vorticity and Density See poster by Tobi Heinemann on density wave excitation!

36 Convection with shear and W
Käpylä et al (2008) with rotation without rotation

37 It can take a long time Rm=121, By, 512^3 LS dynamo not always excited

38 Transfer equation & parallelization
Processors Analytic Solution: Intrinsic Calculation Ray direction

39 The Transfer Equation & Parallelization
Processors Analytic Solution: Communication Ray direction

40 The Transfer Equation & Parallelization
Processors Analytic Solution: Intrinsic Calculation Ray direction

41 Winter School 11-22 January

42 Euler potentials Has zero magnetic helicity, A=a grad b
Strictly correct only for h=0 Or if a and b don’t depend on the same coords

43 Gauge Choice & Dissipation

44 arXiv: Paper

45 Roberts flow dynamo Agreement for t<8 For smooth fields
Not for delta-correlated Initial fields Exponential growth (A) Algebraic decay (EP)

46 Spectrum for MHD turbulence with imposed field (no dynamo!)

47 Reasons for disagreement
because dynamo field is helical? because field is three-dimensional? none of the two? EP too restrictive? because h is finite?

48 Visual comparison

49 Spurious growth for h=0 The two agree, but are underresolved

50 Simple decay problem Exponential decay for A, but not for EP!?

51 Two possible representations
Works only when a and b are not functions of the same coordinates

52 Method of choice??? It’s not because of helicity (cf nonhel dyn)
Not because of 3-D: cf. 2-D decay problem It’s really because a(x,y,z,t) and b(x,y,z,t)

53 Conclusions High-order codes: solve equations as stated
Accuracy scales with resolution to 6th power Always double-check artificial diffusion Code maintenance under SVN Community effort Automatic nightly tests


Download ppt "High-order codes for astrophysical turbulence"

Similar presentations


Ads by Google