# Plot the streamlines and pressure for flow around a rotating cylinder

13 visualizzazioni (ultimi 30 giorni)
erq il 13 Dic 2013
Risposto: Simon il 13 Dic 2013
r0=1,U=1,p=1,0<theta<2pi,r0<r<3r0, generate gamma=0, gamma=-2pir0U.
LAMBDA = 1.; Pinf = 1.; U = 1.;
th = linspace(0,2*pi,100); r = linspace(0.1,1,100); [TH,R] = meshgrid(th,r); [X,Y] = pol2cart(TH,R);
PSI = -LAMBDA.*sin(TH)./R; VR = -LAMBDA./(R.^2).*cos(TH); VTH = -LAMBDA./(R.^2).*sin(TH); P = Pinf + U^2/2 - (VR.^2 + VTH.^2)/2;
figure contourf(X,Y,P,20,'LineColor','none'); hold on; contour(X,Y,PSI,20,'-k.','LineWidth',1); axis equal; xlabel('X'); ylabel('Y');
##### 0 CommentiMostra -2 commenti meno recentiNascondi -2 commenti meno recenti

Accedi per commentare.

### Risposte (1)

Simon il 13 Dic 2013
Hi!
Please use the code formatting for pasting code, thanks!
And what is the question? What did you do? Where does the code come from? What does it calculate?
##### 0 CommentiMostra -2 commenti meno recentiNascondi -2 commenti meno recenti

Accedi per commentare.

### Categorie

Scopri di più su Develop Apps Using App Designer in Help Center e File Exchange

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by