Calculating Offset Curves defined by NACA Formula

50 Views Asked by At

I need to be able to scale an aerofoil so that it creates a new offset aerofoil.

I'm going to be using the notation as suggested to me in my previous question.

Taking:

$$ 0 \le t \le 1\\ \ \\u(t) =\begin{cases} \frac M{P^2}(2Pt-t^2), & 0\le t< P \\ \frac M{(1-P)^2}(1-2P+2Pt-t^2), & P\le t\le 1 \end{cases}\\ \dot u(t) = \frac{du}{dt}(t)= \begin{cases} \frac{2M}{P^2}(P-t), & 0\le t< P \\ \frac {2M}{(1-P)^2}(P-t), & P\le t\le 1 \end{cases}\\ v(t)=\frac{T}{0.2}(a_0\sqrt t+a_1t+a_2t^2+a_3t^3+a_4t^4)$$

With

$$\alpha(t) = (t + v(t)\dot u(t)w(t), u(t) - v(t)w(t))$$

as the formula for defining the $x$ and $y$ coordinates for the lower surface.

I then use this formula to create the offset points, with d being the offset distance:

$$x_d(t)= x(t) + \frac{d \times y'(t)}{\sqrt{x'(t)^2+y'(t)^2}}$$

$$y_d(t)= y(t) - \frac{d \times x'(t)}{\sqrt{x'(t)^2+y'(t)^2}}$$

Solving for the variables I need:

$$x'(t)=1+ \dot{v}(t)\dot{u}(t)w(t) + v(t)\ddot{u}(t)w(t) + v(t)\dot{u}(t)\dot{w}(t)$$

$$y'(t)=\dot{u}(t) - [\dot{v}(t)w(t) + v(t)\dot{w}(t)]$$

I can then substitute in the required variables. The problem I'm having is I've done this and coded it Python and it just defines all the points in one fixed y and x location at a distance d vertically from the origin. There's every chance my code is wrong but I just wanted to get my maths checked.