In my last post, I wrote "Although I am writing a more objective test, this graph was sufficient to give me confidence in my code." Silly me. I shouldn’t have published before developing my objective test. I was right about the usefulness of graphs, however.
generates a perfectly reasonable airfoil...
(define my-foil(joukowsky 0.25 -0.02+0.01i 101))
...but when I analyze it...
(define my-geometry(make-geometry my-foil)) (display(plot-foil(geometry-C my-geometry)))
... the airfoil fails to map to a circle. The problem seems to lie in choosing the correct root of \(J^{-1}\), but in fact it’s a little more subtle than that. The Joukowsky maps the exterior of a circle \(|c|>a\) onto the entire \(n\) plane, but it also maps the interior onto the same plane(\(|c|<a\)). When trying to perform the inverse mapping, my airfoil wanders across the boundary of \(a\), weird things happen.
So, back to my old approach, picking a point on \(|c|=a\), and seeing if it is close enough to a point \(n\). The heavy lifting on this is done, in that one of the subroutines to my Powell optimizer is pretty good at picking such points, and in that the code that let me find this bug is already incorporated into my test base.
It’s interesting that the size of my code base is shrinking (I get to strip out all the \(J^{-1}\) stuff), but my test base keeps growing. The older I get, the more I value testing discipline.


