% Plot velocity field for low Reynolds flow around a sphere % Based on analysis in Landau and Lifshitz, Section 20 ell = 1; % radius of the sphere u = [1;0]; % velocity field as |x| -> oo m = 20; % grid density for quiver plot x1 = linspace(-4,4,m); % position, horizontal grid x2 = linspace(-2.5,2.5,m); % position, vertical grid v1 = zeros(length(x2),length(x1)); % velocity, horizontal grid v2 = zeros(length(x2),length(x1)); % velocity, vertical grid I = eye(2); for k=1:length(x1), for j=1:length(x2) x = [x1(k);x2(j)]; if norm(x)