Neko: a Portable Framework for High-Order Spectral Element Flow Simulations
Technical Description
Neko is a portable framework for high-order spectral element based simulations, focusing on the incompressible regime. The framework is written in modern Fortran and adopts an object-oriented approach, allowing for multi-tier abstractions of the solver stack and facilitating various hardware backends, ranging from general-purpose processors, accelerators, and vector processors, to limited support of FPGA. Neko focuses on single core/single accelerator efficiency via fast tensor-product operator evaluations. The primary consideration in Neko is how to efficiently utilize different computer hard- ware without re-implementing the entire framework for each supported backend. We solve this problem by hiding the implementation of backend-dependent low-level kernels behind a common interface realized as an abstract Fortran type. This way, types implementing higher-level concepts, for example, the fluid solver, can remain completely backend-agnostic.
Neko Explainer
If the above technical description was not what you’re looking for, check out the explainer answers to some common questions below.
What can Neko simulate?
Neko has its roots in the Nek codes so it will come as no surprise that Neko can run similar types of incompressible flow simulations. It can also simulate convection and flettner rotors for propelling ships. Overall, though, Neko is particularly suited to fundamental turbulence research, helping us understand what happens to fluids when they come in contact with a wall.
What are the trade-offs of using Neko?
One of the biggest advantages to using Neko is that the user doesn’t need to do anything to make Neko run on different hardware architectures. The code is written in a way that users simply set up the simulation and under the hood the code assesses what hardware is available and chooses the correct kernel for running on that hardware. This is what we mean when calling Neko portable and back-end agnostic. The user and the CFD solver do not need to care what hardware they’re running on.
Furthermore, Neko can to extremely fast direct numerical simulation (DNS) of fluid flows. DNS means that for every geometric point in the simulated flow, the code directly calculates solutions to the Navier-Stokes equations instead of using a turbulence model that approximates what should be happening in a given geometric point of the flow. Part of why Neko can run these DNS calculations so quickly is that it uses hexahedral elements (building blocks) to create a geometric grid, also called the mesh, for simulating the fluid flow.
A trade off of the hexahedral elements, though, is that they aren’t good at describing the space around complex objects like an entire car or airplane. Imagine having a box full of hexahedral blocks and a model airplane and trying to pack the model in the blocks in a way that you have no empty space between the model and the blocks. If any empty spaces are left between the model and the blocks, that’s missing data in the simulation. For now, it means that the simulation is best at simpler objects like only part of the airplane or car.
What could Neko do better?
Neko needs to support complex geometries. It is currently a great tool for understanding the nature of turbulence but could be useful to industrial problems if it could simulate turbulence around complex geometries like an entire car or plane.
What will CEEC aim to improve about Neko?
CEEC work will focus on increasing the complexity of geometries that Neko can simulate as well as increasing its scalability. This work is driven by the merchant ship hull lighthouse case. A ship hull is a less geometrically complex object than a car but still more complex than Neko’s current capacity. It’s also simulation on an entirely different scale. As an example, a ten-centimeter patch of a merchant ship hull already needs one hundred million elements (building blocks) to simulate. Hence, the scale of the entire ship hull will be an enormous test of Neko scalability; it’s ability to efficiently use up to an entire Exascale HPC system.
The other work CEEC will do is adding the ability to simulate topology optimization in Neko. This will be driven by the static mixer lighthouse case.
Why are these improvements a challenge?
Making the improvements that will allow Neko to run the merchant ship hull simulation is challenging for two reasons. First, it may be necessary to write new numerical methods to make the hexahedral elements work with the more complex geometry of the ship hull. Second, it will take time, iterative code tweaking, and test runs on both small and large portions of HPC systems to ensure that Neko can run a simulation of complex geometries while maintaining its performance efficiency on the largest European HPC systems. Any small problem introduced by more complex geometries could be crippling at Exascale.
In terms of the topology optimization simulation, giving Neko the ability to run flow simulations while also iteratively evaluating and optimizing the results of the simulation for maximum mixture and minimum turbulence has the potential to make the code less stable. During the optimization process, Neko has to look back in time at previous simulations while preparing future simulations in ways that it currently doesn’t know how to do.
What real-world benefits will an improved Neko help achieve?
Being able to directly numerically simulate fluid flow and turbulence around complex geometries will make it possible to simulate more real-world applicable use cases. If industrial users are able to benefit from the accuracy and level of detail provided by Neko, their simulations could lead to direct societal benefits like more energy efficient transportation or production of food and medications, in the case of topology optimization. Meanwhile, all the data generated by these simulations will deepen our understanding of how turbulence works, which will lead to improved turbulence models that can be implemented in other codes and types of simulations.
Important Links
Related Lighthouse Cases
Related Posts
-
Diving into MareNostrum 5: CEEC at MNHACK24
This fall, a group of researchers from across Europe gathered at the Barcelona Supercomputing Center (BSC) for MNHACK , the sixth hackathon centered on the MareNostrum systems, this time MareNostrum 5. Among them were many CEEC-ers there to prepare our codes for optimal performance on this young machine while exploring its scalability and energy consumption.
-
Just Published: CEEC Energy to solution Best Practice Guide!
Measuring energy to solution isn’t just more complicated than measuring time to solution, it’s also less familiar and less top of mind for most users. Hence, CEEC has published our experience and some best practices to help the EuropeanHPC community learn more about measuring energy to solution across systems and applications.
-
CEEC at ECCOMAS 2024
CEEC at ECCOMAS 2024 CEEC will have a robust presence at the 9th European Congress on Computational Methods in Applied Sciences and Engineering (ECCOMAS24) this summer in Lisbon, Portugal! Over […]