## How can i create efficiency isolines in a compressor map?

### chapuisat (view profile)

on 12 Sep 2018
Latest activity Edited by jonas

on 27 Sep 2018

### jonas (view profile)

I have mass flow, pressure ratio and efficiency values of about 30 points for 3 different rotation speed. I need to plot a compressor map as in the link by using these datas: https://www.uniplot.de/_images/metafiles-compressormap-80.png
I used interp1 with spline as method to create constant rotation speed lines (black lines in link above). And now i need to create efficiency isolines. I tried with different commands(for example; contour, griddata) but it did not work so far.
How can i create efficiency isolines?

jonas

on 12 Sep 2018
chapuisat

on 12 Sep 2018
here you are

### jonas (view profile)

on 12 Sep 2018

This is what I'm getting from the data you uploaded.
data=vertcat(rpm{:});
x=data(:,2)
y=data(:,4)
z=data(:,3)
%%Interpolate on grid
[X,Y]=meshgrid(min(x):.01:max(x),min(y):.01:max(y))
Z=griddata(x,y,z,X,Y)
%%Plot contour
contourf(X,Y,Z);hold on
%%Plot lines
plot([x(1:8);NaN;x(9:20);NaN;x(21:end)],[y(1:8);NaN;y(9:20);NaN;y(21:end)],'-k','linewidth',2)
cb=colorbar

### chapuisat (view profile)

on 16 Sep 2018

I think the map in the link below looks visually better with regards to efficiency area.
How can i change efficiency area as in the link below?

jonas

### jonas (view profile)

on 16 Sep 2018
The link brought me to a master thesis pdf but I think I know which fig you are referring to. Basically its a surface plot with some added features.
There are a million things you can change to make the surface look more visually appealing. Here's an example of some things you could try:
data=vertcat(rpm{:});
x=data(:,2)
y=data(:,4)
z=data(:,3)
%%Interpolate on grid
[X,Y]=meshgrid(min(x):.002:max(x),min(y):.01:max(y));
Z=griddata(x,y,z,X,Y)
%%Tighten surface to avoid extrap
b = boundary(x,y,1)
in=inpolygon(X,Y,x(b),y(b));
Z(~in)=NaN;
%%Plot contour
h=pcolor(X,Y,Z);hold on
set(h,'linestyle','none')
%%Plot lines
plot([x(1:8);NaN;x(9:20);NaN;x(21:end)],[y(1:8);NaN;y(9:20);NaN;y(21:end)],'o-k','linewidth',1.5,'markerfacecolor','k')
cb=colorbar
%%Plot boundary
plot(x(b),y(b),'k','linewidth',1)
xlim([.2 1.8])
ylim([1 4.5])
set(gca,'layer','top')
chapuisat

### chapuisat (view profile)

on 27 Sep 2018
How did you define x(b) and y(b)?
jonas

### jonas (view profile)

on 27 Sep 2018
If I remember correctly I used.
b = boundary(x,y,1);
That line got lost somehow, sorry.