Author: Adam Peplinski, KTH Royal Institute of Technology

In our previous blog post we shortly presented implementation of h-type Adaptive Mesh Refinement (AMR) scheme in the Spectral Element Method code Nek5000. At that point only steady state calculation of the nonlinear Navier-Stokes equations were supported. We continue this work extending our implementation to the time dependent problems focusing mostly on a robust parallel preconditioning strategy for the pressure equation, which for the unsteady incompressible flows is the linear sub-problem associated with the divergence-free constraint and can become very ill-conditioned.

We found a preconditioner based on additive overlapping Schwarz method [1] to be suitable for AMR and we modified it for nonconforming meshes. Our implementation was tested with a number of standard flow cases like 2- and 3-dimensional lid driven cavity, the backward-facing step or the flow past a cylinder. Most of 2D and 3D tests showed lower number of pressure iterations for the simulations performed with nonconforming meshes in comparison with simulations using conforming ones. It shows one of the most important advantages of h-type AMR framework, as introducing nonconforming meshes it can reduce the elements aspect ratio and this way limit the condition number of the pressure operator (Image 1).

Image 1: The mesh structure and the velocity magnitude of the 2D lid driven cavity setup at time t = 140. Left and right panels present respectively conforming and nonconforming setups. The element boundaries are marked with black lines.

Another important task is development of proper error estimator to mark regions for refinement and derefinement respectively. We compare here two different approaches based on the spectral [2] and adjoint [3] error estimators. The first one (being rather error indicator than estimator) relays on the expected exponential decay of the spectral coefficients with increasing polynomial order and tries to compute the error coming from the truncation of the function base. It is easy to implement and gives low overhead in computational time, but has tendency to over-resolve non significant regions of the flow. The second one is a goal-oriented approach, in which a given meaningful physical quantity is going to be computed accurately. It computes the sensitivity of a given functional with respect to a mesh variation, allowing to refine regions of the flow relevant for the physical quantity of interest only. Currently the spectral error indicator is fully implemented and tested together with the adjoint error estimator for steady flows. The adjoint error estimator for unsteady flows is under development.

 Image 2: The conforming (red) and initial nonconforming (black) meshes for 2-dimensional simulation of flow around a NACA4412 wing. Lines mark element boundaries, however in the case of conforming mesh the elements are too small to be visible.


We have been working as well on applying our simulation code to our biggest test case which is flow around a NACA4412 wing section [4]. For now we perform 2-dimensional runs for Reynolds number 100000 testing different mesh configurations and run-time parameters values (e.g. refinement and derefinement thresholds). Proper structure of the initial (not refined) mesh is crucial here, as it allows to limit number of elements and their aspect ratio. Comparison of the new initial mesh with the conforming one (previous results) is presented in Fig. 2 and shows the new mesh domain to be much bigger, what simplifies the treatment of boundary conditions. At the same time the maximal element aspect ratio drops from 66.4 (conforming mesh) to 4.5 (new mesh) causing the number of pressure iterations in new simulations to decrease roughly by 2.

Image 3: The conforming (red) and final nonconforming (black) meshes for 2-dimensional simulation of flow around a NACA4412 wing. In the case of the nonconforming mesh the wing vicinity and the wake are resolved by splitting elements into smaller ones. Lines mark element boundaries.

The final structure of the nonconforming mesh resolving wing vicinity and wake is shown in Fig. 3. The number of elements in this mesh and the conforming one is similar (21988 and 23688 respectively), however the resolved wake in the new simulation is more than twice as long. Fig. 4 presents sream-wise velocity component in the vicinity of a trailing edge and shows no spurious oscillations at the refinement edges.

Image 4: Stream-wise velocity component for the 2-dimensional flow around a NACA4412 wing.

Current results are very promising and show that AMR can significantly reduce the computational time providing at the same time control over simulation error. However, a few additional tools have to be developed before we will start 3-dimensional runs, and in next step we are going to work on filtering, residual projection and upgrade of pressure preconditioner to the hybrid Schwarz-multigrid method [5].


[1] P. F. Fischer, An overlapping schwarz method for spectral element solution of the incompressible navier stokes equations. Journal of Computational Physics, 133:84–101, May 1997 

[2] C. Mavriplis, A Posteriori Error Estimators for Adaptive Spectral Element Techniques, in Proceedings of the Eighth GAMM-Conference on Numerical Methods in Fluid Mechanics,333–342. Vieweg+Teubner Verlag, Wiesbaden, 1990 

[3] J. Hoffman, J. Jansson, N. Jansson, and R. Vilela De Abreu. Towards a parameter-free method for high Reynolds number turbulent flow simulation based on adaptive finite element approximation. Computer Methods in Applied Mechanics and Engineering, 288:60–74, 2015. Error Estimation and Adaptivity for Nonlinear and Time-Dependent Problems

[4] R. Vinuesa, S. M. Hosseini, A. Hanifi, D. S. Henningson and P. Schlatter, 2015 Direct numerical simulation of the flow around a wing section using high-order parallel spectral methods. In: Int. Symp. Turbulence & Shear Flow Phenomena, Melbourne (Australia), 30 June - 3 July 2015 

[5] J. W. Lottes and P. F. Fischer. Hybrid multigrid/schwarz algorithms for the spectral element method. Journal of Scientific Computing, 24(1):45–78, 2005