In order to approximate the pressure on either side of the airfoil, we must be able to compute the lengths of the aforementioned splines, given as function $x \rightarrow f(x)$. To this purpose, we will compute a specific integral depending on the function $f$. As a reminder, the length of the graph of a function $y=f(x)$ defined and differentiable on an interval $[0;T]$ is given by the following integral :
$$L([0;T]) = \displaystyle \int_0^T \sqrt{1+f’(x)^2} ~dx$$
Note that it is necessary to compute the derivative of the function $f$, which is relatively easy when $f$ has been interpolated by a cubic spline first.
In order to compare the results and the speeds of convergence, several integration methods must be implemented. In terms of coding, the following should be considered :
integration_n_<name>( f, a, b, N )
)integretion_epsilon( f, a, b, eps, meth )
) Don’t forget to limit the maximum value of N that can be used.cos
, sin
, tan
.