close all;
clear all;


g = 9.81;  %m/s^2
lbperkg = 2.2;
Nperlb = g/lbperkg;
mperin = 0.0254;

P = 300; %psi
A = .5;  %in^2
Q = .1;   %L/s

%Convert to SI
A = A*(mperin^2);  %m^2;
P = P*Nperlb/(mperin^2);  %N/m^2
Q = Q/1000;  %m^3/s

F = P*A;  %N
v = Q/A;  %m/s
Pin = P*Q;  %Watts

thdot = 10:2000; 

thdot = v./(d/2);  %rad/s
T = F*d/2;

Pout = T.*thdot;

figure
plot(thdot*60/(2*pi),T);
xlabel('rpm');
ylabel('N-m');

figure
plot(thdot*60/(2*pi),Pin,thdot*60/(2*pi),Pout);
xlabel('rpm');
ylabel('Watts');


