An efficient implementation of compact third-order implicit reconstruction solver with a simple WBAP limiter for compressible flows on unstructured meshes

In this paper, we present the development of a third-order density-based solver within the OpenFOAM framework, tailored for handling compressible flows. The solver incorporates implicit variational reconstruction on three-dimensional unstructured meshes, as well as a novel technology coupling reconstruction and time integration for both steady and unsteady simulations. To address the challenge of achieving high-order accuracy for curved geometries, we introduce a new approach for curved wall boundary reconstruction, specifically designed for situations where high-order mesh information is not readily available in OpenFOAM. Furthermore, we propose a simple WBAP limiter capable of capturing shocks without necessitating the whole-domain successive limiting procedure. Numerical tests were conducted to assess the solver's performance. The results reveal that our established solver exhibits higher accuracy in smooth flow simulations, while maintaining an excellent balance between accuracy and robustness for problems involving strong shocks and other complex flow structures.


Introduction
Computational fluid dynamics (CFD) solvers, utilizing finite volume (FV) methods on unstructured meshes, play a crucial role in aerospace engineering research and aircraft design due to their capability to effectively handle complex geometries.Among the widely-used CFD libraries, OpenFOAM (Jasak, 1996) stands out as a prominent C++ based framework.Notably, several density-based solvers have been developed within Open-FOAM, including rhoCentralFoam (Kurganov & Tadmor, 2000) in the standard package, blastFoam (Heylmun et al., n.d.), and RGDFoam (Qi et al., 2022).Despite the widespread use of the solvers developed in this framework (R. Li et al., 2022), it is crucial to acknowledge their reliance on second-order FV methods.This dependence gives rise to a notable limitation as second-order schemes are known to introduce considerable numerical dissipation, thereby compromising the accuracy of simulations when dealing with essential flow phenomena such as shocks, vortices, and turbulence.
To mitigate these limitations and improve simulation accuracy, there has been a surge of interest in the development of high-order FV methods.These advanced techniques aim to effectively capture intricate flow structures while preserving computational efficiency.Substantial further research and development in this domain CONTACT Shu Li lishu@buaa.edu.cn are imperative to propel the capabilities of CFD solvers and enable more precise and dependable predictions in aerospace engineering and other fluid dynamics applications.Similar to finite difference (FD) methods (Dong et al., 2023;Zhou & Dong, 2021), FV methods are utilized to solve equations exclusively for the cell average of conservative variables or primitive variables.However, for attaining higher accuracy in simulations, both FD and FV methods necessitate the incorporation of larger stencils that encompass an increased number of neighbouring cells during the reconstruction process.One effective approach to attain this increased accuracy is through the implementation of weighted essentially nonoscillatory (WENO) schemes, as demonstrated in studies by (Ji et al., 2022(Ji et al., , 2023;;Tsoutsanis, 2019).Nonetheless, the extensive reconstruction stencil presents challenges in coding complexity and obstructs parallel computation, especially at inter-processor boundaries (Busto et al., 2020;Godunov, 1959;Tsoutsanis & Dumbser, 2021).Furthermore, the extensive reconstruction stencil cannot be directly applied to physical boundaries.Over the past two decades, research into high-order methods with compact stencils involving only face-neighbouring cells has emerged as a crucial area of interest, exemplified by the discontinuous Galerkin (DG) method (Proskurov et al., 2022).
Compared to the successful implementation of highorder time discretization (Mangani et al., 2015), achieving high-order spatial discretization within the OpenFOAM framework poses significant challenges.However, in recent years, notable advancements have been made through the development of high-order solvers, showcasing superior performance compared to traditional second-order solvers.Among these solvers, the first class (Vevek, 2020) utilizes the FD method, efficiently achieving high-order accuracy and demonstrating the ability to simulate problems with intricate flow structures.Nevertheless, these solvers have a limitation, as they are not directly applicable to unstructured meshes.An alternative class of solvers (Xu et al., 2017) relies on the DG method, which exhibits the capability to address flow problems on unstructured meshes.However, integrating the DG method into the OpenFOAM framework poses challenges, particularly in adapting pre-processing and post-processing interfaces.This article's primary objective is to develop a high-order density-based unstructured solver capable of simulating compressible flows.
Considering the interfaces of OpenFOAM, it is imperative to adopt reconstruction with a compact stencil for compressible solvers, as only direct face neighbouring information is accessible during communication across inter-processor boundaries.This limitation is the primary reason why high-order FV unstructured CFD solvers (Antoniadis et al., 2022) are seldom developed in OpenFOAM.In response to the challenges posed by the extensive stencil of high-order reconstruction, a series of compact implicit reconstruction procedures on unstructured meshes have been recently introduced (Wang et al., 2016a(Wang et al., , 2016b(Wang et al., , 2017)).These implicit reconstruction procedures offer an efficient solution on the compact stencil.Furthermore, variational reconstruction procedures are specifically designed to address some of the key deficiencies associated with non-compact reconstruction procedures.
High-order accurate implementation of wall boundary in curved geometries is crucial, several approaches (Krivodonova & Berger, 2006;Lübon et al., 2006) have been presented for DG methods, which are particularly sensitive to the accuracy of curved wall boundaries.To achieve the desired solution accuracy, we employ the approach proposed by (Lübon et al., 2006) to reconstruct the curved boundary from the flat boundary for highorder FV methods.This step is necessary as high-order mesh information is currently unavailable in the Open-FOAM framework.Importantly, this approach does not require an exact description of the geometry surface.
A major concern with FV schemes that have accuracy higher than first order is that the polynomials of the solution cannot be directly used for convective flux evaluation due to the Gibbs phenomenon arising around the discontinuities.A common approach to address this concern is to introduce a limiter that reconstructs the polynomials of troubled cells.Traditionally, slope limiters like the Barth-Jespersen limiter (Barth & Jespersen, 1989) and Venkatakrishnan limiter (Venkatakrishnan, 1995) have been used in FV methods.However, these slope limiters are designed to reconstruct coefficients based on the bound of cell average around the troubled cell, which is not suitable for high-order schemes where the solution is non-monotonic in the control volume.Therefore, the limiting procedure needs to be carefully designed, and it has become a research focus to achieve the required robustness for high-order coefficients.
To ensure efficient computation, problemindependent troubled cell indicators (Fu & Shu, 2017;W. Li & Ren, 2012a;Qiu & Shu, 2005) are applied to cells near the discontinuities in high-order methods, while keeping the smooth domain with the original solution.However, many investigations have shown that achieving robustness near discontinuities and preserving the designed accuracy of cells in smooth extrema, which are often misidentified as troubled cells, is challenging with the limiting procedure.In this context, the weighted biased averaging procedure (WBAP) proposed in (W.Li et al., 2011;W. Li & Ren, 2012b) serves as an effective limiter for high-order FV methods and has successfully been applied to solve hyperbolic conservation laws.Similar to the WENO schemes, the WBAP limiter requires multiple candidate reconstructions, including primary reconstruction (PR) of the current cell and secondary reconstructions (SRs) of face-neighbouring cells proposed in (W.Li & Ren, 2012a).The successive limiting procedure, where the limit procedure is applied from high-order coefficients to low-order coefficients respectively, along with the WBAP limiter, effectively controls numerical oscillations.
For compressible flow simulations, the limiting procedure can significantly improve the robustness of highorder methods when coupled with characteristic-wise projection (W.Li & Ren, 2012b).This coupling is necessary because the solution within the control volume is non-monotonic, and direct application on conservation leads to numerical instability.However, the combination of projection and successive limiting procedures can result in high computational costs.To address this challenge, a new simple WBAP limiter is proposed, eliminating the need for the whole-domain successive limiting procedure while maintaining the same level of robustness as the original limiter.In this new limiter, the candidate reconstructions for a shared Jacobian matrix include the PR of the current cell and a SR of one of its faceneighbouring cells.Additionally, to prevent negative density and pressure solutions, a positivity-preserving limiter is applied after employing the new simple WBAP limiter.The limiting procedure introduced in this article successfully achieves a desirable balance between accuracy and robustness, making it a valuable tool for compressible flow simulations with high-order methods.
The remainder of this paper is organized as follows.Section 2.1 presents the fundamental idea of high-order FV methods on unstructured grids, while Section 2.2 introduces the optimized weighted variational reconstruction FV scheme.In Section 2.3, the implicit time integration is described.The implementation of curved wall boundary reconstruction is discussed in Section 3. Section 4 covers the limiting procedure, including a shock detector, a new simple WBAP limiter, and a positivity-preserving limiter.Section 5 presents the numerical results and discussions on the implementation of the CFD solver using the methods proposed in this article.Finally, the conclusion is given in Section 6.

General framework
In this section, the framework for the high-order FV method is introduced below.The time-independent Euler equations can be written in conversation form where U = [ρ, ρu, ρv, ρw, ρE] T and the Cartesian components are the components defined as where ρ represents the density and p is the pressure.
The components [u, v, w] correspond to the velocity in the [x, y, z] directions within the Cartesian coordinate system.
The general FV formulation for Equation (1) can be obtained from the control volume balance equation as where i is the current cell, ∂ i is the cell boundary of i , and T is the numerical flux on the cell face.
In numerical methods, we turn Equation (2) into the semi-discrete form as where Ūi = 1 donates the average of solution on i and ¯ i represents the cell volume.The right-hand side of Equation (3) can be computed according the form as where H(U(x m,ϕ )) is evaluated on each Gaussian point of the shared interface by HLLC Riemann solver (Toro, 2009) in this paper., i.e.

H(U(x
where both sides of states U L (x m,ϕ ) and U R (x m,ϕ ) are evaluated respectively by the polynomials of the conservative variables on i and j , which share the same interface I m with i .A semi-discrete form for time integration can be described as where R is computed from Equation (5).The time integration scheme to solve the ordinary differential equations (ODEs) to update the cell averages in this article will be described in Section 2.3.

Variational reconstruction
For third-order variational reconstruction described in this article, only the cells sharing the interfaces with the current cell are included in the compact stencil, for a typical hexahedral cell, denoted by S i = { j1 , j2 , j3 , j4 , j5 , j6 } shown in Figure 1.
One of the components of conservative variables denoted by u(x) is considered below.The conservation of the mean of the conservative variables requires where ūi is the cell average of u(x) and a degree p polynomial is evaluated on i , the degree of the coefficients of degree p polynomial is − 1 in three-dimensional cases.For the presented thirdorder FV method in three-dimension, N = 9.The nondimensional Taylor basis functions are taken as Let the centroid of cell be x c = (x c , y c , z c ).The length scales (Luo et al., 2008) in the functions are defined to make to basis non-dimensional and lower the condition number for the iteration solver for reconstruction.x max , y max , z max , x min , y min and z min are computed from coordinates of the cell i in x-, y-and z-direction.This formulation is simple and keeps the cell average unchanged.The following degree p polynomial of the solution on i can be described as The PR of the target cell and several SRs are necessary in limiting procedure.For example, a SR can be transformed from its PR of one of face-neighbouring cells of stencil S i and is denoted by The specific formulation of u l j→i for the solution (p = 2) are computed according to in which x ij = x i − x j , y ij = y i − y j and z ij = z i − z j computed from the two centroids of i and j .
In high-order FV schemes, we opt to reconstruct the conservative variables instead of using primitive variable, as done in conventional second-order FV schemes.This choice is driven by the fact that reconstructing the primitive variables can only achieve second-order accuracy, even when employing a high-order scheme.Moreover, the uncertainty in the characteristic direction across the entire domain renders reconstruction in characteristic space unsuitable.
We can evaluate the coefficients of polynomials of solution by a weighted variational reconstruction.The cost functions of the approach are flexible, and the cost function in this article is defined by interface LR is the shared face between the cells on both sides, d LR donates the distance between the centroids and x is the spatial derivatives along the interface normal vector.In the presented work, the weights w p are introduced to control the relative importance of each term in the weighted IJI function.Based on the findings in Section 5.4, we have selected optimized weights [w 0 , w 1 , w 2 ] = [1.0,0.44, 0.18] to achieve a more favourable balance between accuracy and efficiency in this study.The cost function is to minimize the sum of the weighted IJI of all of the interfaces and boundaries, i.e. and we can obtain the following linear equations where the specific forms of the matrices are We can calculate the matrices (12) at the beginning of the computation, once we obtain the mesh information, and these matrices remain constant if the meshes are fixed.Consequently, the coefficients of the polynomial are obtained as the solution to the system of linear equations Obviously, because the weighted IJI function only includes both sides of the interface, the stencil S i for the reconstruction is compact.
For the boundary cell i in Figure 2, this type of situation often poses significant challenges when coding for the reconstruction of classical high-order schemes.In contrast, this reconstruction procedure allows for easier handling of boundary treatment without sacrificing accuracy, unlike other high-order schemes.The sum of cost function of N LR internal faces and N BC boundary faces of the computational domain can be described as and the boundary cost function need to treated specifically.
For the slip or symmetry boundary conditions where spatial derivatives are not available, the cost function of a solution q is used as the form The solutions of conservative variables on boundary faces are computed according to where n is the unit outward normal vector of face BC , t is the unit tangential vector of face BC .
For inter-processor or periodic boundary conditions, we need to update the patchNeighbourField after the reconstruction iteration step described below and the limiting procedure.In the context of OpenFOAM, for example, the second-order coefficients of the solution in Equation ( 8) are stored in the container volSymmTensorField, which allows for efficient communication of information across inter-processor boundaries through the function correctBoundaryConditions.This function is responsible for updating the values of ghost cells, ensuring accurate parallel computing treatment during the simulation.Other information about the high-order solution can also be treated in a similar manner.The iteration step is similar to internal faces, with the neighbouring processor cell number j set asj < i, where i is the number of the current internal cell.
The constitutive relations of the variational reconstruction are derived by minimizing the total I with respect to the coefficients of the reconstruction polynomial.This leads to a system of linear Equations (13), which is then solved using the symmetric Gauss-Seidel (SGS) method as where s denotes the current number of iteration step.L(i) = {j|j ∈ S i , j < i} and U(i) = {j|j ∈ S i , j i} represent the lower and upper cells of compact stencil S i .Solving the large system of linear Equations ( 13) in each time step is computationally very expensive.However, the coupled iterative procedure of reconstruction and implicit time integration can significantly improve efficiency, and the SGS iterative method is utilized once in every inner iteration of implicit time integration.To achieve third-order accuracy approximation, a sufficient number of Gauss integration points are required to evaluate values related to quadratic polynomials in Equation ( 8).In the context of OpenFOAM, the integration of the numerical flux for each interface in Equation ( 4) must meet the second-order approximating demand, necessitating three Gauss integration points for triangle faces and four for quadrangle faces.When computing the constant terms for quadratic Taylor polynomials, tetrahedron cells require four Gauss integration points, prism cells require six, and hexahedron cells require eight.Additionally, the matrices of the linear system in Equation ( 12) have a maximum polynomial degree of p = 4, which mandates the use of the quadrature rule for polynomials with a degree of p >= 4. The coordinates of integration points can be determined by converting roots of Legendre polynomials from the reference framework to the global framework, based on the vertices of faces and volumes.Similarly, the weights in the reference framework must also be converted into the global framework.The computation of integration points and weights can be performed at the beginning and saved for future use.

Time integration
The variational reconstruction Equation (13) needs to be solved at each step for explicit time integration, and this can result in high computational costs for threedimensional problems.However, in implicit time integration, there is no need to prioritize accuracy before achieving full convergence of the solution, allowing for synchronous convergence.By coupling implicit reconstruction with time stepping, the high-order scheme can achieve computational efficiency.Specifically, the reconstruction iteration step is employed once in every single inner step of implicit time integration for unsteady simulations or in a single time step for steady-state simulations.This approach efficiently balances accuracy and computational costs, making it well-suited for practical simulations.
For steady-state simulation, the GMRES with a matrix-free LU-SGS preconditioner method (Luo et al., 1998) is used to solve the equation as which is linearized from Equation ( 5).Instead of computing and storing the full matrix, the matrix-vector products can be approximated as in which the evaluation of R(U + h U) is performed using the first-order upwind FV method which is efficient and friendly for parallel computing.h is a small scalar (Nielsen et al., 1995) as Hence, for m inner iterations in the GMRES method, m + 1 evaluations of the right-hand-side R are required.
In this article, a relative tolerance of 0.1 is set, and the number of search directions is 8, with a maximum inner iteration limit of 40.
To achieve high-order accuracy, the two-stage, thirdorder accurate singly-diagonally implicit Runge-Kutta (SDIRK) method (Ferracina & Spijker, 2008) is employed.This method provides third-order numerical accuracy, which matches the order of accuracy of the spatial discretization used in this article.To solve Equation ( 5), the time integration can be expressed as where The specific values of β α and α αβ are given according to (KvarnO et al., n.d.).A pseudo-time variable τ is introduced in the dual stepping inner iteration of the SDIRK method, and the inner iteration step is in which The reconstruction iteration step ( 14) is solved once before an inner iteration step using the matrix-free LU-SGS approach (Yoon & Jameson, 1988) for Equation (18).The implicit scheme allows for the use of larger time steps compared to the maximum allowable time step imposed by an explicit stability requirement.However, using excessively large time steps can result in numerical errors (Luo et al., 2001), particularly around discontinuities.Conversely, using smaller time steps can lead to a reduced number of inner iteration steps and higher accuracy.In this article, we carefully select time steps such that the maximum Courant-Friedrichs-Lewy (CFL) numbers are in the range of 2 to 5. By doing so, we observe a significant reduction in the residual of the inner iteration, typically by three orders of magnitude within five steps.This approach strikes a well-balanced compromise between accuracy and computational efficiency.

Curved wall boundary reconstruction
High-order FV methods can achieve higher accuracy by increasing the order of reconstruction polynomials.However, the flat mesh boundaries of curved geometry may limit the accuracy of the solution, especially for solid wall boundaries.While some mesh generator software can provide high-order mesh information, the framework of OpenFOAM currently only supports information about linear meshes.In this article, we simplify the strategy presented in (Lübon et al., 2006), which was originally designed for DG methods with tetrahedral elements, and extend it to unstructured meshes with triangle and quadrangle faces.
The key strategy involves curved wall boundary reconstruction, and we obtain the information of the curved wall boundary by solving linear equations.The difference between flat and curved boundaries is given by h = − −−−−− → P flat P curved • n f .Notably, h = 0 for each vertex of the current boundary face, and the normals at these vertices are computed by weighted averaging the normal vectors of neighbouring boundary faces, as shown in Figure 2. To ensure numerical stability, the weighted average of normal vectors should exclude the normal vector that satisfies n s • n f ≤ 0 where n s and n f are the normal vectors of a neighbouring face and the current face, respectively.
Spatial transformation from physical space to the ξ − η − h system involves the equation of the curved boundary of the current face, which is represented as F(ξ , η, h) = 0.For each vertex p of the current face, the equation satisfies: According to the number of vertices, we can compute the unknown coefficients of the curved face equation.The equation for a triangle face is represented as Equation ( 20), and the equation for a quadrangle face is given by Equation (21).
The details of the curved wall boundary reconstruction are shown in Algorithm 1.After the reconstruction procedure, the new point P curved and normal vectors n = [n x , n y , n z ] of the curved faces in physical space can be Algorithm 1. Curved wall boundary reconstruction.

The problem-independent shock detector
Applying the limiter function to all the cells of the computational domain leads to high computational cost and low accuracy.Therefore, we detect troubled cells that need to be limited using the indicator IS i defined by in which N j = 4 for tetrahedral cells and N j = 6 for hexahedral cells.x i is the centroid of i .The solution of the degree p polynomial satisfies Therefore, IS i → 0 as either h i → 0 or p → 0 in smooth regions, whereas IS i → ∞ near discontinuities, so the shock detector is also an error-based smoothness indicator.
In this article, we use Sdis = 1 for one-dimensional problems and Sdis = 2 for multi-dimensional problems.Furthermore, we employ the solutions of density as the variables to be computed with the shock detector.According to the zero-mean basis, we can compute the left side of Equation ( 16) using and there is no need to evaluate the special values of ϕ l,i (x i ) with the quadrature-free approach, making the method computationally efficient.

The simple WBAP limiter
In this article, a simple WBAP limiter is presented to achieve high computational efficiency, derived from the original WBAP limiter (W.Li & Ren, 2012b).The limiter's fundamental function is described as where a 0 , a 1 , . . ., a N j represent the candidates, with a 0 being the coefficient that needs to be limited.The candidates consist of the PR and SRs coefficients of the current troubled cell.The function W is defined by The limited reconstruction polynomials for Equation (1) are computed in the form of where the coefficients of conservative variables Ũl i = [u l i,ρ , u l i,ρu , u l i,ρv , u l i,ρw , u l i,ρE ] are computed according to To illustrate the limiting procedure, troubled cells have been detected, as shown in Figure 3.
For the original WBAP, Figure 4 and Algorithm 2 shows that the successive limiting procedure is performed with a characteristic-wise projection procedure for each troubled cell.It involves transforming the second-order scaled derivatives to first-order scaled derivatives, which are computed using unlimited firstorder scaled derivatives and limited second-order scaled derivatives.However, this characteristic-wise projection on PR and SRs coefficients is computationally very expensive.In the limiting procedure, the projection function corresponding to Algorithm 2. Original WBAP successive limiting procedure.for p × N trouble × [N j × (N j + 1)] times for N trouble troubled cells.Additionally, the evaluations of R( Ūi , n ij ) and R −1 ( Ūi , n ij ) are required p × N trouble × N j times for N trouble troubled cells.This computational cost can become substantial as the number of troubled cells increases.
Obviously, the successive limiting procedure leads to higher computational cost as the degree p increases.The key to designing the new simple limiter is to achieve similar robustness to the original WBAP limiter while eliminating the whole-domain succussive limiting procedure.To accomplish this, the successive limiting procedure for a direction of characteristic-wise projection can be computed within an edge-based mini stencil.The procedure is performed between the left and right cells of the shared interface, instead of involving the whole computational domain.The details of the new simple WBAP limiting procedure are shown in Figure 5 and Algorithm 3.
This procedure only limits V l i and V l j by the SR of each other, and both of the two cells share the same Algorithm 3. Simple WBAP successive limiting procedure.
For f = 1, 2, . . ., nFaces do If max(IS i , IS j ) > Sdis then i is the left cell of f , and j is the right cell of f , where Ūij = ( Ūi + Ūj )/2, instead of limiting by all the direct face neighbours of i .Additionally, the successive limiting procedure is only used in computing L(V l i , V l j→i ) to avoid the complicated limiting steps in the original WBAP limiter.The need of projection function in the new simple WBAP limiting procedure is N trouble × N j , which is approximately 1/(p × (N j + 1)) of the original computation requirements.The need for the evaluations of R( Ūij , n ij ) and R −1 ( Ūij , n ij ) is required for N trouble × N j /2 times.Additionally, the requirement for parallel communication is 1/p of the original procedure.The parameter n p = 2 is used to emphasize the PR of i for the edge-based mini stencil, and n p = 1 is taken for Equation (29) as we treat every direction equally.The numerical result in the following section shows similar robustness performance to the original WBAP limiter.

The positivity-preserving limiter
The computational cost is high to detect negative pressure or density for each cell on each Gauss point of each interface and volume.To efficiently detect cells with negative solutions of density and pressure while maintaining high-order accuracy, a new positivity-preserving limiter is proposed to perform a positivity correction procedure on the troubled cells indicated by Equation ( 22).Using the constant attribute of basis function polynomial, we compute We apply the positivity-preserving limiter on the solutions of density and total energy, and compute the smaller of the two factors according to The coefficients of all the conservative variables need to be reduced by the factor above.This positivitypreserving limiter can maintain positive solutions for pressure and density without significantly increasing computational cost.

Numerical results and discussion
In this section, we present the results of various problems to demonstrate the performance of the methods proposed in this article.We compare our solver with two typical density-based solvers implemented in OpenFOAM.The first one is blastFoam (Synthetik Applied Technologies, LLC, 2020), which is a classical second-order unstructured solver.The second improved second-order solver is ROUNDA (Deng, 2023), which is based on the newly-developed low dissipative, structurepreserving ROUND (Reconstruction Operators on Unified Normalized-variable Diagram) scheme in a threecell compact stencil and has shown significant improvements in resolution compared to conventional secondorder schemes (Cheng et al., 2023;Deng et al., 2023).The open-source code for both solvers is available on the website and can be used within a similar framework as the VR3 solver presented in this study.The schemes employed by these three solvers are summarized in Table 1.The first two solvers use the explicit TVD Runge-Kutta  method RK3SSP (Gottlieb et al., 2001) for time integration, while the VR3 solver utilizes the SDIRK3 method as discussed previously.To ensure accuracy and mitigate the impact of the time step on the results, we set CFL = 0.4 for the explicit time schemes and CFL = 2 for the implicit time scheme of VR3 in unsteady flow simulations.

Accuracy test for the scalar transport equation
In the accuracy test, we consider an initial smooth distribution, as given by and the computation is carried out for one period (at t = 2.0).The results of the accuracy test are presented in Figure 6, clearly demonstrating that the VR3 scheme outperforms the other two solvers as well as the typical third-order upwind scheme.The spectral properties shown in Figure 7 indicate that the third-order scheme without limiters can achieve better resolution in relatively smooth flow region.Especially, the spectral property of ROUNDA is close to the third-order upwind scheme.

Subsonic flow past a sphere
This test case involves a subsonic flow past a sphere at a Mach number of Ma ∞ = 0.38, and it is designed to evaluate the order of error convergence rate on hexahedral meshes.Four meshes with dimensions 8 × 8 × 24, 16 × 16 × 48, 24 × 24 × 72 and 32 × 32 × 96 (as shown in Figure 8) are used for comparison.The sphere has a radius of r sphere = 0.5, and the computational domain is bounded by r farField = 20.The focus of the comparison is on the 32 × 32 × 96 mesh.As illustrated by the Mach contours in Figure 9, the VR3 demonstrates superior performance compared to blastFoam and ROUNDA.Notably, the curved VR3 variant exhibits the best results.One of the reasons for the relatively poor performance  of ROUNDA is its limitation to uniform meshes for the property of second-order non-linear schemes.Consequently, to further evaluate the solvers on unstructured meshes, the following tests are conducted using blastFoam and VR3.
To assess the accuracy of the schemes, we present the L 1 and L 2 entropy errors, along with their rates of convergence, and these comparisons are graphically depicted in Figure 10.The findings indicate that the methods employed in VR3 yield more accurate solutions compared to the classical second-order FV method in blastFoam.Furthermore, the incorporation of the curved wall boundary reconstruction approach significantly enhances the achievement of the desired design accuracy for the third-order schemes.The entropy error defined by We conductea comparison of the time integration methods using a 32 × 32 × 96 mesh.For the GMRES-LUSGS method, the local CFL number was set to 40, while blastFoam and ROUNDA employed the explicit time scheme with a maximum CFL number of 1.The convergence history results are depicted in Figure 11 Notably, the implicit time integration proves to be highly efficient for the third-order solver in steady flow simulations, despite the computational expense involved in reconstruction and flux evaluation.

Transonic flows past a ONERA M6 wing
This test cast is transonic flows past a ONERA M6 wing which has a leading-edge sweep angle of 30 • , an aspect of 3.8 • and a taper ratio of 0.562. .The Mach number of the flow is 0.8398 and AOA = 3.06 • .The mesh shown in Figure 12 consists of 341,797 tetrahedral cells, and the solutions are listed in Figure 13. Figure 14 shows the comparison of experimental and computed surface pressure coefficient at 20%, 44% and 90% semi-span locations.The effectiveness of the simple WBAP limiter used with third-order metho is evident in its ability to suppress spurious oscillations and accurately capture shocks on the surface and the third-order methods produce sharper shock profiles compared to the second-order method in blastFoam, especially at the 90% semi-span location.Figure 15 illustrates the entropy production at three different semi-span locations, revealing that the third-order method with curved boundary exhibits lower entropy production, particularly in the smooth domain before encountering shocks.

Isentropic vortex problem (Hu & Shu, 1999)
This is a two-dimensional smooth flow problem without shocks, and we use the scheme presented in this article to demonstrate its advantages.The computational domain is [0, 10] × [0, 10].The mean flow condition is (ρ, u, v, p) = (1, 1, 1, 1), and we introduce the following perturbations in the form of an isentropic vortex described as where (x, ȳ) = (x − 5, y − 5), r 2 = x2 + ȳ2 , and the vortex strength χ = 5.All the boundary conditions are periodic.The four types of meshes used, including regular prismatic mesh, irregular prismatic mesh, regular hexahedral mesh and irregular hexahedral mesh, are shown in Figure 16.The tests are performed until t = 2.0 to demonstrate that the third-order variational reconstruction FV method in VR3 achieves the intended accuracy for the four types of meshes as listed in Table 2.
To optimize the weights of weighted IJI function in variational reconstruction, we designed a numerical test to compare different weights and find the optimal ones.Figure 17 illustrates the influence of weights on average inner iteration steps on a regular hexahedral mesh at h = 1/4, and the physical time step set to 1/10.All the  weights can achieve intended accuracy, and we set w 0 = w 1 and w 1 = w 2 in the left result and right result, respectively.Based on the results, we choose [w 0 , w 1 , w 2 ] = [1.0,0.44, 0.18] to achieve high computational efficiency for numerical tests in this article.Table 3 presents a comparison of average inner iteration steps between the original weights [w 0 , w 1 , w 2 ] = [1.0,1.0, 0.5] as presented in (Wang et al., 2017) and the optimized weights in the four types of meshes used in the accuracy tests above.The optimized weights achieve the intended accuracy in all tests with lower computational cost than the original weights.
To investigate the numerical dissipation of schemes and the two types of WBAP limiters, Figure 18 shows the comparisons of density solutions along centre x axis (y = 5) computed by different schemes on a regular hexahedral mesh at h = 1/8 after 5 and 10 time periods, respectively.It shows that ROUND schemes can better preserve the vortex strength than conventional secondorder schemes due to the improved numerical dissipation property.The solver with an unlimited third-order scheme reduces the errors of numerical dissipation, and the advantage of high-order schemes becomes more evident with increasing time of performance.We also set

Shock tube problem
This is a class of one-dimensional benchmark tests, and we can use the comparisons of numerical and exact solutions to assess the performance of the solvers in flow simulation.The initial conditions are The cases include Sod shock tube problem (Sod, 1978) and Lax problem (Lax, 1954) whose initial conditions are show in Table 5.The mesh size is h = 1/200.As noted by (Jiang & Shu, 1996), these two cases serve as challenging tests to assess the characteristicbased limiters for high-order schemes.The tests were conducted until t end using blastFoam, ROUNDA, and VR3 with two types of limiters.The results distribution in Figure 19 shows that the simple WBAP limiter can capture high-resolution flow structures similar to the scheme of ROUNDA solver, without requiring the computationally expensive successive limiting procedure.On the other hand, blastFoam exhibits lower resolution due to its higher numerical dissipation.

Shu-Osher problem
The test is the one-dimensional Shu and Osher (1989) problem which is a simple model for shock-turbulence interactions.The flow structures caused by the interaction of left moving shock and the right smooth sine wave is complicated and they are demanding for numerical schemes to capture the high-frequency waves.Both of ends are reflective boundary.The initial conditions are The density distribution results at t = 1.8 are depicted in Figure 20 with 400 cells, and the 'exact' solution is obtained using the one-dimensional fifth-order WENO scheme (Jiang & Shu, 1996) with 5000 cells.The comparisons clearly demonstrate the significant advantages of high-order schemes over the second-order scheme of blastFoam in simulations involving high-frequency waves and excellent shock capturing capability.The VR3 solver with WBAP limiters exhibits smaller numerical dissipation compared to the ROUNDA solver in this particular test.This achievement demonstrates the effectiveness of the simple WBAP limiter in maintaining high accuracy and resolving flow features efficiently.

Two interacting blast waves problem
This test case is to simulate interactions of two blast waves problem (Lax & Liu, 1998), and uniform cells with h = 1/400 are used.The dramatic interactions are hardly to capture high-resolution flow structures without numerical oscillation, and the solutions of density and pressure are near zero near discontinuities, so positivitypreserving limiter is necessary for the achievement of robustness.Especially, the situation become more severe for high-order schemes because of their non-monotonic polynomials.The initial conditions are (1, 0, 1000) for 0 ≤ x < 0.1 (1, 0, 0.01) for 0.1 ≤ x < 0.9 (1, 0, 100) otherwise.
The density distribution results at t = 0.038 are depicted in Figure 21, and the 'exact' solution is obtained using the one-dimensional fifth-order WENO scheme (Jiang & Shu, 1996) with 5000 cells.Through the comparisons of results computed by the solvers introduced in this article, we observe that the smearing of contact discontinuities appears more pronounced in the second-order scheme of blastFoam, while the third-order scheme achieves better performance.Notably, the VR3 solvers exhibit more smearing due to higher numerical dissipation caused by the WBAP limiter compared to the ROUNDA scheme around strong shocks.

A Mach 3 wind tunnel with a step (Lax & Liu, 1998)
The problem involves strong shock interactions induced by a step located at the corner (x, y) = (0.6, 0.2), within the computational domain [0, 3] × [0, 1].The initial condition and inflow are specified as (ρ, u, v, p) = (1.4,3, 0, 1), and the wind tunnel's solid wall is treated as a slip boundary.The simulation is conducted using a uniform mesh with h = 1/320.Both ROUNDA and VR3 with the simple WBAP limiter are capable of capturing the wavy contact discontinuity originating from the triple point with schemes beyond second order.It is well known that the corner of the step can lead to an erroneous entropy layer at the downstream bottom wall.In this scenario, the VR3 solver     with the simple WBAP limiter outperformed the other solvers in handling the spurious Mach stem at the bottom wall.The distribution of troubled cells identified is shown in Figure 23.

Double Mach reflection problem (Lax & Liu, 1998)
The problem consists of interactions caused by a rightmoving shock wave and a reflecting wall, and the computational domain In Figure 24, the density contours at t = 0.2 computed show that the ROUNDA and VR3 solver with the simple WBAP limiter can capture more intricate details of the complicated interactions around the right shock's intersection point.The simple WBAP limiter can introduce larger numerical dissipation than the ROUNDA scheme around strong shock waves, which helps to obtain nonoscillatory results due to its characteristic.However, this level of numerical dissipation may not be sufficient for the cells around vortex structures.The interaction between the rolled-up vortex structure and the right shock differs due to their numerical dissipative properties.The troubled cells at the last time step are shown in Figure 25.
The troubled cells on the upper boundary are identifiedp by the indicator function because the information of the moving shock is present in the boundary condition.

3d explosion problem (Zanotti et al., 2015)
The 3D explosion problem describes the evolution of a strong spherical shock.We use an eighth sphere with     (ρ, u, v, w, p) = (1, 0, 0, 0, 1) if r ≤ 0.5 (0.125, 0, 0, 0, 0.1) if r > 0.5, where r = x 2 + y 2 + z 2 is the radius.The exact solutions can be computed by solver of simple onedimensional model with geometric source terms.The exact solutions are computed using a solver for a simple one-dimensional model with geometric source terms.
To test the resolution properties on three-dimensional unstructured meshes, we solve the problem using blastFoam and the VR3 solvers with two types of WBAP limiters.The mesh consists of uniform tetrahedral cells with a characteristic size of 1/160., which corresponds to 9.2 million cells.The results in Figure 26 display the density profiles and the troubled cells marked in the radial direction at t = 0.2.For comparison, we plot the numerical solutions in Figure 27 obtained with the original WBAP limiter and the new simple WBAP limiter.The results show that the solutions of the third-order solvers exhibit high resolution compared to the conventional second-order solver.
The parallel scaling efficiency of the introduced VR3 solver is presented in the Figure 28.The compute times are measured as the average time over 20 inner iteration steps.The VR3 solver with the simple WBAP limiter demonstrates good parallel scaling efficiency when the number of inter-processor faces accounts for a small percentage.This scaling study, which uses the same mesh as the 3D explosion problem but varies the number of cores, is conducted on a computing cluster composed of core nodes with two Intel Xeon Gold 6240 processors each.The maximum number of cores for each node is 32 in this test.For the computing task corresponding to 128 cores, the following information is listed: (1) average number of processor faces = 72387, with the fluctuation of cell numbers under 2%; (2) max number of processor patches = 18 (59.0643%above the average of 10.6875); (3) max number of faces between processors = 6705  (29.0641% above the average of 5195.09).In this typical problem, the max number of troubled cells is within 4%, which has a minimal effect on the parallel scaling efficiency.

Conclusion
In this article, we present a compact third-order densitybased solver developed within the framework of Open-FOAM.The solver utilizes implicit variational reconstruction on three-dimensional unstructured meshes and employs technology coupling reconstruction and time integration for achieving high-order accuracy.Our numerical results demonstrate that the third-order solver with curved wall boundary reconstruction successfully attains the desired accuracy in smoother flow simulations without requiring high-order mesh information.Furthermore, the new simple WBAP limiter effectively suppresses spurious oscillations without necessitating a whole-domain successive limiting procedure, while still maintaining similar robustness to the original WBAP limiter in flow simulations with shocks.
Comparing the third-order solver to two typical second-order solvers reveals the clear advantage of highorder schemes, as our solver provides higher resolution results.Additionally, the third-order solver exhibits outstanding properties that make it a superior tool for problems involving complex flow structures.The compactness of reconstruction and limiting procedures also makes the solver highly amenable to parallelization, enhancing its computational efficiency.It is worth noting that all the tests performed in this study are inviscid flow problems, and future work will focus on extending the solver to tackle turbulent compressible flows.

Figure 1 .
Figure 1.The compact stencils for interior cell (left) and boundary cell (right).

Figure 2 .
Figure 2. A curved triangle boundary face (left) and vertex normal vectors around sharp geometry (right).

Figure 3 .
Figure 3. Troubled cells marked by red in limiting procedure.

Figure 6 .
Figure 6.The accuracy test for the schemes of the blastFoam, ROUNDA and VR3.

Figure 7 .
Figure 7.The spectral properties of the schemes of the blastFoam, ROUNDA and VR3.

Figure 8 .
Figure 8. Four successively refined hexahedral meshes for subsonic flow past a sphere.

Figure 9 .
Figure 9. Subsonic flow past a sphere.Computed 31 equally spaced Mach number contours from 0.019 to 0.589 by the three solvers on 32 × 32 × 96 mesh.

Figure 10 .
Figure 10.Order of error convergence for subsonic flow past a sphere.

Figure 12 .
Figure 12.Surface mesh used for transonic flows past a ONERA M6 wing.

Figure 14 .
Figure 14.Comparison of experiment and computed surface pressure coefficient of the three methods at different semi-span locations.

Figure 15 .
Figure 15.Comparison of entropy production of the three methods at different semi-span locations.

Figure 16 .
Figure 16.Four types of meshes for isentropic vortex problem.

Figure 17 .
Figure 17.Influence of weights on average inner iteration steps.

Figure 19 .
Figure 19.Density distribution of Sod case at t = 0.2 (left) and Lax case at t = (right).

Figure 22 .
Figure 22.Mach 3 wind tunnel with a step.Thirty equally spaced density contour lines from ρ = 0.3 to 6.15.

Figure 23 .
Figure 23.Forward step problem.Troubled cells are marked black.

Figure 25 .
Figure 25.Double Mach reflection problem.Troubled cells are marked black.

Figure 26 .
Figure 26.Numerical results for 3D explosion problem in the radial direction at time t = 0.2.Density profile (left) and troubled cells marked (right).

Figure 27 .
Figure 27.The results distribution along the radius direction.

Figure 28 .
Figure 28.Parallel scaling efficiency of the VR3 solver with a simple WBAP limiter.

Table 1 .
Information of solvers for numerical tests.

Table 2 .
Errors and convergence rates for the isentropic vortex problem on four types of meshes.

Table 3 .
Comparison of average inner iteration steps of the original weights and the optimized weights in the four types of meshes.

Table 4 .
Comparison of wall-clock time for different limiters for the smooth isentropic vortex problem on a regular hexahedral mesh at h = 1/8 after 10 time periods.

Table 5 .
Two shock tube cases.