Connecting Points in a Scatter Plot

32 views (last 30 days)
Here is what I'm tasked to do. I need to make three plots where in each plot the pressure and temperature change. In each of the plots, I need to plot Thrust against Mach number for a range of fuel flow rates (6 values for now). So for example, plot 1 with P=30000 Pa and T=230 K will have 6 curves, each curve corresponding to a different fuel flow rate. What I need to do is for each fuel flow rate "setting", I need to connect the points for x=mach number y=thrust.
I've attached my code so you can see if my logic is wrong. http://www.mediafire.com/?8z30my3zfija28j

Accepted Answer

Matt Tearle
Matt Tearle on 27 Feb 2011
Focusing just on the problem at hand, I'd suggest
  1. changing line 126 to Thrust(mdotfuel+1,mach,Alt) = mdotfuel*(U8-Uo);
  2. adding Thrust = zeros(6,3,3); before the for loops (line 26)
  3. removing all plot-related commands in the loops
  4. adding something along the lines of
Mo=[0 1 2];
for k = 1:3
figure(k)
plot(Mo,Thrust(:,:,k),'b.-')
end
at the end.
  1 Comment
Harold
Harold on 27 Feb 2011
Thank you, this worked perfect. This however one other issue that I could not figure out. I also need to make the "curves" for each fuel flow rate fall within a certain range. With turbojet engines you of course have operating ranges. This particular question puts restrictions on the compressor pressure ratio and the total temperature at the exit of the burner Tt4=1500K. Right now I'll just consider Tt4 and apply what I learn here to the compressor pressure ratio.
The equation for Tt4 is as follows
Tt4=mdotfuel/mdoto*h/Cp +Tt3
In the beginning of the program where I declared my variables I declared a knew one for Cp, Cp=1004
I also added in the equation for Tt4 at line 87.
What I'm now trying to figure out is how to plot a new line for the operating range. What I'm thinking I need to do is set Tt4=1500. This will result in new thrust values. I then can plot a new line showing the operating limit. Sorry if I could not explain this better. Picture the plots that we have plotted but with an ellipse (possibly different curve) encircling the mdotfuel lines. I'll give this a try and see if I come up with anything reasonable.

Sign in to comment.

More Answers (0)

Categories

Find more on View and Analyze Simulation Results in Help Center and File Exchange

Tags

Products

Community Treasure Hunt

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

Start Hunting!