Antares Codes and Applications to Structures in Galaxies CFD-MHD GROUP (ASIAA)
Total Page:16
File Type:pdf, Size:1020Kb
Antares Codes and applications to structures in galaxies CFD-MHD GROUP (ASIAA) David Chien-Chang Yen TIARA, 8F, 2nd General Bldg. (Fu Jen Catholic University1 (第二綜合大樓), Hsinchu, [email protected]) Taiwan Outline of this lecture • Goals of galaxies simulations • An introduction of Antares codes • Governing Equations • Numerical techniques • Examples of galaxies simulations • References and codes 2 Goals of galaxies simulations • The structure of the inner gas-dust disk • The evolution of the inner gas-dust disk • Spiral structures • Fuel AGN and starburst ring activities in the center. An introduction of Antares codes • CFD-MHD initiative, a joint research project of the ASIAA, ASIM (Institute of Mathematics), and NTU Math (2002). • High-performance codes of computational fluid dynamics and magneto-hydrodynamics (CFD- MHD) for astrophysical problems • Self-gravitating force calculations • Characteristics decomposition on the boundary, guaranteed non-reflection • Antares is not ANTARES 4 The structure of Antares codes 5 Antares codes (大火程序) vs ANTARES codes 古時中國叫天蠍座為青龍,而天蠍主星中文名為心宿二,又名大火, 西名Antares(火星之敵),心宿二以其寶石紅著稱於世,二、三千年 前這個星被測定為夏至的標準。商、周時期就設定『火正』的天官專 門來看這顆星,以便定立節氣。『詩經』裡就有這麼一句話『七月流 火、九月授衣』。意思是說7月份『大火』星已向地平線接近像流星 一樣(表示盛暑),再過二個月秋天就要來臨,得要多加衣物穿著了 • Antares codes (CFD-MHD, ASIAA, named by Prof. Chi Yuan) • ANTARES is Astronomy with a Neutrino Telescope and Abyss Environmental Research • ANTARES = A Numerical Tool for Astrophysical RESearch with applications to solar granulation. H. J. Muthsam et all. Hydrodynamical simulations of the barred spiral galaxy NGC 6782 On the Orbital Evolution of a Jovian Planet Embedded in a Self-Gravitating Disk Proto-stellar Jet Problems Accretion Disk (binary system) Governing equations for galaxies and proto-stellar disks (i) Equation of continuity ( v) 0 t (ii) Equation of motion (v) P vv V t 2 V V0 V1 Vg Vg 4 G (z) (iii) Equation of state P a2 (isothermal gas) P K (polytropic gas) Governing equations for hydrodynamic escape Image credit: A. Vidal-Madjar Second-order Runge-Kutta method Equations Equations u 0 U F S, t x t x u c2 u 2 U ( ,u), t x x F (u,u 2 c2 ), S (0, ) Numerical approach x t u(1) u n D F n tS n x i1/ 2 t u(2) u(1) D F (1) tS (1) x i1/ 2 1 u n1 u n u(2) 2 13 Relaxed Scheme for one-dimensional problem 1 U F S Ui (Fi1/ 2 Fi1/ 2 ) Si t x t xi where x i is the spatial mesh size and the p-components of the numerical fluxes are given, using the MUSCL scheme, ( p) F v | ( p) i1/ 2 i1/ 2 vF 1 ( p) ( p) 1 1 (F F ) a (u u ) (x x ) | ( p) 2 i i1 2 p i1 i 4 i i i1 i1 vF with the flux limiters 1 ( p) ( p) i |vF ( p) (Fi1 a p ui1 Fi a p ui )(i ) xi F ( p) a u F ( p) a u i p i i1 p i1 14 i ( p) ( p) Fi1 a p ui1 Fi a p ui The main feature of Antares codes un-split method, semi-discretization, the second-order Runge-Kutta time integration exact Riemann solver self-gravitating forces calculation Semi-implicit method for conduction terms absorbing waves boundary conditions 15 Hydrodynamics simulations •Evaluation of flux by solving Riemann problem •A Riemann problem, named after Bernhard Riemann, consists of a conservation law of together with piecewise constant data having single discontinuity. U F 0 t x U L , for x 0 U (x,0) U R , for x 0 17 linear advection equation ut aux 0, u(x,0) u0 (x) constant The solution is u(x,t) u0 (x at) 18 Characteristic lines of the linear advection equation u(x,t) u0 (x) 19 The Burgers’ equation ut uux 0, u(x,0) u0 (x) not a constant The solution is u(x,t) u0 (x u(x,t)t) 20 Characteristic lines of the Burgers’ equation u(x,t) u0(x) 21 Shock formation u(x,Tb) u0(x) Domain dependence and range influence The Courant-Friedrichs-Lewy (CFL) condition (stable condition) ( , ) x1 t1 x0 D(x,t0) Numerical domain dependence must cover physical domain. t x allowable x at unallowable, why ? Exact Riemann Solver for isothermal gas •Riemann solver : (a) 1-shock and 2-shock, * * L u uL c( * ) L * * R u uR c( * ) R (b) 1-rarefaction and 2-rarefaction * * u clog( ) uL clog( L ) * * u clog( ) uR clog( R ) (c) 1-rarefaction and 2-shock, and (d) 1-shock and 2- rarefaction . For rarefaction vs shock case, we can not have exact solution and the Newton method is used to obtain the mid-state value. Sod shock tube problem Rarefaction waves Self-gravitating forces calculation The self-gravitating force calculation for an infinitely thin disk is considered based on the derivatives of potential function satisfying the Poisson equation (x, y, z) 4(x, y) (z) (x, y, z) K(x x, y y, z z) (x, y) (z)dxdydz 1 1 K(x, y, z) 4 x2 y2 z 2 F x x , y ,0, and F y x , y ,0 i, j x i j i, j y i j x y x, y i, j i, j x xi i, j y y j . N N x x y Fi, j K(x x ' , y y ' ,0) ' ' ' ' x x ' ' ' y y ' dxdy D i j i , j i , j i i , j j i' 1 j' 1 i' , j' x With the help of FFT, the entire computational complexity has been 2 2 2 2 reduced from O(N xN ) to O((N log2N) Fourier transform Continuous type: For a continuous function of one variable f(x), the Fourier transform is defined as ~ f () f (x)ei2 xdx, ~ and its inverse transform is f (x) f ()ei2x d. Discrete type: Consider a complex series x i with N samples of the form x 0 , x 1 , x 2 , , x N 1 . The forward and backward transforms are defined as 1 N 1 ˆ ik 2n/ N xn xk e for n 0..N 1. N k0 N 1 ˆ ik 2n/ N xn xk e for n 0..N 1. k0 Danielson-Lanczos Lemma The discrete Fourier transform of length N (where N is even) can be rewrite as the sum of two discrete Fourier transforms, each of length N / 2. N 1 Nxˆ x ei2nk/ N n k 0 k N / 21 x ei2nk/(N / 2) k 0 2k N / 21 ei2n/ N x ei2nk/(N / 2) k 0 2k 1 e n o xˆn W xˆn where W ei2 / N and n 0,, N 1. O(Nlog(N)) When N is the power of 2 and its exponent is p and define the complexity as T(p), the Danielson Lanczos lemma gives us, T( p) 2T( p 1) 2 p 2(2T( p 2) 2 p1) 2 p 22T( p 1) 2 2 p 2 p1T(1) ( p 1)2 p p2 p O(N log(N)). Examples Astronomical Problems Probing the galactic central region of galaxies. We want to study the evolution of galaxies and proto-stellar disk with or without viscosity, and with or without self- gravitating force. We want to study the evolution of galaxies and proto-stellar disk with or without self-gravitating force. The gap formation in proto-stellar disks The migration of planets in proto-stellar disks NGC 1300, NGC 4945, NGC 4622 Hydrodynamic escape problems Galaxies Simulations Outline of Galaxies Simulations • Spiral density waves • Initial settings • A study on the Toomre’s Q variable • NGC 4945 simulations Spiral density waves Gas-dynamical system on the polar coordinate r u u 0 1 2 1 2 u r u P uv v P t r r r 2 r v r uv v P 1 1 u v r r Assume the gas is isothermal P c 2 , the perturbation equations are 0 1,u u1,v r v1, 0 1 SG and the spiral form is ~ ( ,u ,v , ) (~ ,u~ ,v~ ,)exp(i t m s(r)dr ) . 1 1 1 1 1 1 1 Lin-Shu dispersion relation 2 2 2 2 s c 2 G 0 | s | (1v ) 0, it is the Lin-Shu dispersion relation for gaseous disks and the m modified epi-cyclic frequency v . cs 1/ 2 c It has two roots Q1 Q1 v2 1 , where Q . G 0 Equations of motion in terms of r , , z 2 d 2r d d d 2 z r , r 2 J r 2 , . 2 0 0 dt dt r dt dt z r t We consider an orbit r 0 r 1 , equation becomes 2 d 2r t 1 J dt 2 3 r . Linearization of the above equation r r1t 0 2 2 d 2 4 1 r0 yields d r 1 2 where 0 2 dr r 0 dt 2 1 Wavy regions and evanescence region When Q 2 v 2 1 0 , we cannot have any waves. In this region is called evanescence region and waves are damped. Lindblad Resonance Bar-driven spirals at Lindblad resonances according to asymptotic theory IILR OILR OLR Leading waves Relatively open Tightly wound trailing waves trailing waves OLR occurs when p= +/2 r d (2 42 (1 )) ILR occurs when p= -/2 2 dr 39 (Yuan & Kuo 1997) Numerical Simulation of the 3-kpc Arm of the Milky Way: Equations u v 0 2 u u P uv t x y 2 x v uv v P y •53 km/sec at 3 kpc •135 km/sec at undermined location on the opposite direction Numerical Simulation of the 3-kpc Arm of the Milky Way: Initial settings •Gas dynamical system with periodic force (rotating bar).