1Global coordinate system
2--------------------------------------------------------------------------------
3
4The spatial coordinates are bound to the aircraft:
5x : frontal
6y : vertical
7z : spanwise left (horizontal)
8
9                         ^ ____
10                       y |/   /
11                         |   /
12                        /|  /     __
13                  _____/ | /_____/ _/     x
14                 /       |      /__/ ------------->
15                 \_____    _______/
16                       \   \
17                        \ \ \
18                         \ \ \
19                          \_\_\
20                             \  z
21                              \|
22
23x-y is the wing symmetry plane, while the wing lies along z axis. The origin is
24the center of the wing.
25
26Maths & Physics
27--------------------------------------------------------------------------------
28The method is based on approximation the flowfield around the wing by the
29potential flow induced by an ensemble of horseshoe vortices, with bound
30segments aligned along the wing's centerline, and the free segments shedding
31in the streamwise direction. Their strengths, i.e. circulations, are unknown
32and need to be determined using the flow equations. With known strengths,
33the flowfield velocity can be calculated at an arbitrary point using
34Biot-Savart law.
35
36The control (unknown) spanwise quantity on i-th vortex is
37  +---------------------+
38  |  g_i = gamma_i/c_i  | (1)
39  +---------------------+
40where gamma_i is the circulation and ch_i is local chord length (this gives
41approximately local cl).
42
43The flow equation to be satisfied locally follows from expressing
44the lift created on a particular section in two ways:
45from the Kutta-Joukowski law (the left-hand side) and
46using the 2D section data (the right-hand side)
47  +-------------------------------------------------------+
48  |       rho * v * gamma = 1/2 * rho * v^2 * cl * c      | (2)
49  +-------------------------------------------------------+
50
51giving
52  +----------------------------+
53  |       g = v * cl / 2       | (3)
54  +----------------------------+
55
56where
57  +--------------------------+
58  |       cl = cl(alfa)      |
59  |    alfa = atan(vy/vx)    | (4)
60  |   v = sqrt(vx^2 + vy^2)  |
61  +--------------------------+
62
63Numerics
64--------------------------------------------------------------------------------
65Using Biot-Savart law, it is possible to express the induced velocity at each
66collocation point caused by unit circulation on each vortex, thus obtain the
67"influence" tensor. Thus, from g_i, vx_i and vy_i are obtained by applying
68appropriate influence matrices. atan(vy_i/vx_i) then gives alfa_i - see (4)
69(at this point, nonlinearity is introduced). cl_i is then obtained from alfa_i
70by interpolating the provided 2D section data (a combination of spanwise and
71angle-wise interpolation is used). Finally, (3) closes the cycle, arriving
72at g_i again.
73In this fashion, for any global angle of attack we obtain a system of nonlinear
74equations. This parametric system is solved by starting at a low angle of attack
75and tracking the nonlinear solution to higher angles while possible, using a
76predictor-corrector strategy.
77The 2D section lifts are interpolated in two dimensions: by spanwise coordinate
78(combining different datasets) and by angle of attack. Instead of a naive
79interpolation, a "feature" interpolation is done: at first, each lifting line is
80analyzed for a zero-lift and maximum-lift angle. The lifting line is then scaled
81to 0,1, and these three features (zero-lift angle, max-lift angle, and scaled
82lifting line) are interpolated spanwise by linear interpolation.
83
84