% This is a program to plot the decay of plasma by ambipolar diffusion in one dimensional slab:
clear all
close all
n_o = 1e12; % initial density in m^-3
L = 0.024; % length of edge from centre of the slab in m
D = 0.4; % ambipolar diffusion coeffecient in m^2/sec
T = (2*L/pi)^2/D; % tau:mean time between collision
x = linspace(-.024,.024);
for t = 0:.00002:.001;
n = n_o*exp(-(t./T)).*cos(pi*x./2/L); % density distribution
plot(x,n),xlabel('x(slab dimension)'),ylabel('n(density of plasma)')
axis([-0.024 0.024 0 1e12])
pause(.1) % pause the fig for .1 sec
end
No comments:
Post a Comment