| New Reply |
Matlab - plot pressure distribution around a circle |
Share Thread | Thread Tools |
| Aug16-10, 06:25 AM | #1 |
|
|
Matlab - plot pressure distribution around a circle
I'm trying to plot the pressure distribution around a cylinder in a uniform flow field, so that the graphic is a circle with the pressure curve around it, like in the image below.
![]() Uploaded with ImageShack.us I have the equation for the ideal pressure coefficient Cp (which is what I'm wanting to display), and t is the theta values. (See code below) Then I use the polar function to plot it... polar(t,Cp)... but that starts at the origin, which isn't what I want. I thought it might help if I added the radius of my proposed circle to Cp, but it doesn't. So maybe I need a scaling factor on Cp or something..? Could someone help me out? Thanks. Code:
%%% Flow Around a Cylinder %%% % Initialise variables clear all clc U = 12; % Freestream velocity m/s M = 2; % Doublet strength radius = sqrt(M/2/pi/U); % Cylinder radius t = linspace(0,2*pi,50); % Range of theta values circle = ones(1,50); % Create vector circle = radius.*circle; % Circle of required radius % Calculations cp = 1 - 4.*(sin(t)).^2; % Pressure coefficient cp_scaled = cp + radius; % Attempted scaling % Display graphs polar(t,cp,'--r') hold on polar(t,circle) hold off figure polar(t,cp_scaled,'--r') hold on polar(t,circle) hold off |
| Sep28-11, 05:58 AM | #2 |
|
|
Pretty useless now,
just in case if you ever wonder what was missing |
| Sep28-11, 07:53 PM | #3 |
|
|
Thanks :)
I never did figure it out, so it was helpful to know in case I have to do it again. |
| New Reply |
| Thread Tools | |
Similar Threads for: Matlab - plot pressure distribution around a circle
|
||||
| Thread | Forum | Replies | ||
| Distribution Plot | Calculus & Beyond Homework | 0 | ||
| 3D Distribution Plot on Matlab | Math & Science Software | 0 | ||
| 3D Distribution Plot on Matlab | Programming & Comp Sci | 0 | ||
| MATLAB: Marginal Distribution Plot | Math & Science Software | 3 | ||
| Probability plot for Cauchy Distribution | Set Theory, Logic, Probability, Statistics | 1 | ||