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  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).
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  and adjoint  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.
We have been working as well on applying our simulation code to our biggest test case which is flow around a NACA4412 wing section . 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.
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.
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 .
 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
 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
 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
 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
 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