Hey all:(adsbygoogle = window.adsbygoogle || []).push({});

I am trying to plot the streamlines of a source flow in MATLAB. I just have a couple issues. First, when I change the strength, it doesn't appear that the streamlines change at all. Second, the three lines commented out below, I used them from an example, but now they don't work.

If someone could give me a hand checking this code, that would be great.

Code:

clear all

close all

clc

nx = 100; xmin = -2; xmax = 2;

ny = 100; ymin = -2; ymax = 2;

[x y] = meshgrid(linspace(xmin,xmax,nx),linspace(ymin,ymax,ny));

M = 8; xM = 0; yM = 0;

PsiM = (M/(2*pi))*atan2(y - yM,x - xM);

% levmin = PsiM(1,nx);

% levmax = PsiM(ny,nx/2);

% levels = linspace(levmin,levmax,50);

contour(x,y,PsiM,100)

axis([xmin xmax ymin ymax])

xlabel('x'), ylabel('y')

title('Source of Strength M = 4')

**Physics Forums - The Fusion of Science and Community**

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Source Potential Flow

Loading...

Similar Threads for Source Potential Flow | Date |
---|---|

Source for tiny U-joints | Mar 13, 2017 |

ASME PV Calc open source software for vessel MAWP calculations | Jan 30, 2017 |

Sourcing a Diverter Valve for Regenerative Blower | Jan 25, 2017 |

Steady State Heat Equation with Source | Nov 9, 2015 |

**Physics Forums - The Fusion of Science and Community**