Coursework: Electromagnetics
Module: CAN209 Advanced Electric Circuits and Electromagnetics
Components: Part 1 Calculation Problems 40%
Part 2 MATLAB Problems 60%
Grouping: 5 students per group
Release Date: Friday, 20th October 2023
Deadline: 00:01 2023/11/06 softcopy only, uploaded on Core
Group assignment (One submission per group)
INTRODUCTION
This coursework assessment aims to help develop your understanding and ability to handle problems relating to electro- and magneto-statics. The work is undertaken as a group of 5 members. There will be a single submission per group and this submission will be made by the named group leader only. The coursework has two parts. All groups should complete all of part 1. Each group will be assigned one of the problems in Part 2. Your group MUST complete the assigned problem. Ensure that your submission complies with the formatting requirement set out on page 2.
Groups have been either pre-requested or have been randomly allocated. Please check the details in the group list provided on CORE.
LEARNING OUTCOMES
Following the completion of this laboratory you should be able to:
C .Understand basic principles related to Electrostatics and Magnetostatics.
D .Understand the use of Maxwell's equations in differential and integral form for engineering applications, and the energy aspects of electromagnetic fields and understand the principle and properties of plane waves in free space.
LATE SUBMISSION POLICY
XJTLU policy is -5% per day up to a total of 25%. Work submitted more than five working days late will receive a grade of zero.
ACADEMIC INTEGRITY
The work submitted for the group assignment must be produced by your group.
Plagiarism, copying, collusion, dishonest use of data, or purchasing codes from others will be penalised. Penalties will follow those of the University’s Academic Integrity Policy on E-bridgeand can range from capped marks to expulsion from the university. Please contact the Module Leader if there is any confusion relating to academic integrity.
Formatting Requirements
You must fulfil each formatting requirement listed below. Failure to meet any TWO of the formatting requirements below will lead to a reduction in mark of 10 percentage points. A further 5% will be lost for each additional requirement not met. Formatting penalties will not reduce your mark below 40%.
1. The entire submitted document must be saved in Microsoft Office Word .docx.
2. The assignment must have a filename in this format: Group Number.docx. For example: Group 3,then filename: G03.docx.
Group 20,then filename: G20.docx
3. The main text of the assignment must use 1.5 line spacing.
4. The main text of the assignment must use Times New Roman font with the font size of 12 point.
5. The assignment must include page numbers.
6. Handwriting is not acceptable.
7. Use of screenshots from other sources (other than figures generated by MATLAB) is not acceptable.
8. You MUST use the cover page template provided on core. Fill it in, scan it, and then attach it as the first page of your submission.
9. Any citations should follow IEEE referencing style.
|
Part 1:Calculation Problems (40%)
Q1.Given that a magnetic field in a region is:
B=0.002x+0.003yT
(a)Find the magnetic flux through all five surfaces of the wedge shown in the figure below (25 marks).
(b)Determine the total flux through the wedge (5 marks).
Q2.A vector field is given by:
A=acos(bx)x+abysin(bx)y
Analyse the expression and explain if this field can be a magnetic field (show your working)(10 marks).
Part 2:MATLAB Problems (60%)
Please double-check the allocated proble ber bef re working on it in the group allocation file on core.
A)Dielectric-Dielectric Interface with no free charge
Two uniform dielectric media of permittivity ε1=E0 and ε2=E0Er(Er>1)form an XY-plane with the boundary at z=0.Medium 1 occupies the half space z>0 and medium 2 occupies the half space z<0.A point charge Qe is placed at (x,y,z)=(0,0,d)for d>0 as shown in the Figure on the right.The dotted cube depicted in this figure represents the area used for the simulation.Answer the following questions;there are 10 marks for each question.
1)Explain the meaning of boundary conditions and why they are important.
2)Are the boundary conditions derived from Maxwell's equations in integral or differential form?Do the boundary conditions supplement Maxwell's equations in integral or differential form,explain the reasons?
3)Determine the relationship between surface charge density and the permittivity of the dielectric media.
Copy and paste the code in Appendix A into the MATLAB Command Window.Set D=10,and Qe=1,then run the script.The center plot in Figure 1 demonstrates that the contour lines of the electric potential are continuous along the x-and y-coordinates. The E-field lines are shown in red (piecewise with an angular point on the boundary). Examine the data by looking at multiple cross-section images.These can be obtained by sequentially pressing any key on the keyboard.Once you have moved the plane to the end of the simulated block,the drawings in Figures 2 and 3 appear.These figures depict theelectrical potential with E-field lines and the same potential with D-field lines, respectively.Both are plotted at the cross-sectionx=0.
Now,answer the following questions:
4)Run the option d=1,Er=4 and look at Figure 2.Explain the reason(s)that the E-field lines bend counterclockwise as they cross the boundary when y<0.
5)Following 4),summarise the difference(s)between the E-and D-field lines’ structures in Figure 2 and Figure 3.Explain the reason why the D-fields do not experience the boundary.
6)Run the option d=-1,Er=4 and look at Figure 2.Explain the reason(s)that the E-field lines bend clockwise as they cross the boundary when y<0 and that there is no indication of bending at y=0.
B)Parallel Strip Model of Capacitor
A capacitor comprises two parallel conductive strips of equal width a and oppositely charged to potentials +Uo and -Uo,with Uo=100 V.They are of an infinitesimal thickness and placed a distance d=0.6a apart to observe the effect of fringe fields.The strips are placed into a relatively large metal box to make the numerical simulation manageable. Answer the following questions;there are 10 marks foreach question.
Stripsand Box extend to -0
Strips and Box extend to+m
1)Assume this is an ideal capacitor,determine the expressions of the electric flux density between the two conductive strips and the capacitance of this structure when filled by air.
2)Assume this is an ideal capacitor,determine the expressions of the electric flux density between the two conductive strips and the capacitance of this structure if the gap between the strips is fully filled with a dielectric material with permittivity
E=EOEr
Copy and paste the code in Appendix B into the MATLAB Command Window.Set a=5 then run the script.The first figure demonstrates the electric potential Ue as equipotential contour curves and the E-field as the red arrowed lines.The second figure is the contour plot of the E-field magnitude,while the third one is a 3D image of the potential distribution.
Now,answer the following questions:
3)Comment on the reason(s)for the E-field singularities(colossal increase in E-field) around the edges.
4)Evaluate the potential value along the symmetry line (black dotted)in the first figure and explain the reason(s).
5)Run the script. and set a=5,b=0.5,explain why the E-field distribution between the two parallel conductive strips is almost uniform.
6)What happens if we put an infinite conductive plate with an infinitesimal thickness between the two parallel conductive strips?You should mathematically explain and modify the code (or write your own code)to display the results.
Note that please provide your code with comments as an appendix in your submission(Code format:Arial with the font size 9,line spacing is single).
Appendix A: Code for A
clc; close all; clear; D=input('Enter the cube edge D <= 10 [m] = ');
d=input('Enter the distance d < D/2 between charge and dielectric boundary [m]: '); Q=input('Enter the charge value Qe [C] = ');
Eps=input('Enter the relative permittivity of bottom dielectric medium = '); N=1e2;
Eps0=8.854187817e-12; k=1/(4*pi*Eps0); [X,Y,Z]=meshgrid(linspace(-D/2,D/2,N)); r1=1./sqrt(X.^2+Y.^2+(Z-d).^2); r2=1./sqrt(X.^2+Y.^2+(Z+d).^2);
Q1=Q*(Eps-1)/(Eps+1); Q2=Q+Q1; U1=k*(Q./r1-Q1./r2); U2=(k/Eps)*Q2./r1;
for jj=1:size(Z,3); if Z(:,:,jj)>=0; U(:,:,jj)=U1(:,:,jj); else; U(:,:,jj)=U2(:,:,jj); end; end;
[Ex,Ey,Ez]=gradient(U,D/N); E=sqrt(Ex.^2+Ey.^2+Ez.^2); FF=U; Dx=Eps0*Ex; Dy=Eps0*Ey;
for jj=1:size(Z,3); if Z(:,:,jj)>=0; Dz(:,:,jj)=Eps0*Ez(:,:,jj);
else; Dz(:,:,jj)=Eps0*Eps*Ez(:,:,jj); end; end; f1=figure('units','normalized','outerposition',[0 0 1 1]); hold on; grid on; view(-60,29); axis square; A=[-1 1 -1 1 -1 1]*D/2; axis(A);
patch([1 -1 -1 1]*D/2,[1 1 -1 -1]*D/2,[0 0 0 0],'b'); alpha(0.05) plot3([0,0,0],[-D/2,D/2,0],[0,0,0],'LineWidth',2,'Color','k');
plot3([0,0,0],[0,0,0],[0,0,d],'LineWidth',2,'Color','m','LineStyle','-.');
plot3([-D/2,D/2,0],[0,0,0],[0,0,0],'LineWidth',2,'Color','k'); plot3([0,0,0],[-D/2,D/2,0],[0,0,0],'LineWidth',2,'Color','k');
[xs,ys,zs] = sphere; mesh(xs*2*d/D,ys*2*d/D,zs*2*d/D+d)
text(0,-0.2,d,['\bf','\leftarrow \itCharge'],'Color','r','FontSize',20)
vals = linspace(0,D/2,10); h1 = slice(X,Y,Z,FF,0,[],[]); set(h1,'FaceColor','interp','EdgeColor','none'); hs1=streamslice(X,Y,Z,Ex,Ey,Ez,0,[],[],2); set(hs1,'Color','b');
c = jet(128); c = c(end:-4:32,:); colormap(c); zlabel('\bfZ-axis'); ylabel('\bfY-axis'); xlabel('\bfX-axis'); for id = vals; delete(h1); delete(hs1); if id~=vals(1); delete(hp); end;
hp=plot3([id,id,id],[-D/2,D/2,0],[0,0,0],'LineWidth',2,'Color','k');
hs1=streamslice(X,Y,Z,Ex,Ey,Ez,id,[],[],2); set(hs1,'Color','b','LineWidth',1.5); h1 = slice(X,Y,Z,FF,id,[],[]); set(h1,'FaceColor','interp','EdgeColor','none')
disp('Press Any Key'); w = waitforbuttonpress; end;
f2=figure; movegui(f2,'west'); hold on; grid minor; view(-90,0);
hs1=streamslice(X,Y,Z,Ex,Ey,Ez,0,[],[],2); set(hs1,'Color','r','LineWidth',1.5);
h1= contourslice(X,Y,Z,FF,0,[],[],40); set(h1,'LineWidth',1.5); plot3([0,0,0],[-D/2,D/2,0],[0,0,0],'LineWidth',2,'Color','k');
title('\bfElrctric Potential and E-field Lines at Cross-section X = 0'); zlabel('\bfZ-axis'); ylabel('\bfY-axis'); axis tight
f3=figure; movegui(f3,'east'); hold on; grid minor; view(-90,0);
hs2=streamslice(X,Y,Z,Dx,Dy,Dz,0,[],[],2); set(hs2,'Color','r','LineWidth',1.5); h2= contourslice(X,Y,Z,FF,0,[],[],40); set(h2,'LineWidth',1.5,'LineStyle','-');
plot3([0,0,0],[-D/2,D/2,0],[0,0,0],'LineWidth',2,'Color','k');
title('\bfElrctric Potential and D-field Lines at Cross-section X = 0') zlabel('\bfZ-axis'); ylabel('\bfY-axis'); axis tight
Appendix B: Code for B
clc; close all; clear;
a=input('Input the strip width a<=5m: '); d=input('Input the strip separation d
V = zeros(Nx,Ny); T = 0; B = 0; L = 0; R = 0; V(1,:) = L; V(Nx,:) = R; V(:,1) = B; V(:,Ny) = T; V(1,1) = 0.5*(V(1,2)+V(2,1)); V(Nx,1) = 0.5*(V(Nx-1,1)+V(Nx,2));
V(1,Ny) = 0.5*(V(1,Ny-1)+V(2,Ny)); V(Nx,Ny) = 0.5*(V(Nx,Ny-1)+V(Nx-1,Ny)); l_p = 51; lp = floor(l_p/2);
p_p = ceil(l_p*h/2); pp1 = mpx+p_p; pp2 = mpx-p_p; for z = 1:Ni; for i=2:Nx-1; for j=2:Ny-1; V(pp1,mpy- lp:mpy+lp) = 100; V(pp2,mpy-lp:mpy+lp) = -100;
V(i,j)=0.25*(V(i+1,j)+V(i-1,j)+V(i,j+1)+V(i,j-1)); end; end; end
V = V'; [Ex,Ey]=gradient(V); Ex=-Ex; Ey=-Ey; E=sqrt(Ex.^2+Ey.^2); x=(1:Nx)-mpx; y=(1:Ny)-mpy;
% Display Potential and E-force Lines
figure('units','normalized','outerposition',[0 0 1 1]);grid minor; hold on; hLines = streamslice(x,y,Ex,Ey,4);set(hLines,'Color','r','LineWidth',1); contour(x,y,V,60); h1=colorbar('southoutside','fontsize',12);
xlabel(h1,'Electric potential Ue [V]','FontWeight','Bold','FontSize',20);
title('Electric Potential Ue(x,y)and E-force Lines','fontsize',14); xlabel('x-axis','fontsize',14); ylabel('y- axis','fontsize',14);
rectangle('Position',[-p_p-0.5,-l_p/2,1,l_p],'FaceColor','k')
rectangle('Position',[p_p,-l_p/2,1,l_p],'FaceColor','k'); plot(0,-(Ny-1)/2:1:(Ny-1)/2,'*k');
% Contour Display of E-field
f3=figure(2); contour(x,y,E,120); g2=colorbar('fontsize',12);
ylabel(g2,'E-field Intensity [V/m]','FontWeight','Bold','FontSize',15); xlabel('x-axis','fontsize',14); ylabel('y-axis','fontsize',14);
h2=title('Electric field distribution, E (x,y) in V/m','fontsize',14); set(h2,'fontsize',14); movegui(f3,[100,100]); grid minor
% Contour Display of electric potential
figure(3); hh=meshc(x,y,V); axis([-2*lp,2*lp,-2*lp,2*lp]); g3=colorbar('southoutside','fontsize',12); xlabel(g3,'Electric Potential Ue [V]','FontWeight','Bold','FontSize',15);
xlabel('x-axis','fontsize',14); ylabel('y-axis','fontsize',14); zlabel('Electric Potential [V]','fontsize',14) h3=title('Electric Potential Distribution, V(x,y) [V]'); set(h3,'fontsize',14); view(-13,32); grid minor set(hh(2),'ShowText','on','LineWidth',1);
vert = [0 -50 -100;0 50 -100;0 50 -100;0 -50 -100; 0 -50 100;0 50 100;0 50 100;0 -50 100]; fac = [1 2 6 5;1 2 6 5;1 2 6 5;1 2 6 5;1 2 6 5;1 2 6 5];
ph=patch('Vertices',vert,'Faces',fac,'FaceVertexCData',hsv(6),'FaceColor','flat');alpha(ph,0.2)