Professional Documents
Culture Documents
2021-22
ELECTROMAGNETIC FIELD
(3140912)
B.E. 4th SEMESTER
1|P a ge
Department Vision
To Foster Learning Environment for Electrical Engineering
Education having High Technical Skills, Ethical Values and
Overall Global Competence.
Department Mission
To provide high quality graduate program in Electrical Engineering to
prepare students for
1. Better Employability, Startups and Entrepreneurship.
2. A professional career with essential technical and managerial
skills.
3. Collaboration with industries through research and innovation.
4. Other avenues for higher education.
5. Adapting to change in technology and apply the same for
the benefits of society at large.
Program Educational Outcomes (PEOs)
PEO 1: To create better learning environment to develop
entrepreneurship capabilities in various areas of Electrical
Engineering with superior efficiency, productivity, cost
effectiveness and technological empowerment of human
resource.
2|Page
Practical: 1.1 Date:
Aim: To study and understand Dot Product and its applications using MATLAB.
Theory:
C = dot(A,B) returns the scalar product of the vectors A and B. A and B must be
vectors of the same length. When A and B are both column vectors, dot(A,B) is
the same as A*B.
Program:
clc;
a=input('coordinates of point A:')
b=input('coordinates of point B:')
c=input('coordinates of point C:')
Rab=b-a;
Rac=c-a;
Ms=dot(Rab,Rab);
Ms1=dot(Rac,Rac);
Mr=sqrt(Ms);
Mr1=sqrt(Ms1);
%unit vector
display('The unit vector along AC is')
Racu=Rac/Mr1
%scalar projection
display('The scalar projection of AB on AC is')
sp=dot(Rab,Racu)
%Vector Projection
display('The vector projection of AB on AC is')
vp=sp*Racu
3|P a ge
Output:
Conclusion:
Signature:
4|P a ge
Practical: 1.2 Date:
Aim: To study and understand Cross Product and its applications using
MATLAB.
Theory:
C = cross(A,B) returns the cross product of the vectors A and B. That is,
C=A*B. A and B must be 3-element vectors. If A and B are multidimensional
arrays, cross returns the cross product of A and B along the first dimension of
length 3.
Program:
clc;
a=input('Enter coordinates of point A:')
b=input('Enter coordinates of point B:')
c=input('Enter coordinates of point C:')
Rab=b-a;
Rbc=c-a;
Ms=dot(Rab,Rab);
Ms1=dot(Rac,Rac);
Mr=sqrt(Ms);
Mr1=sqrt(Ms1);
%cross product
disp('The cross product of AB and AC is:')
CP=cross(Rab,Rac)
%Area
Ms2=dot(CP,CP);
Mr2=sqrt(Ms2);
disp('The area of triangle ABC is:')
Area=0.5*Mr2
5|P a ge
Output:
Conclusion:
Signature:
6|P a ge
Practical: 2.1 Date:
Theory:
7|P a ge
1. Program: Output:
%Cartesian to Cylindrical
clear all;
a=input('Enter coordinates in
Cartesian system:')
2. Program: Output:
%Cylindrical to Cartesian
clear all;
a=input('Enter coordinates in
Cylindrical system:')
8|P a ge
3. Program: Output:
%Cartesian to Spherical
clear all;
a=input('Enter coordinates in Cartesian
system:')
4. Program: Output:
%Spherical to Cartesian
clc;
a=input('Enter coordinates in Spherical
system:')
Conclusion:
Signature:
9|P a ge
Practical: 2.2 Date:
Theory:
10 | P a g e
1. Program: Output:
2. Program: Output:
%Conversion of Cylindrical vector
into Cartesian Vector
clc;
A=input('Enter the coefficients of
Cylindrical vector:')
B=input('Enter the Cylindrical point
for conversion of vector:')
phi=B(2);
11 | P a g e
3. Program: Output:
4. Program: Output:
12 | P a g e
Conclusion:
Signature:
13 | P a g e
Practical: 3.1 Date:
Theory:
Coulomb's law or Coulomb's inverse-square law, is a law of physics that
describes force interacting between static electrically charged particles. In its
scalar form the law is:
1 � 1∗ � 2
F= 4𝜋�� �2
Program:
clc
e=input('Enter the value of epsilon:')
q1=input('Enter the value of charge1:')
q2=input('Enter the value of charge2:')
a1=input('enter the value of position1:')
a2=input('enter the value of position2:')
modr13=modr12*modr12*modr12;
%Calculation of Force
disp('Force on charge 2 due to 1 is:')
F=(q1*q2*r12)/(4*3.14*e*modr13)
14 | P a g e
Output:
Conclusion:
Signature:
15 | P a g e
Practical: 3.2 Date:
Theory:
The magnitude of the electric field E can be derived from Coulomb's law. By
choosing one of the point charges to be the source, and the other to be the test
charge, it follows from Coulomb's law that the magnitude of the electric field E
created by a single source point charge q at a certain distance from it r in
vacuum is given by:
1 �
F= 4𝜋�� � 2
Program:
clear all
e=input('Enter the value of epsilon:')
q1=input('Enter the value of charge1:')
q2=input('Enter the value of charge2:')
a1=input('Enter the value of position1:')
a2=input('Enter the value of position2:')
a3=input('Enter the point at which total field is to be
calculated:')
%Calculation of field
E13 = (q1*r13)/(4*3.14*e*cu1);
E23 = (q2*r23)/(4*3.14*e*cu2);
disp('The field at the given point is:')
E=E13+E23
16 | P a g e
Output:
17 | P a g e
Conclusion:
Signature:
18 | P a g e
Practical: 4.1 Date:
Theory:
The Electric Field Intensity due to a Uniform infinite line charge configuration
is given as
⍴ ā
F=
2𝜋�� r
Program:
%Resultaant Field
disp('The electric field intensity is:')
E=Ex+Ey
19 | P a g e
Ouput:
Conclusion:
Signature:
20 | P a g e
Practical: 4.2 Date:
Theory:
The Electric Field Intensity due to a Uniform infinite line charge configuration
is given as
⍴
F=
ā2𝜀
where ⍴ is the line charge density
r is the distance to the given point
ε is the permittivity of the medium
ε=8.854*10-12 C2N-1m-2 for free space
ā is the unit vector perpendicular to the surface of the sheet
Program:
%Calculation of Electric Field Intensity due to uniform sheet
charge configurations
clear all
p1=input('Sheet charge density of sheet 1:')
r1=input('Position of sheet 1:')
p2=input('Sheet charge density of sheet 2:')
r2=input('Position of sheet 2:')
p3=input('Sheet charge density of sheet 3:')
r3=input('Position of sheet 3:')
p=input('Enter the point at which to find electric field
density:')
%Resultant Field
disp('The Electric Field Intensity is:')
E=E1+E2+E3
21 | P a g e
Output:
22 | P a g e
Conclusion:
Signature:
23 | P a g e
Practical: 5 Date:
Theory:
Divergence theorem states that the integral of normal component of any vector
field over a closed surface is equal to the integral of the Divergence of that vector
field throughout the volume enclosed by that closed surface.
∭ (𝛁 ⋅ ��) ⅆ𝑉 = ∯𝐅 ⋅ ⅆ𝐒
𝑉 �
Program:
clc;
%Limit declaration
%Proving LHS
V=input('Input the Vector Quantity:');
Vx=V(1)
Vy=V(2)
Vz=V(3)
Divx = diff(Vx,x)
Divy = diff(Vy,y)
Divz = diff(Vz,z)
24 | P a g e
disp('Your divergence of given vector is:')
div=Divx+Divy+Divz
div1=int(div,x,x1,x2);
div2=int(div1,y,y1,y2);
div3=int(div2,z,z1,z2);
%Proving RHS
Sidex1=0;
Sidex2=0;
Sidey1=0;
Sidey2=0;
Sidez1=0;
Sidez2=0;
disp('At x=0')
Sidex1=0
disp('At x=1')
Sidex2=int(Vx,y,y1,y2);
Sidex2=int(Sidex2,z,z1,z2);
Sidex2=Sidex2/x
Sidey1=0
Sidey2=0
Sidez1=0
Sidez2=0
RHS=Sidex1+Sidex2+Sidey1+Sidey2+Sidez1+Sidez2
25 | P a g e
Output:
26 | P a g e
Conclusion:
Signature:
27 | P a g e
Practical: 6 Date:
Aim: To calculate the potential difference between two points using MATLAB.
Theory:
The potential difference between two points A and B at radial distances 𝒓� and
𝒓� from a point charge Q is given by,
𝑸 (� �
𝑽�� = − )
𝟒��𝝐� 𝒓 � 𝒓 �
Program:
%Program to find potential difference between two
points
clc;
clear all;
Vab=(Q/(4*pi*8.854*(1e-12)))*((1/Ra)-(1/Rb));
%Display
28 | P a g e
Output:
Conclusion:
Signature:
29 | P a g e
Practical: 7 Date:
Theory:
The “double del” operator or “Del squared” operator is also called the Laplacian
Operator.
𝜕 2𝜓 𝜕 2𝜓 𝜕 2𝜓
𝛁 ⋅ �� = + +
���2 �� � ���2
2
Program:
vx=diff(diff(v,x),x)
vy=diff(diff(v,y),y)
vz=diff(diff(v,z),z)
L=vx+vy+vz
30 | P a g e
Output:
Conclusion:
Signature:
31 | P a g e
Practical: 8 Date:_
Theory:
The law of Biot-Savart states that at any point P the magnitude of the magnetic
field intensity produced by the differential element is proportional to the product
of the current, the magnitude of the differential length, and the sine of the angle
lying between the filament and a line connecting the filament to the point P at
which the field is desired; also, the magnitude of the magnetic field intensity is
inversely proportional to the square of the distance from the differential element
to the point P.
� ⅆ𝐿 × 𝑎�
ⅆ�
4���
Program:
2
clc; =
clear all;
32 | P a g e
Output:
33 | P a g e
Conclusion:
Signature:
34 | P a g e
Practical: 9 Date:
Theory:
The curl of any vector is a vector, and any component of the curl is given by
thelimit of the quotient of the closed line integral of the vector about a small
path in a plane normal to that component desired and the area enclosed, as the
path shrinks to zero.
∮ � ∙ ⅆ𝑳
∇ × � = lim
∆�→0 ∆�
Program:
35 | P a g e
Output:
Conclusion:
Signature:
36 | P a g e
Practical: 10 Date:
Theory:
Stoke’s Theorem states that the integration of any vector around a closed path is
always equal to the integration of the curl of that vector throughout the surface
enclosed by that path.
∫ 𝛁 × 𝐅 ⋅ ⅆ𝐒 = ∮ 𝐅 ⋅ ⅆ𝐫
� 𝐶
Program:
%Limit declaration
Curlx = diff(Vz,y)-diff(Vy,z)
Curly = diff(Vx,z)-diff(Vz,x)
Curlz = diff(Vy,x)-diff(Vx,y)
%LHS
LHS=int(Curlz,x,x1,x2);
LHS=int(LHS,y,y1,y2)
%RHS
Line1=0;
Line2=0;
Line3=0;
Line4=0;
Vx=-Vx/y;
Line1=int(Vx,x,x1,x2)
Line2=int(Vy,y,y1,y2)
Line3=Line1
Line4=-Line2
RHS=Line1+Line2+Line3+Line4
38 | P a g e
Output:
39 | P a g e
Conclusion:
Signature:
40 | P a g e