Assigning Fuel Spray Droplets Code
clc
clear
figure
[x,y,z] = sphere(20,1);
surf(x,y,z) % sphere centered at origin
for i=1:10;
hold on
surf(x+randn(1,1),y+randn(1,1),z+randn(1,1)) % sphere centered at (3,-2,0)
surf(x+randn(1,1),y+randn(1,1),z+randn(1,1)) % sphere centered at (0,1,-3)
end
daspect([1 1 1])
clear
figure
[x,y,z] = sphere(20,1);
surf(x,y,z) % sphere centered at origin
for i=1:10;
hold on
surf(x+randn(1,1),y+randn(1,1),z+randn(1,1)) % sphere centered at (3,-2,0)
surf(x+randn(1,1),y+randn(1,1),z+randn(1,1)) % sphere centered at (0,1,-3)
end
daspect([1 1 1])
Assigning a Path to the Fuel Droplet
clc
clear
M=10;
N=30;
for i=1:M;
x(i)=i;
y(i)=i;
end
for j=M+1:N;
x(j)=j;
y(j)=10;
end
figure(1)
uicontrol('Style','pushbutton',...
'String','Zoom In',...
'Position',[20 20 60 20],...
'Callback','if camva <= 1;return;else;camva(camva-1);end');
uicontrol('Style','pushbutton',...
'String','Zoom Out',...
'Position',[100 20 60 20],...
'Callback','if camva >= 179;return;else;camva(camva+1);end');
plot(x,y)
grid on
xlabel('x')
ylabel('y')
% pause(10)
grid on
% x0=0;
% y0=0;
% z0=0;
for t=1:M+N;
[x,y,z] = sphere(20);
figure(t+1)
surf(x+x(t),y+y(t),z)
hold on
plot3(0,0,0,'r*')
daspect([1 1 1])
pause(0.1)
end
close all
[x,y,z] = sphere(20);
surf(x,y,z) % sphere centered at origin
for i=1:10;
hold on
surf(x+randn(1,1),y+randn(1,1),z+randn(1,1)) % sphere centered at (3,-2,0)
surf(x+randn(1,1),y+randn(1,1),z+randn(1,1)) % sphere centered at (0,1,-3)
end
clear
M=10;
N=30;
for i=1:M;
x(i)=i;
y(i)=i;
end
for j=M+1:N;
x(j)=j;
y(j)=10;
end
figure(1)
uicontrol('Style','pushbutton',...
'String','Zoom In',...
'Position',[20 20 60 20],...
'Callback','if camva <= 1;return;else;camva(camva-1);end');
uicontrol('Style','pushbutton',...
'String','Zoom Out',...
'Position',[100 20 60 20],...
'Callback','if camva >= 179;return;else;camva(camva+1);end');
plot(x,y)
grid on
xlabel('x')
ylabel('y')
% pause(10)
grid on
% x0=0;
% y0=0;
% z0=0;
for t=1:M+N;
[x,y,z] = sphere(20);
figure(t+1)
surf(x+x(t),y+y(t),z)
hold on
plot3(0,0,0,'r*')
daspect([1 1 1])
pause(0.1)
end
close all
[x,y,z] = sphere(20);
surf(x,y,z) % sphere centered at origin
for i=1:10;
hold on
surf(x+randn(1,1),y+randn(1,1),z+randn(1,1)) % sphere centered at (3,-2,0)
surf(x+randn(1,1),y+randn(1,1),z+randn(1,1)) % sphere centered at (0,1,-3)
end
Example Modelling Fuel Droplet Evaporation
clc
clear
%Fuel(DODECANE) Air
M=100;
for i=1:M;
HFG(i)=256000;
RU(i)=8315;
MWDODECANE(i)=170.337;
MWN2(i)=28.014;
T(i)=479.5+0.01*randn(1,1);
P(i)=1+0.01*randn(1,1);
TB(i)=489.5;
PSAT(i)=P(i)*exp((-HFG(i)/(RU(i)/MWDODECANE(i)))*(1/T(i)-1/TB(i)));
XDODECANE(i)=0.7998;
end
for i=1:M;
rl(i)=749;
DAB_1(i)=8.1*10^(-6);
T_1(i)=400;
YAIN(i)=0;
YAS(i)=(PSAT(i)*MWDODECANE(i))/(XDODECANE(i)*MWDODECANE(i)+(1-XDODECANE(i))*MWN2(i));
rs(i)=100*10^(-6)+randn(1,1)*0.00000000000000000001*10^(-6);
PN2(i)=101325;
rN2(i)=PN2(i)/((RU(i)/MWN2(i))*T(i))
T_2(i)=T(i);
DAB_2(i)=DAB_1(i)*((T_2(i)/T_1(i))^(1.5));
BY(i)=(YAS(i)-YAIN(i))/(1-YAS(i));
K(i)=(8*rN2(i)*DAB_2(i)*log(1+BY(i)))/rl(i);
end
t(1)=0;
for i=1:M;
MM(i)=4*pi*rs(i)*rl(i)*DAB_2(i)*log(1+BY(i));
rss(i)=rs(i);
td(i)=(rss(i)^2)/K(i);
t(i+1)=t(i)+0.0001
rsss(i)=(rss(i)^2-K(i)*t(i+1))^2;
end
X=(1:1:M)
scrsz = get(0,'ScreenSize');
figure('Position',[200 200 1500 500])
plot(X,MM)
xlabel(' Numer of Samples')
ylabel(' Evaporation Rate')
grid on
scrsz = get(0,'ScreenSize');
figure('Position',[200 200 1500 700])
plot(X,td)
xlabel(' Numer of Samples')
ylabel(' Droplet Life Time (Sec)')
grid on
scrsz = get(0,'ScreenSize');
figure('Position',[200 200 1500 700])
plot(t(1:1:100),rsss)
xlabel(' Seconds')
ylabel(' D^2 ')
grid on
clear
%Fuel(DODECANE) Air
M=100;
for i=1:M;
HFG(i)=256000;
RU(i)=8315;
MWDODECANE(i)=170.337;
MWN2(i)=28.014;
T(i)=479.5+0.01*randn(1,1);
P(i)=1+0.01*randn(1,1);
TB(i)=489.5;
PSAT(i)=P(i)*exp((-HFG(i)/(RU(i)/MWDODECANE(i)))*(1/T(i)-1/TB(i)));
XDODECANE(i)=0.7998;
end
for i=1:M;
rl(i)=749;
DAB_1(i)=8.1*10^(-6);
T_1(i)=400;
YAIN(i)=0;
YAS(i)=(PSAT(i)*MWDODECANE(i))/(XDODECANE(i)*MWDODECANE(i)+(1-XDODECANE(i))*MWN2(i));
rs(i)=100*10^(-6)+randn(1,1)*0.00000000000000000001*10^(-6);
PN2(i)=101325;
rN2(i)=PN2(i)/((RU(i)/MWN2(i))*T(i))
T_2(i)=T(i);
DAB_2(i)=DAB_1(i)*((T_2(i)/T_1(i))^(1.5));
BY(i)=(YAS(i)-YAIN(i))/(1-YAS(i));
K(i)=(8*rN2(i)*DAB_2(i)*log(1+BY(i)))/rl(i);
end
t(1)=0;
for i=1:M;
MM(i)=4*pi*rs(i)*rl(i)*DAB_2(i)*log(1+BY(i));
rss(i)=rs(i);
td(i)=(rss(i)^2)/K(i);
t(i+1)=t(i)+0.0001
rsss(i)=(rss(i)^2-K(i)*t(i+1))^2;
end
X=(1:1:M)
scrsz = get(0,'ScreenSize');
figure('Position',[200 200 1500 500])
plot(X,MM)
xlabel(' Numer of Samples')
ylabel(' Evaporation Rate')
grid on
scrsz = get(0,'ScreenSize');
figure('Position',[200 200 1500 700])
plot(X,td)
xlabel(' Numer of Samples')
ylabel(' Droplet Life Time (Sec)')
grid on
scrsz = get(0,'ScreenSize');
figure('Position',[200 200 1500 700])
plot(t(1:1:100),rsss)
xlabel(' Seconds')
ylabel(' D^2 ')
grid on
Unless otherwise noted, all content on this site is @Copyright by Ahmed Al Makky 2012-2014 - http://cfd2012.com