Study the behavior electric potential of an electric dipole

Study the behavior electric potential of an electric dipole: derive expressions of the potential for a dipole aligned with the: A) z axis so p middot R = pz middot R = p cos theta B) y axis so p middot R = py middot R = p sin theta sin phi Write a MATLAB script in which you define the potential function of the electric dipole for each case (A-C) in the y-z [cp = 90 degree) plane. Use the command \"gradient\" to compute the electric field from the potential. Use the commands \"contour\" and \"quiver\" to obtain plots of the equipotential lines and electric field vectors. Analyze results, describing the behavior of the potential and the resulting electric field in each case. Write a report summarizing procedure, theoretical analysis, and major simulation findings.

Solution

Below is the matlab code:

dipole.m:

%--Contour diagram of electric dipole potential field
% Matlab code.
close all; clear all

%--Preparing the figure properties
axis([-6 6 -7 7]); axis equal;
xlabel(\'x-axis\', \'Fonts\', 15);
ylabel(\'z-axis\', \'Fonts\', 15);
set(gca, \'fonts\', 16, \'Ytick\', [-6:2: 6] );
hold on;

%--Negative contours are listed here
conto = zeros(9,1);
conto(1) = 0.05;
step = 0.02;
for i=1:9
conto(i+1) = conto(i) + step;
step = step*1.5;
end
conto = -100*conto; conto=round(conto); conto=conto/100;

%--x grid information
x = [-3.5 : .05 : 3.5];
%--Negative z-grid information
z = [-5 : .05 : -.05];

%--Ploting below the x-axis
[X Z] = meshgrid(x,z);
P = Z./(sqrt(X.^2+Z.^2).^3); %<--- Function plotted here
[c h] = contour(X,Z,P, conto, \'b\' );
clabel(c,h, \'manual\', \'fonts\', 12);

%--Flip signs information
z = -z;
conto = -conto;

%--Ploting the above x-axis
[X Z] = meshgrid(x,z);
P = Z./(sqrt(X.^2+Z.^2).^3); %<--- Function plotted here
[c h] = contour(X,Z,P, conto, \'r\');
clabel(c,h, \'manual\', \'fonts\', 12);

 Study the behavior electric potential of an electric dipole: derive expressions of the potential for a dipole aligned with the: A) z axis so p middot R = pz mi

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site