I've just had a go at plotting flow around aerofoils and I've come across a problem where I can't spot where I've gone wrong.
I've previously worked out that the complex potential flow around a disk with added circulation (to satisfy the stagnation point being on the trailing edge) is given by $$\Omega (z)=U\left(ze^{-i\phi}+\frac{e^{i\phi}}{z}\right)+2iUsin\phi ln(z).$$
To transform the disk into an aerofoil shape, I (think!) I need to apply the Joukowski Mapping to an off-centred disk. I can then find the inverse of this map and substitute this into the previously known flow around a disk and plot the streamlines.
Now to do this, I thought to first apply an affine transformation to map the disk to an off-centred disk that passes through the point $\zeta=1$ and encloses $\zeta=-1$ (the two critical points of the Joukowski transform), and then apply the Joukowski map, work out the inverse and substitute into the known flow. So here goes: first I apply the transformation
$$w=\alpha z +\beta,$$
such that $\alpha = |1-\beta|$. This maps the disk $|z|\leq 1$ to a disk centred $\beta$, radius $\alpha$. Then applying the Joukowski map $$\zeta=\frac{1}{2}\left(w+\frac{1}{w}\right)=\frac{1}{2}\left(\alpha z +\beta+\frac{1}{\alpha z +\beta}\right),$$ and solving for z, $$z=\frac{\zeta-\beta+\zeta\sqrt{(1-\frac{1}{\zeta^2})}}{\alpha} .$$
Substituting this into the known flow and plotting the imaginary part, if I simply shift the disk along the real axis, I get roughly what I expect (the green line being the dividing streamline):

But if I shift the disk upwards, whilst I get the right sort of shape, it's clearly not correct:


If anyone could give me a push as to where I've gone wrong it would be appreciated. I can't spot it in the code or the workings at all. Thanks!