Species Concentration Study
clc
clear
LX=1;
LY=1;
LZ=1;
N=50;
M=50;
L=50;
DX=LX/M;
DY=LY/N;
DZ=LZ/L;
for i=1:M;
for j=1:N;
n(i,j)=rand(1,1)*exp(-0.001*i*j);
end
end
for i=1:M;
for j=1:N;
V(i,j)=DX*DY*DZ;
C(i,j)=n(i,j)/V(i,j);
end
end
contour(C,12)
title('Concentration in a 2D Domain')
xlabel('X')
ylabel('Y')
clear
LX=1;
LY=1;
LZ=1;
N=50;
M=50;
L=50;
DX=LX/M;
DY=LY/N;
DZ=LZ/L;
for i=1:M;
for j=1:N;
n(i,j)=rand(1,1)*exp(-0.001*i*j);
end
end
for i=1:M;
for j=1:N;
V(i,j)=DX*DY*DZ;
C(i,j)=n(i,j)/V(i,j);
end
end
contour(C,12)
title('Concentration in a 2D Domain')
xlabel('X')
ylabel('Y')
Unless otherwise noted, all content on this site is @Copyright by Ahmed Al Makky 2012-2013 - http://cfd2012.com