Tuesday, June 26, 2012

A program to plot the dispersion relation for electromagnetic waves in plasma


% A program to plot the dispersion relation for electromagnetic waves in
% plasma with B_o = 0

clear all
close all

% assign the value of constants
no = 1e18; % neutral density in m^-3
e = 1.6021e-19; % charge of electron in C
Eo = 8.8541e-12; % permittivity of free space in Fm^-1
me = 9.1095e-31; % mass of electron in kg
w_p = sqrt(no*e^2/Eo/me);% plasma frequency
c = 3e8; % speed of light in vacuum
k = linspace(-2*pi/2000,2*pi/2000,1000);
% mathematical relation of w with k
w  = sqrt(w_p^2 + c^2*k.^2); % frequency of electromagnetic wave
plot(k,w)
xlabel('wave vector(k)'), ylabel('ferquency of electromagnetic wave (w)'),title('Dispersion relation for electromagnetic waves in plasma with B_o = 0')
grid on




Saturday, June 23, 2012

A program to plot the dispersion relation for electron plasma waves


I have made a program to plot the dispersion relation for electron plasma wave using MATLAB. The M-file code and plot are shown below.

% A program to plot the dispersion relation for electron plasma waves

% assign the value of constants

no = 1e18; % neutral density in m^-3
e = 1.6021e-19; % charge of electron in C
Eo = 8.8541e-12; % permittivity of free space in Fm^-1
me = 9.1095e-31; % mass of electron in kg
KT_e = 100; % temperature in ev
v_th = sqrt(2*KT_e/me); %thermal velocity
w_p = sqrt(no*e^2/Eo/me); % plasma frequency
k = linspace(-2*pi/1000000,2*pi/1000000,1000);
% mathematical relation of w with k
w  = sqrt(w_p^2 + 3/2*v_th^2*k.^2); %frequency of electron plasma wave:
%w^2  = w_p^2 + 3/2*v_th^2*k.^2
plot(k,w)
xlabel('wave vector(k)'), ylabel('electron plasma ferquency(w)'),title('Dispersion relation for electron plasma wave')
grid on