clear all
close all

Q = [0:200];  %L/m
q = Q/(1000*60);  %m^3/s

dP = (5:5:20)';
dp = 6894.76*dP;  %Pa (N/m^2)

D = 47/1000;  %Filter Diameter (m)
A = 0.25*pi*D^2;

P = dp*q;  %Watts

F = dp*A;

for i = 1:length(dP)
  leg_str{i} = ['Filter Pressure Drop  = ' num2str(dP(i)) ' psi'];
end

figure
subplot(2,1,1)
plot(Q,P)
xlabel('Flow Rate (LPM)');
ylabel('Mechanical Power Requirements (Watts)');
legend(leg_str,'Location','NorthWest');
grid on
subplot(2,1,2)
plot(dP,F/4.45);
xlabel('Pressure drop across filter (psi)')
ylabel('Total Force on Filter  (lbs)');
grid on


print('-dpdf','MechanicalPowerEstimates.pdf')
