Acessibilidade / Reportar erro

Ideal and Resistive Magnetohydrodynamic Two-Dimensional Simulation of the Kelvin-Helmholtz Instability in the Context of Adaptive Multiresolution Analysis

ABSTRACT

This work is concerned with the numerical simulation of the Kelvin-Helmholtz instability using an ideal and resistive two-dimensional magnetohydrodynamics model in the context of an adaptive multiresolution approach. The Kelvin-Helmholtz instabilities are caused by a velocity shear and normally expected in a layer between two fluids with different velocities. Due to its complexity, this kind of problem is a well-known test for numerical schemes and it is important for the verification of the developed code. The aim of this paper is to verify the implemented numerical model with the well-known astrophysics FLASH code.

Keywords:
magnetohydrodynamics; Kelvin-Helmholtz instability; adaptive multiresolution analysis; numerical simulation; scientific computing

RESUMO

Este trabalho refere-se à simulação numérica da instabilidade de Kelvin-Helmholtz usando um modelo magneto-hidrodinâmico ideal e resistivo bidimensional no contexto de uma abordagem de multirresolução adaptativa. As instabilidades de Kelvin-Helmholtz são causada por uma velocidade de cisalhamento, e normalmente é esperada em uma camadaentre dois fluidos com diferentes velocidades. Devido à sua complexidade, esse tipo de problema é um teste bem conhecido para esquemas numéricos, sendo importante para a verificação do código desenvolvido. O objetivo principal deste trabalho é verificar a implementação numérica do modelo utilizando o conhecido código FLASH, aplicado ao contexto das instabilidades de Kelvin-Helmholtz.

Palavras-chave:
magneto-hidrodinâmica; instabilidade de Kelvin-Helmholtz; análise multirre solução adaptativa; simulação numérica; computação científica

1 INTRODUCTION

The magnetohydrodynamics (MHD) theory describes the dynamics of a conducting fluid inpresence of magnetic fields and constitutes an important tool to study the macroscopic behavior of plasmas 1111 R.J. Hosking & R.L. Dewar. “Fundamental Fluid Mechanics and Magnetohydrodynamics”. Springer Singapore, (2016).. In this context, the Kelvin-Helmholtz instability, which is commonly expected in boundary layers separating two fluids, is an important and a complex physical problem that can be studied with the MHD models, and should often occur in both astrophysical and space geophysical environments 66 A. Frank, T.W. Jones, D. Ryu & J.B. Gaalaas. The magnetohydrodynamic Kelvin-Helmholtz instability: A two-dimensional numerical study. The Astrophysical Journal, 460 (1996), 777.. On the discretization of the MHD system, we use a finite volume (FV) method combined with an adaptive multiresolution (MR) approach to create a computational mesh refined where local structures are presented. The FV method is based on the integral form of conservation laws and guarantees the conservation of the model quantities. The MR for cell-averages was firstly introduced by Ami Harten 1010 A. Harten. Multiresolution representation of data: a general framework. SIAM Journal of Numerical Analysis, 33(3) (1996), 385-394.. The idea is to represent a set of data in different levels of resolution by using a wavelet transform. In the C ++ code named CARMEN 1515 O. Roussel, K. Schneider, A. Tsigulin & H. Bockhorn. A conservative fully adaptive multiresolution algorithm for parabolic {PDEs}. Journal of Computational Physics, 188(2) (2003), 493-523. the MR algorithm is implemented for compressible Navier-Stokes and five more system of equations. The ideal MHD equations were added later to the CARMEN code 33 M.O. Domingues, A.K.F. Gomes, S.M. Gomes, O. Mendes, B. Di Pierro & K. Schneider. Extended generalized lagrangian multipliers for magnetohydrodynamics using adaptive multiresolution methods. ESAIM Proceedings, 43 (2013), 95-107.), (88 A.K.F. Gomes. Análise multirresolução adaptativa no contexto da resolução numérica de um modelo de magnetohidrodinâmica ideal. Master’s thesis, Instituto Nacional de Pesquisas Espaciais (INPE), São José dos Campos, (2012).), (99 A.K F. Gomes, M.O. Domingues, K. Schneider, O. Mendes & R. Deiterding. An adaptive multiresolution method for ideal magnetohydrodynamics using divergence cleaning with parabolic-hyperbolic correction. Applied Numerical Mathematics, 95 (2015), 199-213., and it is employed herein.

We use the FLASH code 77 B. Fryxell, K. Olson, P. Ricker, F.X. Timmes, M. Zingale, D.Q. Lamb, P. MacNeice, R. Rosner, J.W. Truran & H. Tufo. FLASH: An adaptive mesh hydrodynamics code for modeling astrophysical thermonuclear flashes. The Astrophysical Journal Supplement Series, 131 (2000), 273-334., developed by the Flash Center in University of Chicago, well-known in astrophysics and space geophysics, to create a reference MHD solution to our results, since it is not possible to obtain a exact solution. The goal of this work is to verify the numerical results of CARMEN code for the Kelvin-Helmholtz instability problem by comparing them with the reference solution, which is obtained in a regular Cartesian mesh.

The content is organized as follows. In Section 2, we briefly present both the MHD model and the MR approach we use to simulate the Kelvin-Helmholtz instabilities; in Section 3, the numerical methodology and implementation; in Section 4, the results and discussion. The final remarks are presented in Section 5.

2 THE MHD MODEL

The ideal model describes the behavior of a perfectly conducting fluid under the influence of a magnetic field. By adding a resistive term to the MHD system, there is no magnetic flux conservation anymore, which can lead to a more diffusive behavior. The resistivity is associated to the parameter η, which comes from the Ohm’s law. For η ≠ 0 it can trigger a different behavior to be studied in a plasma. It is important to note that when η → 0 the resistive MHD model becomes the ideal MHD equations, which describe the conservation of mass, energy, momentum and magnetic flux. In this work we consider η as a constant, but it is also possible to choose a scalar function. In this context, we introduce the resistive MHD equations.

ρ t + · ( ρ u ) = 0, (2.1a)

e t + · [ ( e + p + | B | 2 2 ) u B ( u · B ) ] = · [ B × η ( × B ) ] , (2.1b)

( ρ u ) t + · [ ρ u t u + I ( p + | B | 2 2 ) B t B ] = 0 , (2.1c)

B t + · [ u t B B t u ] = × ( η × B ) , (2.1d)

where ρ represents density, p the pressure, u = (ux, uy, uz ) the velocity vector, B = (Bx, By, Bz ) the magnetic field vector, I the identity tensor of order 2, and γ the ratio of specific heats (γ > 1). The pressure is given by the constitutive law

p = ( γ 1 ) ( e ρ | u | 2 2 | B | 2 2 ) ,

where e is the energy density. For the magnetic field, we have the Gauss’ law for magnetism ∇ · B = 0, which means there is no magnetic monopole in the solution of the MHD model. This is an initial condition for the model. From the Faraday’s law ∇ × E = Bt (by applying the divergence operator on the equation), we obtain (·B)t = 0, i.e., this means there is no variation of the divergence of B over time.

In numerical simulation, the divergence of B does not always vanish. Then it becomes necessary to implement a correction (or divergence cleaning) scheme so the solution will not lead to unphysical behavior or unwanted instabilities. In the next section, we present the numerical methodology for the simulation, including the divergence correction scheme.

3 NUMERICAL APPROACH

To introduce the MHD simulation numerical methodology we firstly present the initial value problem for conservation laws of the form

U t + · F ( U ) = S ( U ) , (3.1)

U ( x , y , t = 0 ) = U 0 ( x , y ) , ( x , y ) Ω , (3.2)

where U = (ρ, e, ux, uy, uz, Bx, By, Bz ) is the vector of conservative variables, F = F(U) the flux tensor, 𝒮 = 𝒮(U) the source term vector, Ω the domain and t the time. Using the definition of Equation (2.1), we have

F ( U ) = ρ u e + p + | B | 2 2 u - B u · B ρ u t u + I p + | B | 2 2 - B t B u t B - B t u , S ( U ) = 0 · B × η ( × B ) 0 - × ( η × B ) . (3.3)

In this section we describe the numerical methodology we use for the MHD simulation in the context of adaptive multiresolution approach.

Divergence Cleaning approach. As discussed in the previous section, ∇ · B = 0 is not satisfied numerically and it can lead to unphysical behavior in the numerical solution of the MHD model. We use the parabolic-hyperbolic correction 11 A. Dedner, F. Kemm, D. Kröner, C.-D. Munz, T. Schnitzer & M. Wesenberg. Hyperbolic divergence cleaning for the MHD equations. Journal of Computational Physics, 175 (2002), 645-673., in which the errors are propagated and dissipated, by introducing a new scalar variable ψ to the model, adding the term ∇ψ to the right-hand size of Equation (2.1d) and defining a new equation to the ideal MHD system

ψ t + c h 2 · B = c h 2 c p 2 ψ , (3.4)

where cp and ch are the parabolic-hyperbolic parameters, with ch > 0, defined as

c h = c h ( t ) : = ν C F L min { Δ x , Δ y } Δ t ,

where the Courant number νCFL ∈ (0, 1), ∆x and ∆y are the space steps and ∆t is the time step. We also consider the parameter α = ∆hch/cp2, where ∆h = min(∆x, ∆y) 1313 A. Mignone & P. Tzeferacos. A second-order unsplit Godunov scheme for cell-centered MHD: The CTU-GLM scheme. Journal of Computational Physics, 229(6) (2010), 2117-2138.. The presented scheme prevents magnetic monopoles from occurring and preserves the topology of the solution. The model used to perform the simulation consists of the resistive MHD model and the respective additional divergence correction terms or equation.

Finite Volume discretization. The discretization of the resistive MHD model is performed by a finite volume method, which is based on the integral form of the conservation laws and ensures the conservation of the system. The domain is partitioned into cells (or volumes) that are associated to indexes i, j, with i, j ∈ {1, …, N}, where N is the number of cells in each x or y directions. A cell-average at tn , n ∈ ℕ, is associated to each cell Ci,j of the domain, obtained by the integral of a certain quantity U n = (x, y, tn ) over the cell, i.e.,

U ¯ i , j n = 1 | C i , j | C i , j U n d x d y . (3.5)

For simplicity, the superscript n is omitted in the following text. By applying the integral operator to Equation (3.1) in terms of dx, dy for t = tn , and the Divergence Theorem, we obtain

t % U ¯ i , j = - 1 | C i , j | C i , j F · n k d x k + S ¯ i , j , (3.6)

where ∂Ci,j is the boundary of cell Ci,j , and k is related to the flux direction. From the first right-hand term we conclude that the flux has to be evaluated on the interfaces of the cells. The values of the flux are based on the centered cell-averages, so it is necessary to approximate the values of F through the cell interfaces. Since the interfaces of a cell Ci,j in x direction are located at I ± 1/2, j, and i, j ± 1/2 in y direction, we have

t U ¯ i , j = 1 Δ x ( F i + 1 / 2, j F i 1 / 2, j ) 1 Δ y ( G i , j + 1 / 2 G i , j 1 / 2 ) + S ¯ i , j , (3.7)

where ℱ, 𝒢 are the estimated fluxes (or numerical fluxes) on the boundaries. The numerical scheme we use is the Harten-Lax-van Leer Discontinuities (HLLD) Riemann solver 1212 T. Miyoshi & K. Kusano. A multi-state HLL approximate Riemann solver for ideal magnetohydrodynamics. Journal of Computational Physics, 208 (2005), 315-344. due to its efficiency to resolve isolated discontinuities, and the monotonized central (MC) reconstruction 1616 E.F. Toro. “Riemann Solvers and Numerical Methods for Fluid Dynamics: A Practical Introduction”. Springer-Verlag Berlin Heidelberg, (1999). to ensure the 2nd -order in space.

Time evolution. The time evolution of Equation (3.7) is performed by a compact second-order Runge-Kutta explicit scheme. The system is completed by suitable initial and boundary conditions. The two-dimensional form of this system is considered.

Adaptive multiresolution analysis. The MR method is based on an adaptive cell average approach as discussed in 22 M.O. Domingues, S.M. Gomes, O. Roussel & K. Schneider. Adaptive multiresolution methods. ESAIM Proceedings, 34 (2011), 1-96.), (1010 A. Harten. Multiresolution representation of data: a general framework. SIAM Journal of Numerical Analysis, 33(3) (1996), 385-394.. To briefly present the adaptive MR analysis, we should first introduce the MR representation. The main idea of MR is to decompose the data into several scaled versions of it. In the context of our work, our data is an MHD solution represented by a set of cell averages (mesh) 99 A.K F. Gomes, M.O. Domingues, K. Schneider, O. Mendes & R. Deiterding. An adaptive multiresolution method for ideal magnetohydrodynamics using divergence cleaning with parabolic-hyperbolic correction. Applied Numerical Mathematics, 95 (2015), 199-213.. The refinement levels are associated to a multiresolution mesh structure that creates dyadic embedded cell meshes. Those meshes have different numbers of cells according to the level they belong to.

Let ℓ be a given level of refinement such as 0 ≤ ℓ ≤ L, where L is the most refined level, and U¯l is the cell-averages at level ℓ. The computational mesh for each level ℓ has 22ℓ cells. Since we aim to decompose/reconstruct the data into the refinement levels and also navigate between them, we define the projection and prediction operators

P l + 1 l : U ¯ l + 1 U ¯ l , (3.8)

P l l + 1 : U ¯ l U ¯ l + 1 . (3.9)

To obtain coarser data from a refined set, for instance ℓ + 1 → ℓ, we use the projection operator defined in Equation (3.8), which is exact and unique. Otherwise, to obtain data in a more refined level from coarse data, the prediction operator is used to perform an estimation of these values. The approximation errors obtained with the prediction are called details or wavelet coefficients, denoted by d = [di,jl, i ∈ {1, …, 2}, j ∈ {1, …, 2}] and they give the information about the local regularity of the data, i.e., if the solution is locally smooth or not. As a consequence of these processes, we obtain a relation between each two adjacent levels U¯l+1{dl,U¯l}, which means data in a more refined level can be acquired from the data in the coarser level along with its wavelet coefficients. Analogously, by extending this concept, it is possible to create a relation between the coarsest and most refined levels as following

U ¯ L { d L 1 , d L 2 , , d 0 , U ¯ 0 } . (3.10)

Such relation is the basis of the multiresolution transform. This transform allows us to navigate through the levels and obtain the data at each level of refinement. From this representationcomes the adaptive MR.

The idea of adaptivity starts from the wavelet coefficients, which can measure the local regularity of the data according to a given threshold parameter є = є(є0, ℓ), where ℓ denotes the cell scale level and є0 is the initial threshold parameter. In this work, we take into account thelevel-dependent and constant threshold parameters. The first varies with the level ℓ, in other words 22 M.O. Domingues, S.M. Gomes, O. Roussel & K. Schneider. Adaptive multiresolution methods. ESAIM Proceedings, 34 (2011), 1-96.), (1010 A. Harten. Multiresolution representation of data: a general framework. SIAM Journal of Numerical Analysis, 33(3) (1996), 385-394., at each level of refinement we compute є for the two-dimensional case as

ϵ l = ϵ 0 | Ω | 2 2 ( l L + 1 ) , 0 l L 1, (3.11)

where |Ω| is the area of the domain. The constant parameter remains unchanged for every ℓ, with 0 ≤ ℓ ≤ L - 1. When the details are larger than є, the computational mesh needs to be more refined locally; otherwise the mesh can remain coarser. This methodology allows the computational mesh to be more refined only where it is required. For simplicity, we denote the level dependent and constant threshold parameters as є0 and є, respectively.

3.1 CARMEN code

The original CARMEN code was developed by Olivier Roussel 1515 O. Roussel, K. Schneider, A. Tsigulin & H. Bockhorn. A conservative fully adaptive multiresolution algorithm for parabolic {PDEs}. Journal of Computational Physics, 188(2) (2003), 493-523. in C ++ to simulate theAdvection-diffusion, Burgers-diffusion, Flame front, Flame ball, Flame-curl interaction andNavier-Stokes equations with the finite volume method in the context of the adaptive multiresolution analysis for cell-averages. The ideal MHD model implementation in two dimensions along with two Riemann solvers have being done since 2012 33 M.O. Domingues, A.K.F. Gomes, S.M. Gomes, O. Mendes, B. Di Pierro & K. Schneider. Extended generalized lagrangian multipliers for magnetohydrodynamics using adaptive multiresolution methods. ESAIM Proceedings, 43 (2013), 95-107.), (88 A.K.F. Gomes. Análise multirresolução adaptativa no contexto da resolução numérica de um modelo de magnetohidrodinâmica ideal. Master’s thesis, Instituto Nacional de Pesquisas Espaciais (INPE), São José dos Campos, (2012).. After that, some modifications were made to improve the CPU time and boundary conditions, reconstruct the variables, fix MHD waves evaluation and more 99 A.K F. Gomes, M.O. Domingues, K. Schneider, O. Mendes & R. Deiterding. An adaptive multiresolution method for ideal magnetohydrodynamics using divergence cleaning with parabolic-hyperbolic correction. Applied Numerical Mathematics, 95 (2015), 199-213.. Subsequently, the three-dimensional model, finite volume approach for MHD, and resistive MHD model is implemented, which is the most recent modification. In this section we present the numerical methodology implemented in this code.

3.1.1 Notes on implementation

The additional source terms in Equations (2.1b) and (2.1d) require some modifications in the code. First we present these terms in a less simplified form separately, and consider the current density J = ∇ · B, with J = (Jx, Jy, Jz ). In two-dimensions, we obtain:

J = ( B z y , B z x , B y x B x y ) , (3.12)

as there is no variation in z direction.

Energy flux term. This term is part of the energy density Equations (2.1b), and it is denoted by ∇ · (B × ηJ). Since we have already computed a divergence operator for the flux evaluation, it is possible to use the same computation for the term B × ηJ. Thus, the flux functions ℱ and 𝒢 in Equation (3.7) for the variable ℰ can be rewritten as

F ^ ( E ) = F ( E ) - η ( B y J z - B z J y ) (3.13)

G ^ ( E ) = G ( E ) - η ( B z J x - B x J z ) , (3.14)

by adding the components of B × ηJ. We should recall that the fluxes F^ and G^ are computed on the interfaces of the cells in x and y directions, respectively.

Ohmic resistivity term. In this case, we denote the Ohmic resistivity in terms of J and we obtain

× ( η J ) = η ( J z y , J z x , J y x , J x y ) , (3.15a)

= x ( 0 , - η J z , η J y ) + y ( η J z , 0 , - η J x ) . (3.15b)

Here we also take advantage of the divergence operator. Since we have computed a derivative in x for ℱ and in y for 𝒢, the vector components in Equation (3.15b) are added to the fluxes according to its space derivative, i.e., we add the x derivatives to ℱ and, similarly, the y derivatives to 𝒢, always taking into account that each component of this vector is related to an equation of the magnetic field. Thereby, we update the fluxes as following

F ^ ( B x ) = F ( B x ) , (3.16)

F ^ ( B y ) = F ( B y ) - η J z , (3.17)

F ^ ( B z ) = F ( B z ) + η J y , (3.18)

and for y direction

G ^ ( B x ) = G ( B x ) + η J z , (3.19)

G ^ ( B y ) = G ( B y ) , (3.20)

G ^ ( B z ) = G ( B z ) - η J x , (3.21)

which are calculated on the cells interfaces. Thus Equation (3.7) becomes

t U ¯ i , j = 1 Δ x ( F ^ i + 1 / 2, j F ^ i 1 / 2, j ) 1 Δ y ( G ^ i , j + 1 / 2 G ^ i , j 1 / 2 ) . (3.22)

It is important to note that the approach we use here is not unique, so other forms to evaluate these terms may be used.

3.2 Code verification: reference solution

The FLASH code is a modular, parallel metaphysics code developed in FORTRAN90 and C in the Flash Center of the University of Chicago, well-known in the space geophysics and astrophysics fields. The code includes the ideal and resistive MHD models with the finite volume method and it is also possible to use an adaptive mesh refinement or non-adaptive approaches for the simulation. Since FLASH is a verified FV code, we use it in simulations as a reference solution.

The similarities between these codes in the context of this work are the following: a Harten-Lax-Van Leer-Discontinuities Riemann solver and monotonized central variable reconstruction. Moreover the following configurations are used: For the time evolution, FLASH performs a one-step Hancock; FLASH also uses the 8-wave based divergence correction 1414 K.G. Powell, P.L. Roe, T.J. Linde, T.I. Gombosi & D.L. De Zeeuw. A Solution-Adaptative Upwind Scheme for Ideal Magnetohydrodynamics. Journal of Computational Physics, 154 (1999), 284-309., which stabilizes the numerical method by adding source terms proportional to ∇ · B on the right-hand side of the system, i.e. the source term vector 𝒮 = (0, -B∇ · B, -u∇ · B, -(u · B)∇ · B) is added to the MHD equations.

FLASH code can also be adaptive, but we are interested only in its non-adaptive form as our reference. We do not compare the mesh refinement and MR adaptivity, however that is possible, as discussed in 44 R. Deiterding, M.O. Domingues, S.M. Gomes & K. Schneider. Comparison of adaptive multiresolution and adaptive mesh refinement applied to simulations of the compressible euler equations. SIAM Journal on Scientific Computing, 38 (2016), S173-S193..

In particular, for FLASH code the source terms in Equations (2.1b) and (2.1d) are added to ℰ and B quantities after the time evolution at each timestep.

4 NUMERICAL EXPERIMENTS

In this section we present the results obtained with CARMEN code for L = 9 and the respective reference computed with FLASH with the same level i.e., 512 × 512 mesh. We reinforce here that the reference results allow us to compare the solution qualitatively and quantitatively, then it is possible to measure how the CARMEN code solution is converging to the expected results.

In fluids or plasmas, the Kelvin-Helmholtz instability is triggered by a velocity shear and creates a vortex as discussed in 66 A. Frank, T.W. Jones, D. Ryu & J.B. Gaalaas. The magnetohydrodynamic Kelvin-Helmholtz instability: A two-dimensional numerical study. The Astrophysical Journal, 460 (1996), 777.. That occurs in several phenomena in nature and space, in the clouds and magnetosphere, for instance 55 E.F.D. Evangelista, M.O. Domingues, O. Mendes & O.D. Miranda. A brief study of instabilities in the context of space magnetohydrodynamic simulations. Revista Brasileira de Ensino de Fìsica, 38(1) (2016).. In our simulations, we consider the initial conditions presented in Table 1, with

u x 0 = 5 ( tanh ( 20 ( y + 0.5 ) ) ( tanh ( 20 ( y 0.5 ) ) + 1 ) ) , u y 0 = 0.25 sin ( 2 π x ) ( exp [ 100 ( y + 0.5 ) 2 ] exp [ 100 ( y 0.5 ) 2 ] ) ,

and periodic boundary conditions everywhere. The computational domain is Ω = [0, 1.0] × [-1.0, 1.0] and the finest scale is L = 9. We also define as parameters the Courant number ν = 0.4, γ = 1.4, and the physical time t = 0.5. The choice of resistivity η = 0.02 is made according to astrophysics uses, as discussed in 55 E.F.D. Evangelista, M.O. Domingues, O. Mendes & O.D. Miranda. A brief study of instabilities in the context of space magnetohydrodynamic simulations. Revista Brasileira de Ensino de Fìsica, 38(1) (2016). and for the ideal case we consider η = 0. We have also tested other values of η as [0.005, 0.05]. We consider the threshold parameters є0 = 0.1 and 0.01 both for the ideal and resistive cases. For the divergence-cleaning, we adopt α = 0.4, as discussed in 99 A.K F. Gomes, M.O. Domingues, K. Schneider, O. Mendes & R. Deiterding. An adaptive multiresolution method for ideal magnetohydrodynamics using divergence cleaning with parabolic-hyperbolic correction. Applied Numerical Mathematics, 95 (2015), 199-213..

Table 1:
Kelvin-Helmholtz instability initial condition.

The reference (left) and CARMEN (right) code solutions for ideal and resistive MHD are presented for the variables density ρ, velocity y-component uy , and magnetic field x-component Bx in Figures 1 and 2. In both simulations the obtained results have the same maximum and minimum values. The larger gradients values in the solution are presented where the vortexes are located, near to y = -0.5 and y = 0.5. For the variable density, for instance, it is possible to find gradients of one order of magnitude for the ideal case, and even not using the entire simulation mesh these structures are well captured. The resistive results are clearly more diffusive when compared to the ideal case, as expected, since it is the effect of the additional resistive terms. Figures 3 and 4 present the cuts for the variables ρ, uy , and Bx , in x = 0.5 and y = 0.5 at t = 0.5, respectively, of reference and CARMEN code solutions for ideal and resistive MHD. These cuts are located where the most critical structures in solution are placed, due to many discontinuities, and they remain very close for each case with both codes.

Figure 1:
Ideal MHD variables ρ, uy and Bx (from top to bottom) obtained at t = 0.5 and L = 9, with reference and CARMEN code solutions for є0 = 0.1.

Figure 2:
Resistive MHD variables ρ, uy and Bx (from top to bottom) obtained at t = 0.5 and L = 9, with reference and CARMEN code solutions for є0 = 0.1.

Figure 3:
Ideal MHD cuts of variables ρ, uy and Bx (from top to bottom) obtained at t = 0.5 and L = 9, with reference and CARMEN code solutions for є0 = 0.01, є = 0.05, є0 = 0.1, on x = 0.5 and y = 0.5.

Figure 4:
Resistive MHD cuts of variables ρ, uy and Bx (from top to bottom) obtained at t = 0.5 and L = 9, with reference and CARMEN code solutions for є0 = 0.01, є = 0.05, є0 = 0.1, on x = 0.5 and y = 0.5.

According to Figures 3 and 4, the solution obtained with the resistive MHD model approaches the reference solution. We can also notice that for sufficiently big values of є the convergence of the solution is not sufficient, which means that the number of cells used to represent the solution is not enough, thus it is important to find an acceptable threshold parameter in order to obtain a fair relation between CPU time, number of cells, and accuracy.

To illustrate this situation, we can observe the cuts for є = 0.05, which do not converge properly to the reference solution when compared to the other two cases. However, this behavior is expected since the percentage of cells needed for those simulations are 11% and 5% for the ideal and resistive cases, respectively. This reinforces the importance of the choice of parameter є.

The adaptive meshes for the ideal and resistive cases at time t = 0.5 are presented for є0 = 0.1 in Figure 5. In this simulation the use of memory (percentage of cells) over time is 32% for the ideal case and 24% for the resistive case, when compared to a uniform mesh. The percentages of CPU time needed are 67% and 72% smaller for the ideal and resistive MHD, respectively. To quantitatively compare the presented results, Table 2 and 3 show the L 1, L 2, and L error values for every variable of the MHD model when the solution is compared with the reference results. The errors are computed for MR and FV CARMEN solutions and the reference solution. The values for the FV approach are slighty smaller when compared to the MR results. This result is expected since we need a full mesh in order to obtain them. The errors for the resistive case are even smaller when compared to the ideal case. That happens due to the diffusive behavior of the solution, since the greater values occur where the sharpest structures are located. In Figure 6, the diffusive behavior of the resistive terms of the MHD model is illustrated. We can observe how the topology of the solution of the variable ρ changes according to the value of η. In this case we choose η = 0 (ideal case), η = 0.005, η = 0.02 and η = 0.05, and it shows that the solution becomes more diffusive as η is increased. As long as the local structures become more diffuse, the adaptive mesh for greater values of η will have less cells in the most refined level.

Figure 5:
Adaptive MR meshes at t = 0.5 obtained with CARMEN code with є0 = 0.1 for the ideal and resistive cases.

Table 2:
Errors for the ideal Kelvin-Helmholtz simulation with MR (є0 = 0.1) and FV compared with referece results.

Table 3:
Errors for the resistive Kelvin-Helmholtz simulation with MR (є0 = 0.1) and FV compared with reference results.

Figure 6:
Variable ρ obtained with CARMEN code at t = 0.5 for the ideal case and η = 0.005, η = 0.02, η = 0.05 (from left to right) and є0 = 0.1.

The error obtained for variable p is larger when compared to the other variables of the model. That happens because the pressure depends on the values of B, e and u to be computed, thus the approximation errors of these variables accumulate in the pressure. In Figure 7 we observe that the solution of p is close to the reference solution on ideal (top) and resistive cases (bottom), for є0 = 0.01, є = 0.05 and є0 = 0.1, at x = 0.5 and y = 0.5.

Figure 7:
Ideal and resistive MHD cuts of variable p (from top to bottom) obtained at t = 0.5 and L = 9, with reference and CARMEN code solutions for є0 = 0.01, є = 0.05, є0 = 0.1, on x = 0.5 and y = 0.5.

5 FINAL REMARKS

We have presented a wavelet based multiresolution approach to compute the Kelvin-Helmholtz instabilities for the ideal and resistive MHD system with parabolic-hyperbolic divergence cleaning approach and compared its results to a reference solution obtained with FLASH code. New implementations of the resistive MHD model are done in CARMEN code for the MR and FV approaches. It is shown that the topology of the solution of the problem achieved with the adaptive MR is very close to the reference solution and with the respective cuts in the domain and the error values we ensure that it leads to the expected solution quantitatively. The adaptive method has proven to be efficient to keep the accuracy of the solution even decreasing the number of cells in the simulation. In our case we needed an average of 30% of cells for the simulations, which implied in a reduction of 67% of the CPU time (compared to the FV CARMEN code). We conclude that the presented MR methodology for the ideal and resistive MHD models is relevant in this instability context and it would be interesting to extend it to more complex space physics problems in future works.

ACKNOWLEDGEMENTS

M.O.D. and O.M. thankfully acknowledge financial support from MCTI/FINEP/INFRINPE-1 (grant 01.12.0527.00), CNPq (grants 30603-8/2015-3, 31224-6/2013-7) and FAPESP (grants 2015/50403-0, 2015/25624-2, 2016/50016-9). A.G. thankfully acknowledges financial support of MCTI/INPE-PCI and PhD scholarships from CNPq (grants 132045/2010-9, 312479/2012-3, 141741/2013-9). The software used in this work was in part developed by the DOE NNSA-ASC OASCR Flash Center at the University of Chicago. We thank Dr. Olivier Roussel for developing the original MR CARMEN code for hydrodynamics and Dr. Kai Schneider fruitful for scientific discussions. We also want to thank to Dr. Edgard Evangelista for his help with FLASH code and Eng. Varlei Menconi for the computational assistance.

REFERENCES

  • 1
    A. Dedner, F. Kemm, D. Kröner, C.-D. Munz, T. Schnitzer & M. Wesenberg. Hyperbolic divergence cleaning for the MHD equations. Journal of Computational Physics, 175 (2002), 645-673.
  • 2
    M.O. Domingues, S.M. Gomes, O. Roussel & K. Schneider. Adaptive multiresolution methods. ESAIM Proceedings, 34 (2011), 1-96.
  • 3
    M.O. Domingues, A.K.F. Gomes, S.M. Gomes, O. Mendes, B. Di Pierro & K. Schneider. Extended generalized lagrangian multipliers for magnetohydrodynamics using adaptive multiresolution methods. ESAIM Proceedings, 43 (2013), 95-107.
  • 4
    R. Deiterding, M.O. Domingues, S.M. Gomes & K. Schneider. Comparison of adaptive multiresolution and adaptive mesh refinement applied to simulations of the compressible euler equations. SIAM Journal on Scientific Computing, 38 (2016), S173-S193.
  • 5
    E.F.D. Evangelista, M.O. Domingues, O. Mendes & O.D. Miranda. A brief study of instabilities in the context of space magnetohydrodynamic simulations. Revista Brasileira de Ensino de Fìsica, 38(1) (2016).
  • 6
    A. Frank, T.W. Jones, D. Ryu & J.B. Gaalaas. The magnetohydrodynamic Kelvin-Helmholtz instability: A two-dimensional numerical study. The Astrophysical Journal, 460 (1996), 777.
  • 7
    B. Fryxell, K. Olson, P. Ricker, F.X. Timmes, M. Zingale, D.Q. Lamb, P. MacNeice, R. Rosner, J.W. Truran & H. Tufo. FLASH: An adaptive mesh hydrodynamics code for modeling astrophysical thermonuclear flashes. The Astrophysical Journal Supplement Series, 131 (2000), 273-334.
  • 8
    A.K.F. Gomes. Análise multirresolução adaptativa no contexto da resolução numérica de um modelo de magnetohidrodinâmica ideal. Master’s thesis, Instituto Nacional de Pesquisas Espaciais (INPE), São José dos Campos, (2012).
  • 9
    A.K F. Gomes, M.O. Domingues, K. Schneider, O. Mendes & R. Deiterding. An adaptive multiresolution method for ideal magnetohydrodynamics using divergence cleaning with parabolic-hyperbolic correction. Applied Numerical Mathematics, 95 (2015), 199-213.
  • 10
    A. Harten. Multiresolution representation of data: a general framework. SIAM Journal of Numerical Analysis, 33(3) (1996), 385-394.
  • 11
    R.J. Hosking & R.L. Dewar. “Fundamental Fluid Mechanics and Magnetohydrodynamics”. Springer Singapore, (2016).
  • 12
    T. Miyoshi & K. Kusano. A multi-state HLL approximate Riemann solver for ideal magnetohydrodynamics. Journal of Computational Physics, 208 (2005), 315-344.
  • 13
    A. Mignone & P. Tzeferacos. A second-order unsplit Godunov scheme for cell-centered MHD: The CTU-GLM scheme. Journal of Computational Physics, 229(6) (2010), 2117-2138.
  • 14
    K.G. Powell, P.L. Roe, T.J. Linde, T.I. Gombosi & D.L. De Zeeuw. A Solution-Adaptative Upwind Scheme for Ideal Magnetohydrodynamics. Journal of Computational Physics, 154 (1999), 284-309.
  • 15
    O. Roussel, K. Schneider, A. Tsigulin & H. Bockhorn. A conservative fully adaptive multiresolution algorithm for parabolic {PDEs}. Journal of Computational Physics, 188(2) (2003), 493-523.
  • 16
    E.F. Toro. “Riemann Solvers and Numerical Methods for Fluid Dynamics: A Practical Introduction”. Springer-Verlag Berlin Heidelberg, (1999).

Publication Dates

  • Publication in this collection
    Aug 2017

History

  • Received
    28 Nov 2016
  • Accepted
    10 May 2017
Sociedade Brasileira de Matemática Aplicada e Computacional Rua Maestro João Seppe, nº. 900, 16º. andar - Sala 163 , 13561-120 São Carlos - SP, Tel. / Fax: (55 16) 3412-9752 - São Carlos - SP - Brazil
E-mail: sbmac@sbmac.org.br