SearcharxivSearch

arXiv subjects

David Moxey

Publications and source records attributed to David Moxey.

At least 19 recordsLinked to original sources

NektarIR: A Domain-Specific Compiler for High-Order Finite Element Operations on Heterogeneous Hardware

Modern high performance computing (HPC) applications must target heterogeneous hardware. This requires significant work to ensure domain specific implementations translate to highly performant kernels across a range hardware types and vendors, each requiring bespoke optimization to make use of the specific target architecture. Through the development of a domain specific compiler built with the multi-level intermediate representations (MLIR) project, one can express a high-level, close to the specific domain, abstraction that is progressively lowered to a low, close to metal, abstraction. At each intermediate representation (IR), appropriate optimizations can be applied without costly analysis due to the knowledge embedded in the domain specific IRs. We apply this method to the construction of discrete differential operators for use in spectral/hp element method solvers for computational fluid dynamics (CFD). Here, the performance is driven by a small set of common finite element operators that are composed to create kernels for the discrete differential operators used to solve weak partial differential equations. We create our own MLIR dialect to represent these operators and implement a bespoke lowering pipeline to facilitate the just-in-time compilation of these kernels for both CPU and GPU architecture and illustrate performance comparisons with the Nektar++ spectral/hp element framework.

cs.MS

Implicit Velocity Correction Schemes for Scale-Resolving Simulations of Incompressible Flow: Stability, Accuracy, and Performance

Scale-resolving simulations of high Reynolds number incompressible flows are often limited by the Courant-Friedrichs-Lewy (CFL) stability restriction imposed by explicit time-stepping schemes, resulting in small time step sizes and long time-to-solution. In this work, we systematically compare two implicit formulations of the velocity correction scheme -- a linear-implicit approach and a sub-stepping (or semi-Lagrangian) method -- against a standard semi-implicit formulation within a high-order spectral/hp element framework. The schemes are assessed in terms of stability limits, temporal accuracy, and computational performance for implicit large-eddy simulation of the Imperial Front Wing benchmark, a complex high Reynolds number geometry with curved surfaces that imposes strict CFL constraints. Both implicit schemes extend the stability limit by up to two orders of magnitude in time step size. While increasing the cost per time step, they reduce the overall time-to-solution by up to a factor of eleven. Accuracy analysis shows that time step sizes up to twenty times larger than the explicit limit have only minor impact on resolving laminar-turbulent transition and key flow statistics. The results quantify the trade-off between stability, accuracy, and computational cost for implicit velocity correction schemes on complex geometries and provide guidance for selecting time integration strategies in large-scale scale-resolving simulations.

physics.flu-dyn

Architecture-aware $h$-to-$p$ optimisation: spectral/$hp$ element operators for mixed-element meshes

We extend earlier international efforts to optimise hexahedral-based spectral element methods on GPUs and vectorised CPUs to mixed element meshes additionally involving prismatic, pyramidic, and tetrahedral shapes using tensorial expansions. We demonstrate that common finite element operators (such as the mass and Helmholtz matrices) benefit from alternative implementation strategies depending on the element shape, choice of polynomial order, and system architecture in order to achieve optimal performance. In addition, we introduce a new approach/interpretation to efficiently evaluate more complex operations involving inner products with the derivative of the expansions as part of the integrand such as the stiffness matrix. This approach seeks to maximise operations using the collocation properties of the nodal tensorial expansion associated with classical quadrature rules. Our GPU performance tests demonstrate that the throughput of the Helmholtz operator on tetrahedral elements is at most 2.5 times slower than on hexahedral elements, despite tetrahedra having a factor of six greater floating-point operations.

math.NA

A geometrically informed algebraic multigrid preconditioned iterative approach for solving high-order finite element systems

Algebraic multigrid (AMG) is conventionally applied in a black-box fashion, agnostic to the underlying geometry. In this work, we propose that using geometric information -- when available -- to assist with setting up the AMG hierarchy is beneficial, especially for solving linear systems resulting from high-order finite element discretizations. High-order problems draw considerable interest to both the scientific and engineering communities, but lack efficient solvers, at least open-source codes, tailored for unstructured high-order discretizations targeting large-scale, real-world applications. For geometric multigrid, it is known that using p-coarsening before h-coarsening can provide better scalability, but setting up p-coarsening is non-trivial in AMG. We develop a geometrically informed algebraic multigrid (GIAMG) method, as well as an associated high-performance computing program, which is able to set up a grid hierarchy that includes p-coarsening at the top grids with minimal information of the geometry from the user. A major advantage of using p-coarsening with AMG -- beyond the benefits known in the context of geometric multigrid (GMG) -- is the increased sparsification of coarse grid operators. We extensively evaluate GIAMG by testing on the 3D Helmholtz and incompressible flow problems, and demonstrate mesh-independent convergence, and excellent parallel scalability. We also compare the performance of GIAMG with existing AMG packages, including Hypre and ML.

math.NA

Unified interface flux evaluation in a general discontinuous Galerkin spectral element framework

High-order discontinuous Galerkin spectral element methods (DGSEM) have received growing attention and development, especially in the regime of computational fluid dynamics in recent years. The inherent flexibility of the discontinuous Galerkin approach in handling non-conforming interfaces, such as those encountered in moving geometries or hp-refinement, presents a significant advantage for real-world simulations. Despite the well-established mathematical framework of DG methods, practical implementation challenges persist to boost performance and capability. Most previous studies only focus on certain choices of element shape or basis type in a structured mesh, although they have demonstrated the capability of DGSEM in complex flow simulations. This work discusses the low-cost and unified interface flux evaluation approaches for general spectral elements in unstructured meshes, alongside their implementations in the open-source spectral element framework, Nektar++. The initial motivation arises from the discretization of Helmholtz equations by the symmetric interior penalty method, in which the system matrix can easily become non-symmetric if the flux is not properly evaluated on non-conforming interfaces. We focus on the polynomial non-conforming case in this work but extending to the geometric non-conforming case is theoretically possible. Comparisons of different approaches, trade-offs, and performance of benchmark of our initial matrix-free implementation are also included, contributing to the broader discourse on high-performance spectral element method implementations.

math.NA

Fast Barycentric-Based Evaluation Over Spectral/hp Elements

As the use of spectral/$hp$ element methods, and high-order finite element methods in general, continues to spread, community efforts to create efficient, optimized algorithms associated with fundamental high-order operations have grown. Core tasks such as solution expansion evaluation at quadrature points, stiffness and mass matrix generation, and matrix assembly have received tremendousattention. With the expansion of the types of problems to which high-order methods are applied, and correspondingly the growth in types of numerical tasks accomplished through high-order methods, the number and types of these core operations broaden. This work focuses on solution expansion evaluation at arbitrary points within an element. This operation is core to many postprocessing applications such as evaluation of streamlines and pathlines, as well as to field projection techniques such as mortaring. We expand barycentric interpolation techniques developed on an interval to 2D (triangles and quadrilaterals) and 3D (tetrahedra, prisms, pyramids, and hexahedra) spectral/$hp$ element methods. We provide efficient algorithms for their implementations, and demonstrate their effectiveness using the spectral/$hp$ element library Nektar++.

math.NA

Industry-Relevant Implicit Large-Eddy Simulation of a High-Performance Road Car via Spectral/hp Element Methods

We present a successful deployment of high-fidelity Large-Eddy Simulation (LES) technologies based on spectral/hp element methods to industrial flow problems, which are characterized by high Reynolds numbers and complex geometries. In particular, we describe the numerical methods, software development and steps that were required to perform the implicit LES of a real automotive car, namely the Elemental Rp1 model. To the best of the authors' knowledge, this simulation represents the first fifth-order accurate transient LES of an entire real car geometry. Moreover, this constitutes a key milestone towards considerably expanding the computational design envelope currently allowed in industry, where steady-state modelling remains the standard. To this end, a number of novel developments had to be made in order to overcome obstacles in mesh generation and solver technology to achieve this simulation, which we detail in this paper. The main objective is to present to the industrial and applied mathematics community, a viable pathway to translate academic developments into industrial tools, that can substantially advance the analysis and design capabilities of high-end engineering stakeholders. The novel developments and results were achieved using the academic-driven open-source framework Nektar++.

cs.CE

A comparison of interpolation techniques for non-conformal high-order discontinuous Galerkin methods

The capability to incorporate moving geometric features within models for complex simulations is a common requirement in many fields. Fluid mechanics within aeronautical applications, for example, routinely feature rotating (e.g. turbines, wheels and fan blades) or sliding components (e.g. in compressor or turbine cascade simulations). With an increasing trend towards the high-fidelity modelling of these cases, in particular combined with the use of high-order discontinuous Galerkin methods, there is therefore a requirement to understand how different numerical treatments of the interfaces between the static mesh and the sliding/rotating part impact on overall solution quality. In this article, we compare two different approaches to handle this non-conformal interface. The first is the so-called mortar approach, where flux integrals along edges are split according to the positioning of the non-conformal grid. The second is a less-documented point-to-point interpolation method, where the interior and exterior quantities for flux evaluations are interpolated from elements lying on the opposing side of the interface. Although the mortar approach has significant advantages in terms of its numerical properties, in that it preserves the local conservation properties of DG methods, in the context of complex 3D meshes it poses notable implementation difficulties which the point-to-point method handles more readily. In this paper we examine the numerical properties of each method, focusing not only on observing convergence orders for smooth solutions, but also how each method performs in under-resolved simulations of linear and nonlinear hyperbolic problems, to inform the use of these methods in implicit large-eddy simulations.

math.NA

Accelerating Uncertainty Quantification of Groundwater Flow Modelling Using a Deep Neural Network Proxy

Quantifying the uncertainty in model parameters and output is a critical component in model-driven decision support systems for groundwater management. This paper presents a novel algorithmic approach which fuses Markov Chain Monte Carlo (MCMC) and Machine Learning methods to accelerate uncertainty quantification for groundwater flow models. We formulate the governing mathematical model as a Bayesian inverse problem, considering model parameters as a random process with an underlying probability distribution. MCMC allows us to sample from this distribution, but it comes with some limitations: it can be prohibitively expensive when dealing with costly likelihood functions, subsequent samples are often highly correlated, and the standard Metropolis-Hastings algorithm suffers from the curse of dimensionality. This paper designs a Metropolis-Hastings proposal which exploits a deep neural network (DNN) approximation of a groundwater flow model, to significantly accelerate MCMC sampling. We modify a delayed acceptance (DA) model hierarchy, whereby proposals are generated by running short subchains using an inexpensive DNN approximation, resulting in a decorrelation of subsequent fine model proposals. Using a simple adaptive error model, we estimate and correct the bias of the DNN approximation with respect to the posterior distribution on-the-fly. The approach is tested on two synthetic examples; a isotropic two-dimensional problem, and an anisotropic three-dimensional problem. The results show that the cost of uncertainty quantification can be reduced by up to 50% compared to single-level MCMC, depending on the precomputation cost and accuracy of the employed DNN.

stat.CO

$rp$-adaptation for compressible flows

We present an $rp$-adaptation strategy for high-fidelity simulation of compressible inviscid flows with shocks. The mesh resolution in regions of flow discontinuities is increased by using a variational optimiser to $r$-adapt the mesh and cluster degrees of freedom there. In regions of smooth flow, we locally increase or decrease the local resolution through increasing or decreasing the polynomial order of the elements, respectively. This dual approach allows us to take advantage of the strengths of both methods for best computational performance, thereby reducing the overall cost of the simulation. The adaptation workflow uses a sensor for both discontinuities and smooth regions that is cheap to calculate, but the framework is general and could be used in conjunction with other feature-based sensors or error estimators. We demonstrate this proof-of-concept using two geometries at transonic and supersonic flow regimes. The method has been implemented in the open-source spectral/$hp$ element framework $Nektar++$, and its dedicated high-order mesh generation tool $NekMesh$. The results show that the proposed $rp$-adaptation methodology is a reasonably cost-effective way of improving accuracy.

physics.comp-ph

Nektar++: Design and implementation of an implicit, spectral/$hp$ element, compressible flow solver using a Jacobian-free Newton Krylov approach

At high Reynolds numbers, the use of explicit in time compressible flow simulations with spectral/$hp$ element discretization can become significantly limited by time step. To alleviate this limitation we extend the capability of the spectral/$hp$ element open-source software framework, Nektar++, to include an implicit discontinuous Galerkin compressible flow solver. The integration in time is carried out by a singly diagonally implicit Runge-Kutta method. The non-linear system arising from the implicit time integration is iteratively solved by the Jacobian-free Newton Krylov (JFNK) method. A favorable feature of the JFNK approach is its extensive use of the explicit operators available from the previous explicit in time implementation. The functionalities of different building blocks of the implicit solver are analyzed from the point of view of software design and placed in appropriate hierarchical levels in the C++ libraries. In the detailed implementation, the contributions of different parts of the solver to computational cost, memory consumption, and programming complexity are also analyzed. A combination of analytical and numerical methods is adopted to simplify the programming complexity in forming the preconditioning matrix. The solver is verified and tested using cases such as manufactured compressible Poiseuille flow, Taylor-Green vortex, turbulent flow over a circular cylinder at $\text{Re}=3900$ and shock wave boundary-layer interaction. The results show that the implicit solver can speed-up the simulations while maintaining good simulation accuracy.

physics.flu-dyn

Nektar++: enhancing the capability and application of high-fidelity spectral/$hp$ element methods

Nektar++ is an open-source framework that provides a flexible, high-performance and scalable platform for the development of solvers for partial differential equations using the high-order spectral/$hp$ element method. In particular, Nektar++ aims to overcome the complex implementation challenges that are often associated with high-order methods, thereby allowing them to be more readily used in a wide range of application areas. In this paper, we present the algorithmic, implementation and application developments associated with our Nektar++ version 5.0 release. We describe some of the key software and performance developments, including our strategies on parallel I/O, on in situ processing, the use of collective operations for exploiting current and emerging hardware, and interfaces to enable multi-solver coupling. Furthermore, we provide details on a newly developed Python interface that enables a more rapid introduction for new users unfamiliar with spectral/$hp$ element methods, C++ and/or Nektar++. This release also incorporates a number of numerical method developments - in particular: the method of moving frames, which provides an additional approach for the simulation of equations on embedded curvilinear manifolds and domains; a means of handling spatially variable polynomial order; and a novel technique for quasi-3D simulations to permit spatially-varying perturbations to the geometry in the homogeneous direction. Finally, we demonstrate the new application-level features provided in this release, namely: a facility for generating high-order curvilinear meshes called NekMesh; a novel new AcousticSolver for aeroacoustic problems; our development of a 'thick' strip model for the modelling of fluid-structure interaction problems in the context of vortex-induced vibrations. We conclude by commenting some directions for future code development and expansion.

cs.MS

Spectral/hp element simulation of flow past a Formula One front wing: validation against experiments

Emerging commercial and academic tools are regularly being applied to the design of road and race cars, but there currently are no well-established benchmark cases to study the aerodynamics of race car wings in ground effect. In this paper we propose a new test case, with a relatively complex geometry, supported by the availability of CAD model and experimental results. We refer to the test case as the Imperial Front Wing, originally based on the front wing and endplate design of the McLaren 17D race car. A comparison of different resolutions of a high fidelity spectral/hp element simulation using under-resolved DNS/implicit LES approach with fourth and fifth polynomial order is presented. The results demonstrate good correlation to both the wall-bounded streaklines obtained by oil flow visualization and experimental PIV results, correctly predicting key characteristics of the time-averaged flow structures, namely intensity, contours and locations. This study highlights the resolution requirements in capturing salient flow features arising from this type of challenging geometry, providing an interesting test case for both traditional and emerging high-fidelity simulations.

physics.flu-dyn

A semi-structured approach to curvilinear mesh generation around streamlined bodies

We present an approach for robust high-order mesh generation specially tailored to streamlined bodies. The method is based on a semi-sructured approach which combines the high quality of structured meshes in the near-field with the flexibility of unstructured meshes in the far-field. We utilise medial axis technology to robustly partition the near-field into blocks which can be meshed coarsely with a linear swept mesher. A high-order mesh of the near-field is then generated and split using an isoparametric approach which allows us to obtain highly stretched elements aligned with the flow field. Special treatment of the partition is performed on the wing root juntion and the trailing edge --- into the wake --- to obtain an H-type mesh configuration with anisotropic hexahedra ideal for the strong shear of high Reynolds number simulations. We then proceed to discretise the far-field using traditional robust tetrahedral meshing tools. This workflow is made possible by two sets of tools: CADfix, focused on CAD system, the block partitioning of the near-field and the generation of a linear mesh; and NekMesh, focused on the curving of the high-order mesh and the generation of highly-stretched boundary layer elements. We demonstrate this approach on a NACA0012 wing attached to a wall and show that a gap between the wake partition and the wall can be inserted to remove the dependency of the partitioning procedure on the local geometry.

cs.CG

A variational approach to high-order r-adaptation

A variational framework, initially developed for high-order mesh optimisation, is being extended for r-adaptation. The method is based on the minimisation of a functional of the mesh deformation. To achieve adaptation, elements of the initial mesh are manipulated using metric tensors to obtain target elements. The nonlinear optimisation in turns adapts the final high-order mesh to best fit the description of the target elements by minimising the element distortion. Encouraging preliminary results prove that the method behaves well and can be used in the future for more extensive work which shall include the use of error indicators from CFD simulations.

cs.CG

High-order curvilinear hybrid mesh generation for CFD simulations

We describe a semi-structured method for the generation of high-order hybrid meshes suited for the simulation of high Reynolds number flows. This is achieved through the use of highly stretched elements in the viscous boundary layers near the wall surfaces. CADfix is used to first repair any possible defects in the CAD geometry and then generate a medial object based decomposition of the domain that wraps the wall boundaries with partitions suitable for the generation of either prismatic or hexahedral elements. The latter is a novel distinctive feature of the method that permits to obtain well-shaped hexahedral meshes at corners or junctions in the boundary layer. The medial object approach allows greater control on the "thickness" of the boundary-layer mesh than is generally achievable with advancing layer techniques. CADfix subsequently generates a hybrid straight sided mesh of prismatic and hexahedral elements in the near-field region modelling the boundary layer, and tetrahedral elements in the far-field region covering the rest of the domain. The mesh in the near-field region provides a framework that facilitates the generation, via an isoparametric technique, of layers of highly stretched elements with a distribution of points in the direction normal to the wall tailored to efficiently and accurately capture the flow in the boundary layer. The final step is the generation of a high-order mesh using NekMesh, a high-order mesh generator within the Nektar++ framework. NekMesh uses the CADfix API as a geometry engine that handles all the geometrical queries to the CAD geometry required during the high-order mesh generation process. We will describe in some detail the methodology using a simple geometry, a NACA wing tip, for illustrative purposes. Finally, we will present two examples of application to reasonably complex geometries proposed by NASA as CFD validation cases.

cs.GR

Combined CG-HDG Method for Elliptic Problems: Performance Model

We combine continuous and discontinuous Galerkin methods in the setting of a model diffusion problem. Starting from a hybrid discontinuous formulation, we replace element interiors by more general subsets of the computational domain - groups of elements that support a piecewise-polynomial continuous expansion. This step allows us to identify a~new weak formulation of Dirichlet boundary condition in the continuous framework. We examine the expected performance of a Galerkin solver that would use continuous Galerkin method with weak Dirichlet boundary conditions in each mesh partition and connect partitions weakly using trace variable as in HDG method.

physics.comp-ph

Implicit Large Eddy Simulation of a wingtip vortex at $Re_c = 1.2\cdot 10^6$

In this article we present recent developments in numerical methods for performing a Large Eddy Simulation (LES) of the formation and evolution of a wingtip vortex. The development of these vortices in the near wake, in combination with the large Reynolds numbers present in these cases, make these types of test cases particularly challenging to investigate numerically. We first give an overview of the Spectral Vanishing Viscosity--implicit LES (SVV-iLES) solver that is used to perform the simulations, and highlight techniques that have been adopted to solve various numerical issues that arise when studying such cases. To demonstrate the method's viability, we present results from numerical simulations of flow over a NACA 0012 profile wingtip at $Re_c = 1.2\cdot 10^6$ and compare them against experimental data, which is to date the highest Reynolds number achieved for a LES that has been correlated with experiments for this test case. Our model correlates favorably with experiment, both for the characteristic jetting in the primary vortex and pressure distribution on the wing surface. The proposed method is of general interest for the modeling of transitioning vortex dominated flows over complex geometries.

physics.flu-dyn