An airfoil can be defined as a pair of parametric equations for X and Y, for the formula parameter
varying from 0.0 to 2*PI. Check the RATIONALE here OR here.
We can rewrite these formulas into a calculator-like form, as follows.
X = f = 0.5+0.5*(abs(cos(r2d(u))))^c1/cos(r2d(u)) Y = g = 0.1277*0.5*(abs(sin(r2d(u))))^c1/sin(r2d(u))*(1-f ^j1) + j2*sin(r2d(pi*f ^c2)) + sin(r2d(f*2*pi))*0.0
ZwCAD users need to check LitioLAB user manual to review the math functions available and how to adapt the formulas to ZwCAD.
The R2D (radians-to-degrees) conversion function is not available in ZwCAD. Use 180/PI as a multiplying factor instead.
Here, I have already replaced some of the formula coefficients and parameters, with the name of an
auxiliary parameter, either constant or formula (that works as constant in this case), as shown on the video, and as follows:
B = c1
T = 0.1277 (in the formula; this value is for NACA5412 airfoil)
P = j1
C = j2
E = c2
R = 0.0 (in the formula; this value is for NACA5412 airfoil)
T and R will be included directly in the formula.
It is clear, that there will be an issue due to the dividing cos(u) and sin(u), that turn into 0 within the range of use of the formula, creating a division by zero error.
This can be easily solved, if instead of u limits being 0.0 and 2*PI, we make them a little more than 0.0 and a little less than 2*PI, AND by skipping the u = PI value, by
considering an odd number of divisions of this parameter u.
So, for our first example, the NACA5412 Arfoil, after inputting all the parameters, we get its drawing.