clear;

load all_the_data.txt;

%%% Import the data
a = all_the_data;

%%% Move data matrix into convenient variable names
run = a(:,1);  %%% Run ID number
Dc  = a(:,2);  %%% Diameter of cylinder (m)
Dt  = a(:,3);  %%% Diameter of tube (m)   
L   = a(:,4);  %%% Length of tube (m)
rho = a(:,5);  %%% Density of fluid (kg/m^3)
mu  = a(:,6);  %%% Viscosity of fluid Pa-s
t   = a(:,7);  %%% Time (s)
H1  = a(:,8);  %%% Height of cylinder 1, draining (m)
H2  = a(:,9);  %%% Height of cylinder 2, filling - inferred from H1 (m)
dH1_dt = a(:,10);  %%% dH1/dt rate that H1 is changing - inferred from data (m/s)

%%% Calculate derived quantities
Ac = pi*Dc.^2/4;  %%% Area of cylinder
At = pi*Dt.^2/4;  %%% Area of tube

%%%% Fill out the following
%U = ???              velocity in m/s
%Q = ??               Volumetric flow rate in m^3/s
%P = ???              Pressure drop across tube

 
%%% Example of plotting all the data pressure vs. flow
loglog(P,Q,'.');
xlabel('Pressure (Pa)')
ylabel('Flow rate (ml/s)')
 
 
 
 
 
