Viiflow is an aerodynamic analysis method. It enables the fast evaluation of airfoil characteristics, such as lift and drag coefficients or transition locations. It is currently suitable for subsonic cases of single or multi-element airfoils without strong wake confluence or massive separation. It is especially useful for coupled problems, such as fluid-structure interaction or optimization.

Viscid-inviscid interaction

It is based on the model of viscid-inviscid interaction. This model approximates the complex physics of aerodynamic flow by separating the problem into two separate problems, where faster solution methods are available. The domains are

  • the viscid domain, where a parabolic set of equations called the Boundary Layer Equations and its approximations are used.
  • the inviscid domain where the Euler Equations and its approximations are used.

Viscid-inviscid interaction approximates the aerodynamic flow quite well if the boundary layer and the separated regions are relatively small. These simplifications and assumptions might seem strong, but viscid-inviscid interaction methods generally fare quite well compared to full RANS solutions in a lot of cases[1].

With the current implementation, viiflow can be used to analyze two-dimensional multi-element airfoil configurations, using a panel method with compressibility corrections for the inviscid domain and a set of Integral Boundary Layer Equations[2] for the viscid domain. That is, it solves very similar equations to XFOIL[3]. Albeit with a different ODE discretization for very similar Integral Boundary Layer Equations, some differences in the panel method and a different coupling mechanism.

Usage and applications

Viiflow is implemented as a Cython module for Python that can be used either as a solver that returns a converged solution to an aerodynamic problem, but also as a function that evaluates the current error in the aerodynamic problem and returns gradients and residuals that can be used to join the aerodynamic problem with other domains. In the Notebooks section a few Jupyter Notebooks can be found that show how to use it, from simple polar calculations to fluid-structure interaction problems. Below is a minimal example on how to calculate a polar.

Citing Viiflow

You can use [4] to cite viiflow.

In [1]:
import viiflowtools.vf_tools as vft
import numpy as np

# Read airfoil geometry from file
RAE = vft.repanel(vft.read_selig("RAE2822.dat"),220)

# Here the results are stored
al = []
CL = []
CD =[]

# Angles of attack to calculate
AOAR = np.arange(-7.0,7.0,0.5)

# Calculate polar
import viiflow as vf
s = vf.setup(Re=1e6,Alpha=AOAR[0],Ma = 0.3,Silent=True)
[p,bl,x] = vf.init(RAE,s)
for AOA in AOAR:
    s.Alpha = AOA
    [x,flag,_,_,_] = vf.iter(x,bl,p,s)
    if flag:
        al.append(AOA)
        CL.append(p.CL)
        CD.append(bl[0].CD)
In [2]:
# Plot some results
import viiflowtools.vf_plots as vfp
import matplotlib.pyplot as plt
import matplotlib
%matplotlib inline
%config InlineBackend.figure_format = 'svg'
matplotlib.rcParams['figure.figsize'] = [12, 8]

fig,ax = plt.subplots(2,1)
ax[0].plot(CD,CL)
ax[0].set_xlim([0,0.015])
ax[0].set_xlabel('CD')
ax[0].set_ylabel('CL')
ax[0].grid(1)
vfp.plot_geometry(ax[1],p,bl,None);
2021-07-12T10:25:24.105589 image/svg+xml Matplotlib v3.3.3, https://matplotlib.org/

[1] Morgado, J., et al. XFOIL vs CFD performance predictions for high lift low Reynolds number airfoils. Aerospace Science and Technology 52 (2016): 207-214.

[2] Drela, Mark, and Michael B. Giles. Viscous-inviscid analysis of transonic and low Reynolds number airfoils. AIAA journal 25.10 (1987): 1347-1355.

[3] Drela, Mark. XFOIL: An analysis and design system for low Reynolds number airfoils.Low Reynolds number aerodynamics. Springer Berlin Heidelberg, 1989. 1-12.

[4] Ranneberg, Maximilian. "Viiflow—A New Inverse Viscous-Inviscid Interaction Method." AIAA Journal 57.6 (2019): 2248-2253. http://arc.aiaa.org/doi/abs/10.2514/1.J058268