### Browsing by Author "Rheinhardt, Matthias"

Now showing 1 - 12 of 12

###### Results Per Page

###### Sort Options

Item Astaroth: A Library for Stencil Computations on Graphics Processing Units(2019-06-17) Pekkilä, Johannes; Rheinhardt, Matthias; Lehtinen, Jaakko; Perustieteiden korkeakoulu; Kaski, PetteriGraphics processing units (GPUs) are coprocessors, which offer higher throughput and better power efficiency than central processing units in dataparallel tasks. For this reason, graphics processors provide a good platform for high-performance computing. However, programming GPUs such that all the available performance is utilized requires in-depth knowledge of the architecture of the hardware. Additionally, the problem of high-order stencil computations on GPUs in challenging multiphysics applications has not been adequately explored in previous work. In this thesis, we address these issues by presenting a library, an efficient algorithm and a domain-specific language for solving stencil computations within a structured grid. We tested our implementation by simulating magnetohydrodynamics, which involved the computation of first, second, and cross partial derivatives using second-, fourth-, sixth-, and eight-order finite differences with single and double precision. The running time of our integration kernel was 2.8–9.1 times slower than the theoretical minimum time, which it would take to read the computational domain and write it back to device memory exactly once, without taking into account the effects of finite caches or arithmetic operations on performance. Additionally, we made a performance comparison with a CPU solver widely used for scientific computations, which we benchmarked on a total of 24 cores of two Intel Xeon E5-2690 v3 processors. Our solver, benchmarked on a Tesla P100 PCIe GPU, outperformed the CPU solver by factors of 6.7 and 10.4 when using single and double precision, respectively.Item Compressible Test-field Method and Its Application to Shear Dynamos(IOP Publishing Ltd., 2022-06-01) Käpylä, Maarit J.; Rheinhardt, Matthias; Brandenburg, Axel; Department of Computer Science; Computer Science Professors; Computer Science - Large-scale Computing and Data Analysis (LSCA); Professorship Korpi-Lagg Maarit; KTH Royal Institute of TechnologyIn this study, we present a compressible test-field method (CTFM) for computing α-effect and turbulent magnetic diffusivity tensors, as well as those relevant for the mean ponderomotive force and mass source, applied to the full MHD equations. We describe the theoretical background of the method and compare it to the quasi-kinematic test-field method and to the previously studied variant working in simplified MHD (SMHD). We present several test cases using velocity and magnetic fields of the Roberts geometry and also compare with the imposed-field method. We show that, for moderate imposed-field strengths, the nonlinear CTFM (nCTFM) gives results in agreement with the imposed-field method. A comparison of different flavors of the nCTFM in the shear dynamo case also yields agreement up to equipartition field strengths. Some deviations between the CTFM and SMHD variants exist. As a relevant physical application, we study nonhelically forced shear flows, which exhibit large-scale dynamo action, and present a reanalysis of low-Reynolds-number, moderate shear systems, where we previously ignored the pressure gradient in the momentum equation and found no coherent shear-current effect. Another key difference is that in the earlier study we used magnetic forcing to mimic small-scale dynamo action, while here it is self-consistently driven by purely kinetic forcing. The kinematic CTFM with general validity forms the core of our analysis. We still find no coherent shear-current effect, but do recover strong large-scale dynamo action that, according to our analysis, is driven by incoherent effects.Item Extended Subadiabatic Layer in Simulations of Overshooting Convection(2017-08-20) Käpylä, Petri J.; Rheinhardt, Matthias; Brandenburg, Axel; Arlt, Rainer; Käpylä, Maarit J.; Lagg, Andreas; Olspert, Nigul; Warnecke, Jörn; Department of Computer Science; Centre of Excellence Research on Solar Long-Term Variability and Effects, ReSoLVE; Professorship Vehtari Aki; Stockholm University; University of Potsdam; Max Planck Institute for Solar System ResearchWe present numerical simulations of hydrodynamic overshooting convection in local Cartesian domains. We find that a substantial fraction of the lower part of the convection zone (CZ) is stably stratified according to the Schwarzschild criterion while the enthalpy flux is outward directed. This occurs when the heat conduction profile at the bottom of the CZ is smoothly varying, based either on a Kramers-like opacity prescription as a function of temperature and density or a static profile of a similar shape. We show that the subadiabatic layer arises due to nonlocal energy transport by buoyantly driven downflows in the upper parts of the CZ. Analysis of the force balance of the upflows and downflows confirms that convection is driven by cooling at the surface. We find that the commonly used prescription for the convective enthalpy flux being proportional to the negative entropy gradient does not hold in the stably stratified layers where the flux is positive. We demonstrate the existence of a non-gradient contribution to the enthalpy flux, which is estimated to be important throughout the convective layer. A quantitative analysis of downflows indicates a transition from a tree-like structure where smaller downdrafts merge into larger ones in the upper parts to a structure in the deeper parts where a height-independent number of strong downdrafts persist. This change of flow topology occurs when a substantial subadiabatic layer is present in the lower part of the CZ.Item f-mode strengthening from a localised bipolar subsurface magnetic field(Taylor and Francis Ltd., 2019-01-01) Singh, Nishant K.; Raichur, Harsha; Käpylä, Maarit J.; Rheinhardt, Matthias; Brandenburg, Axel; Käpylä, Petri J.; Department of Computer Science; Centre of Excellence Research on Solar Long-Term Variability and Effects, ReSoLVE; Professorship Vehtari Aki; Max Planck Institute for Solar System Research; KTH Royal Institute of TechnologyRecent numerical work in helioseismology has shown that a periodically varying subsurface magnetic field leads to a fanning of the f-mode, which emerges from a density jump at the surface. In an attempt to model a more realistic situation, we now modulate this periodic variation with an envelope, giving thus more emphasis on localised bipolar magnetic structures in the middle of the domain. Some notable findings are: (i) compared to the purely hydrodynamic case, the strength of the f-mode is significantly larger at high horizontal wavenumbers k, but the fanning is weaker for the localised subsurface magnetic field concentrations investigated here than the periodic ones studied earlier; (ii) when the strength of the magnetic field is enhanced at a fixed depth below the surface, the fanning of the f-mode in the (Formula presented.) diagram increases proportionally in such a way that the normalised f-mode strengths remain nearly the same in different such cases; (iii) the unstable Bloch modes reported previously in case of harmonically varying magnetic fields are now completely absent when more realistic localised magnetic field concentrations are imposed beneath the surface, thus suggesting that the Bloch modes are unlikely to be supported during most phases of the solar cycle; (iv) the f-mode strength appears to depend also on the depth of magnetic field concentrations such that it shows a relative decrement when the maximum of the magnetic field is moved to a deeper layer. We argue that detections of f-mode perturbations such as those being explored here could be effective tracers of solar magnetic fields below the photosphere before these are directly detectable as visible manifestations in terms of active regions or sunspots.Item Interaction of large- and small-scale dynamos in isotropic turbulent flows from GPU-accelerated simulations(IOP Publishing Ltd., 2021-02) Väisälä, Miikka; Pekkilä, Johannes; Käpylä, Maarit; Rheinhardt, Matthias; Shang, Hsien; Krasnopolsky, Ruben; Academia Sinica; Professorship Korpi-Lagg Maarit; Department of Computer ScienceMagnetohydrodynamical (MHD) dynamos emerge in many different astrophysical situations where turbulence is present, but the interaction between large-scale dynamos (LSDs) and small-scale dynamos (SSDs) is not fully understood. We performed a systematic study of turbulent dynamos driven by isotropic forcing in isothermal MHD with magnetic Prandtl number of unity, focusing on the exponential growth stage. Both helical and nonhelical forcing was employed to separate the effects of LSD and SSD in a periodic domain. Reynolds numbers (ReM) up to ≈250 were examined and multiple resolutions used for convergence checks. We ran our simulations with the Astaroth code, designed to accelerate 3D stencil computations on graphics processing units (GPUs) and to employ multiple GPUs with peer-to-peer communication. We observed a speedup of ≈35 in single-node performance compared to the widely used multi-CPU MHD solver Pencil Code. We estimated the growth rates from both the averaged magnetic fields and their power spectra. At low ReM LSD growth dominates, but at high ReM SSD appears to dominate in both helically and nonhelically forced cases. Pure SSD growth rates follow a logarithmic scaling as a function of ReM. Probability density functions of the magnetic field from the growth stage exhibit SSD behavior in helically forced cases even at intermediate ReM. We estimated mean field turbulence transport coefficients using closures like the second-order correlation approximation (SOCA). They yield growth rates similar to the directly measured ones and provide evidence of α quenching. Our results are consistent with the SSD inhibiting the growth of the LSD at moderate ReM, while the dynamo growth is enhanced at higher ReM.Item Investigating global convective dynamos with mean-field models: full spectrum of turbulent effects required(IOP Publishing Ltd., 2021-10) Warnecke, Jörn; Rheinhardt, Matthias; Viviani, Mariangela; Gent, Frederick; Tuomisto, Simo; Käpylä, Maarit J.; Department of Computer Science; Professorship Korpi-Lagg Maarit; Computer Science Professors; Computer Science - Large-scale Computing and Data Analysis (LSCA); Max Planck Institute for Solar System Research; Department of Computer ScienceThe role of turbulent effects for dynamos in the Sun and stars continues to be debated. Mean-field (MF) theory provides a broadly used framework to connect these effects to fundamental magnetohydrodynamics. While inaccessible observationally, turbulent effects can be directly studied using global convective dynamo (GCD) simulations. We measure the turbulent effects in terms of turbulent transport coefficients, based on the MF framework, from an exemplary GCD simulation using the test-field method. These coefficients are then used as an input into an MF model. We find a good agreement between the MF and GCD solutions, which validates our theoretical approach. This agreement requires all turbulent effects to be included, even those which have been regarded as unimportant so far. Our results suggest that simple dynamo models, as are commonly used in the solar and stellar community, relying on very few, precisely fine-tuned turbulent effects, may not be representative of the full dynamics of dynamos in global convective simulations and astronomical objects.Item Numerical evidence for a small-scale dynamo approaching solar magnetic Prandtl numbers(Nature Publishing Group, 2023-05-18) Warnecke, Jörn; Korpi-Lagg, Maarit J.; Gent, Frederick A.; Rheinhardt, Matthias; Department of Computer Science; Computer Science Professors; Computer Science - Large-scale Computing and Data Analysis (LSCA); Professorship Korpi-Lagg Maarit; Max Planck Institute for Solar System ResearchMagnetic fields on small scales are ubiquitous in the Universe. Although they can often be observed in detail, their generation mechanisms are not fully understood. One possibility is the so-called small-scale dynamo (SSD). Prevailing numerical evidence, however, appears to indicate that an SSD is unlikely to exist at very low magnetic Prandtl numbers (PrM) such as those that are present in the Sun and other cool stars. Here we have performed high-resolution simulations of isothermal forced turbulence using the lowest PrM values achieved so far. Contrary to earlier findings, the SSD not only turns out to be possible for PrM down to 0.0031 but also becomes increasingly easier to excite for PrM below about 0.05. We relate this behaviour to the known hydrodynamic phenomenon referred to as the bottleneck effect. Extrapolating our results to solar values of PrM indicates that an SSD would be possible under such conditions.Item On the existence of shear-current effects in magnetized burgulence(IOP Publishing Ltd., 2020-12-20) Käpylä, Maarit J.; Álvarez Vizoso, Javier; Rheinhardt, Matthias; Brandenburg, Axel; Singh, Nishant K.; Professorship Korpi-Lagg Maarit; Max Planck Institute for Solar System Research; Centre of Excellence Research on Solar Long-Term Variability and Effects, ReSoLVE; Nordita; Department of Computer ScienceThe possibility of explaining shear flow dynamos by a magnetic shear-current (MSC) effect is examined via numerical simulations. Our primary diagnostics is the determination of the turbulent magnetic diffusivity tensor η. In our setup, a negative sign of its component η yx is necessary for coherent dynamo action by the SC effect. To be able to measure turbulent transport coefficients from systems with magnetic background turbulence, we present an extension of the test-field method (TFM) applicable to our setup where the pressure gradient is dropped from the momentum equation: the nonlinear TFM (NLTFM). Our momentum equation is related to Burgers' equation and the resulting flows are referred to as magnetized burgulence. We use both stochastic kinetic and magnetic forcings to mimic cases without and with simultaneous small-scale dynamo action. When we force only kinetically, negative η yx are obtained with exponential growth in both the radial and azimuthal mean magnetic field components. Using magnetokinetic forcing, the field growth is no longer exponential, while NLTFM yields positive η yx . By employing an alternative forcing from which wavevectors whose components correspond to the largest scales are removed, the exponential growth is recovered, but the NLTFM results do not change significantly. Analyzing the dynamo excitation conditions for the coherent SC and incoherent α and SC effects shows that the incoherent effects are the main drivers of the dynamo in the majority of cases. We find no evidence for MSC-effect-driven dynamos in our simulations.Item Quenching and anisotropy of hydromagnetic turbulent transport(2014) Karak, Bidya Binay; Rheinhardt, Matthias; Brandenburg, Axel; Käpylä, Petri J.; Käpylä, Maarit J.; Centre of Excellence Research on Solar Long-Term Variability and Effects, ReSoLVEHydromagnetic turbulence affects the evolution of large-scale magnetic fields through mean-field effects like turbulent diffusion and the α effect. For stronger fields, these effects are usually suppressed or quenched, and additional anisotropies are introduced. Using different variants of the test-field method, we determine the quenching of the turbulent transport coefficients for the forced Roberts flow, isotropically forced non-helical turbulence, and rotating thermal convection. We see significant quenching only when the mean magnetic field is larger than the equipartition value of the turbulence. Expressing the magnetic field in terms of the equipartition value of the quenched flows, we obtain for the quenching exponents of the turbulent magnetic diffusivity about 1.3, 1.1, and 1.3 for Roberts flow, forced turbulence, and convection, respectively. However, when the magnetic field is expressed in terms of the equipartition value of the unquenched flows, these quenching exponents become about 4, 1.5, and 2.3, respectively. For the α effect, the exponent is about 1.3 for the Roberts flow and 2 for convection in the first case, but 4 and 3, respectively, in the second. In convection, the quenching of turbulent pumping follows the same power law as turbulent diffusion, while for the coefficient describing the Omega x J effect nearly the same quenching exponent is obtained as for α. For forced turbulence, turbulent diffusion proportional to the second derivative along the mean magnetic field is quenched much less, especially for larger values of the magnetic Reynolds number. However, we find that in corresponding axisymmetric mean-field dynamos with dominant toroidal field the quenched diffusion coefficients are the same for the poloidal and toroidal field constituents.Item Relic Gravitational Waves from the Chiral Magnetic Effect(IOP Publishing Ltd., 2021-04-20) Brandenburg, Axel; He, Yutong; Kahniashvili, Tina; Rheinhardt, Matthias; Schober, Jennifer; Department of Computer Science; Professorship Korpi-Lagg Maarit; Ilia State University; Stockholm University; Ècole Polytechnique Fédérale de LausanneRelic gravitational waves (GWs) can be produced by primordial magnetic fields. However, not much is known about the resulting GW amplitudes and their dependence on the details of the generation mechanism. Here we treat magnetic field generation through the chiral magnetic effect (CME) as a generic mechanism and explore its dependence on the speed of generation (the product of magnetic diffusivity and characteristic wavenumber) and the speed characterizing the maximum magnetic field strength expected from the CME. When the latter exceeds the former (regime I), which is the regime applicable to the early universe, we obtain an inverse cascade with moderate GW energy that scales with the third power of the magnetic energy. When the generation speed exceeds the CME limit (regime II), the GW energy continues to increase without a corresponding increase of magnetic energy. In the early kinematic phase, the GW energy spectrum (per linear wavenumber interval) has opposite slopes in both regimes and is characterized by an inertial range spectrum in regime I and a white noise spectrum in regime II. The occurrence of these two slopes is shown to be a generic consequence of a nearly monochromatic exponential growth of the magnetic field. The resulting GW energy is found to be proportional to the fifth power of the limiting CME speed and the first power of the generation speed.Item Scalable communication for high-order stencil computations using CUDA-aware MPI(Elsevier, 2022-07) Pekkilä, Johannes; Väisälä, Miikka S.; Käpylä, Maarit J.; Rheinhardt, Matthias; Lappi, Oskar; Department of Computer Science; Professorship Korpi-Lagg Maarit; Computer Science Professors; Computer Science - Large-scale Computing and Data Analysis (LSCA); Åbo Akademi University; Academia Sinica Institute of Astronomy and AstrophysicsModern compute nodes in high-performance computing provide a tremendous level of parallelism and processing power. However, as arithmetic performance has been observed to increase at a faster rate relative to memory and network bandwidths, optimizing data movement has become critical for achieving strong scaling in many communication-heavy applications. This performance gap has been further accentuated with the introduction of graphics processing units, which can provide by multiple factors higher throughput in data-parallel tasks than central processing units. In this work, we explore the computational aspects of iterative stencil loops and implement a generic communication scheme using CUDA-aware MPI, which we use to accelerate magnetohydrodynamics simulations based on high-order finite differences and third-order Runge–Kutta integration. We put particular focus on improving intra-node locality of workloads. Our GPU implementation scales strongly from one to 64 devices at 50%–87% of the expected efficiency based on a theoretical performance model. Compared with a multi-core CPU solver, our implementation exhibits 20–60× speedup and 9–12× improved energy efficiency in compute-bound benchmarks on 16 nodes.Item Turbulent transport coefficients in spherical wedge dynamo simulations of solar-like stars(2018) Warnecke, Jörn; Rheinhardt, Matthias; Tuomisto, Simo; Käpylä, Petri J.; Käpylä, Maarit J.; Brandenburg, Axel; Max-Planck-Institut für Sonnensystemforschung; Department of Computer Science; University of Helsinki; Centre of Excellence Research on Solar Long-Term Variability and Effects, ReSoLVE; KTH Royal Institute of TechnologyWe investigate the magnetic field generation in global solar-like convective dynamos in the framework of mean-field theory. We simulate a solar-type star in a wedge-shaped spherical shell, where the interplay between convection and rotation self-consistently drives large-scale dynamo. To analyze the dynamo mechanism we apply the test-field method for azimuthally (φ) averaged fields to determine the 27 turbulent transport coefficients of the electromotive force, of which 9 are related to the α effect tensor. This method has previously been used either in simulations in Cartesian coordinates or in the geodynamo context and it is applied here for the first time in simulations of solar-like dynamo action. We find that the φφ -component of the $\alpha$ tensor does not follow the profile expected from that of kinetic helicity. Beside the dominant $\alpha$-$\Omega$ dynamo, also an α dynamo is locally enhanced. The turbulent pumping velocities significantly alter the effective mean flows acting on the magnetic field and therefore challenge the flux transport dynamo concept. All coefficients are significantly affected due to dynamically important magnetic fields with quenching as well as enhancement being observed. This leads to a modulation of the coefficients with the activity cycle. The temporal variations are found to be comparable to the time-averaged value and seem to be responsible for a nonlinear feedback on the magnetic field generation. Furthermore, we quantify the validity of the Parker-Yoshimura rule for the equatorward propagation of the mean magnetic field in the present case.