close all
clear all



D = [2.0 2.25]*.0254;
Dr = 1.75*.0254;


A = 0.25*pi*(D.^2-Dr^2);


V = 0:1/100:1; V = V';
F = 0:10:14000;

Q = V*A;
P = (1./A')*F;

figure('Position',[520   142   843   956],'PaperOrientation','portrait','PaperPositionMode','auto');
subplot(2,1,1)
plot(V,Q*1000*60/3.81)  %G/min
xlabel('Speed (m/s)');
ylabel('Flow Rate (GPM)');
legend('D = 2.0 in','D = 2.25 in');
title('Flow and Pressures for a range of Bore Diameters;  Rod = 1.75 in');

subplot(2,1,2)
plot(F,P/6894)  %psi
xlabel('Force (N)');
ylabel('Pressure Differential (psi)');
legend('D = 2.0 in','D = 2.25 in');

print('-dpdf','OneSevenFiveInchRamFlowRates');

Disp5 = 4.9;  %cm^3/rev
Disp5 = Disp5/(100^3);  %m^3/rev
N5 = Q/Disp5;

Disp6 = 6.0;  %cm^3/rev
Disp6 = Disp6/(100^3);  %m^3/rev
N6 = Q/Disp6;

Disp10 = 9.8;  %cm^3/rev
Disp10 = Disp10/(100^3);  %m^3/rev
N10 = Q/Disp10;

figure('Position',[520   142   843   956],'PaperOrientation','portrait','PaperPositionMode','auto');
subplot(3,1,1)
plot(V,N5*60);
legend('D = 2.0 in','D = 2.25 in','Location','NorthWest');
xlabel('Speed (m/s)');
ylabel('N (rpm)');
title('F11-5 Motor;  Rod = 1.75 in');

subplot(3,1,2)
plot(V,N6*60);
legend('D = 2.0 in','D = 2.25 in','Location','NorthWest');
xlabel('Speed (m/s)');
ylabel('N (rpm)');
title('F11-6 Motor;  Rod = 1.75 in');

subplot(3,1,3)
plot(V,N10*60);
legend('D = 2.0 in','D = 2.25 in','Location','NorthWest');
xlabel('Speed (m/s)');
ylabel('N (rpm)');
title('F11-10 Motor;  Rod = 1.75 in');

print('-dpdf','OneSevenFiveInchRamRPMS');
