-
Nektar++: Design and implementation of an implicit, spectral/$hp$ element, compressible flow solver using a Jacobian-free Newton Krylov approach
Authors:
Zhen-Guo Yan,
Yu Pan,
Giacomo Castiglioni,
Koen Hillewaert,
Joaquim Peiró,
David Moxey,
Spencer J. Sherwin
Abstract:
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 car…
▽ More
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.
△ Less
Submitted 11 February, 2020;
originally announced February 2020.
-
$rp$-adaptation for compressible flows
Authors:
Julian Marcon,
Giacomo Castiglioni,
David Moxey,
Spencer J. Sherwin,
Joaquim Peiró
Abstract:
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…
▽ More
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.
△ Less
Submitted 18 September, 2020; v1 submitted 24 September, 2019;
originally announced September 2019.
-
Nektar++: enhancing the capability and application of high-fidelity spectral/$hp$ element methods
Authors:
David Moxey,
Chris D. Cantwell,
Yan Bao,
Andrea Cassinelli,
Giacomo Castiglioni,
Sehun Chun,
Emilia Juda,
Ehsan Kazemi,
Kilian Lackhove,
Julian Marcon,
Gianmarco Mengaldo,
Douglas Serson,
Michael Turner,
Hui Xu,
Joaquim Peiró,
Robert M. Kirby,
Spencer J. Sherwin
Abstract:
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…
▽ More
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.
△ Less
Submitted 26 November, 2019; v1 submitted 8 June, 2019;
originally announced June 2019.
-
High-order curvilinear hybrid mesh generation for CFD simulations
Authors:
Julian Marcon,
Michael Turner,
Joaquim Peiró,
David Moxey,
Claire R. Pollard,
Henry Bucklow,
Mark Gammon
Abstract:
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 th…
▽ More
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.
△ Less
Submitted 4 January, 2019;
originally announced January 2019.
-
A variational approach to high-order r-adaptation
Authors:
Julian Marcon,
Michael Turner,
David Moxey,
Spencer J. Sherwin,
Joaquim Peiró
Abstract:
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 des…
▽ More
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.
△ Less
Submitted 4 January, 2019;
originally announced January 2019.