In page 36 of the paper ''On dynamic interactions between body motion and fluid motion by Frank T. Smith, Samire Balta, Kevin Liu and Edward R. Johnson'', there is the equation (65) giving the complex velocity potential. I am taking the imaginary part of this equation to reproduce Figure 18 on the next page.
Here is my Matlab code:
x = -2:0.02:2;
y = -1:0.01:1;
[X, Y] = meshgrid(x, y);
z = X + i.*Y;
zc = X - i.*Y;
a = sqrt(z.^2 - 1);
w = -i.*(z + a + log(1./(z + a)));
f = imag(w)
[C, h] = contour(X, Y, f, 'k');
y = 0;
line([-1,1],[y,y], 'linewidth', 2, 'color', 'k');
For some reason starting off at x = 0.22 and carrying on the negative x values, I can’t get the same plot as in Figure 18.Can you see where have I gone wrong in my code?