0% found this document useful (0 votes)
7 views7 pages

Ece370 Lab4

EMT lab 4

Uploaded by

samee
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views7 pages

Ece370 Lab4

EMT lab 4

Uploaded by

samee
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 7

INTRODUCTION TO ELECTROMAGENTIC FIELDS

EXPERIMENT # 4
ELECTRIC FIELD INTENSITY(Surface charge)
Objective:

 Introduction to Electric Field Intensity.


 To find E-field for surface charge.
 Verifying the results using MatLab code

Equipment Required:
 Computer having MATLAB software

Introduction:
ELECTRIC FIELD INTENSITY

Up to this point, we have focused on the forces and electric fields generated by point charges, which
occupy negligible physical space. However, charges can also be distributed continuously along a line,
over a surface, or within a volume.
We denote surface charge density, as ρs (in C/m2). The charge element dQ and the total charge Q due
to these charge distributions are obtained from Figure below as

The plate of a charged parallel plate capacitor is an example of surface charge distribution. If the
dimensions of the sheet of charge are very large compared to the distance at which the effects of charge
are to be considered then the distribution is called infinite sheet of charge.
The electric field intensity is given as.

for an infinite sheet of charge

where an is a unit vector normal to the sheet and the electric field is normal to the sheet.

In a parallel-plate capacitor, the electric field existing between the two plates having equal and opposite
charges is given by

TASK 1
MATLAB CODE
Task 1)
% Constants
epsilon_0 = 8.854e-12; % Permittivity of free space (F/m)
sigma = 1e-6; % Surface charge density on the plates (C/m²)

% Create a grid of points in the x-z plane


[x, z] = meshgrid(linspace(-1, 1, 20), linspace(-2, 2, 20)); % X-axis from -1 to 1, Z-axis from -2
to 2

% Calculate the electric field


E = zeros(size(z)); % Initialize electric field array

% Electric field between the plates


E(z >= 0 & z <= 1) = sigma / epsilon_0; % Field between plates (pointing upwards)

% Create the electric field vector components


Ex = zeros(size(E)); % No electric field component in x direction
Ez = E; % Electric field component in z direction

% Create a figure
figure;
hold on;

% Plot the electric field vectors using quiver


quiver(x, z, Ex, Ez, 'b', 'LineWidth', 1.5); % Electric field vectors

% Mark the positions of the plates


yline(0, 'r--', 'LineWidth', 2); % Positive plate at z=0
yline(1, 'g--', 'LineWidth', 2); % Negative plate at z=1

% Set labels and title


xlabel('X-axis (m)');
ylabel('Z-axis (m)');
title('Electric Field Lines Between Two Infinite Parallel Plates');
grid on;
xlim([-1 1]); % X-axis limits
ylim([-2 2]); % Z-axis limits
legend('Electric Field Lines', 'Positive Plate (z=0)', 'Negative Plate (z=1)', 'Location', 'Best');
hold off;
 Electric Field Calculation:

 The electric field is calculated only between the plates (z = 0 to z = 1), pointing in the z-
direction.

 Vector Components:

 Ex is set to zero since there's no electric field in the x-direction.


 Ez holds the values of the electric field calculated earlier.

 Quiver Function:

 The quiver function is used to plot the electric field lines. The arrows point in the direction of
the electric field, with their lengths representing the magnitude.

 Plate Representation:

 The positions of the positive and negative plates are represented using dashed lines.

CODE 2:
% Constants
sigma = 1e-6; % Surface charge density (C/m²)
epsilon_0 = 8.854e-12; % Permittivity of free space (F/m)

% Create a grid of points


[x, z] = meshgrid(-1:0.2:1, -2:0.2:2); % X-axis from -1 to 1, Z-axis from -2 to 2

% Electric field magnitude (E) between the plates


E_magnitude = sigma / epsilon_0; % E field strength between the plates

% Electric field components


Ex = zeros(size(x)); % No component in x-direction
Ez = E_magnitude * ones(size(z)); % Constant field in z-direction

% Create a figure
figure;
hold on;

% Plot the electric field vectors


quiver(x, z, Ex, Ez, 'b', 'LineWidth', 1.5);

% Plot the plates


yline(0, 'r--', 'LineWidth', 2); % Positive plate
yline(1, 'g--', 'LineWidth', 2); % Negative plate

% Set labels and title


xlabel('X-axis (m)');
ylabel('Z-axis (m)');
title('Electric Field Lines Between Two Parallel Plates');
grid on;
axis equal; % Equal scaling for both axes
xlim([-1 1]); % X-axis limits
ylim([-2 2]); % Z-axis limits
legend('Electric Field Lines', 'Positive Plate (z=0)', 'Negative Plate (z=1)', 'Location',
'Best');
hold off;

 Grid Creation: A meshgrid is created with a coarser resolution to simplify the


visualization.
 Electric Field Calculation: The electric field is set as a constant value in the z-direction
between the plates.
 Vector Plotting: The quiver function is used to draw the electric field vectors, representing
the electric field between the plates.
 Plate Representation: The positive and negative plates are marked with dashed lines for
clarity.

Exercise:
Q1)
CONCLUSION

8 SIGNATURE

You might also like