Please help. This is a problem I need to use on Matlab. The data is given below.
ID: 3780267 • Letter: P
Question
Please help. This is a problem I need to use on Matlab.
The data is given below.
You will be given a set of data to analyze. The data is velocity, in m/s (second column) as a function of position in meters (first column) for a fluid flowing through a rectangular channel that is 0.5 m high and 1 m wide. The following parts will help you determine the average velocity and the mass flowrate through the channel.
Part f)
Calculate the mass flowrate (m) using the following equation: m[kg/s]=p[kg/m^3]v[m/s]A[m^2] where v is the average velocity, and A is the cross-sectional area of the channel.
Explanation / Answer
L=200;D=1;visco=.001;densi=1000;
R=1e5;
for i=1:20;
f=0.0791*R^(-.25);
V2=sqrt(981/(.5+400*f));
fprintf('V2(m/s) = %8.2f ',V2)
R=densi*D*V2/visco;
check=abs(R/Rsave-1);
if check<.01, break, end
Rsave=R;
end
result=densi*V2*pi*D^2/4;
fprintf('Mass flow rate (kg/s) = %g ',result)