\documentclass[]{report}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%ovo je zanovioblik footnote-a ( vidi Kopka93 strana 156 )

% ovo je predefinisanjedatumazacirilicu( vidi Kopka93 strana 175 )

%

% TIME OF DAY

%

\newcount\hh

\newcount\mm

\mm=\time

\hh=\time

\divide\hh by 60

\divide\mm by 60

\multiply\mm by 60

\mm=-\mm

\advance\mm by \time

\def\hhmm{\number\hh:\ifnum\mm<10{}0\fi\number\mm}

\setlength{\textwidth}{17.5cm}

\setlength{\textheight}{22.5cm}

\setlength{\hoffset}{-2.5cm}

\setlength{\voffset}{-1.5cm}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%Staviovo pre \begin{document}

%draft special command for postscript

%\special{!userdict begin

%/bop-hook{

%gsave

%150 360 translate % start position

%45 rotate % orientation

%/Times-Roman findfont % font

%20 scalefont % scaling of font

%setfont

%0 0 moveto

%0.7 setgray % gray level ( 1 -> white ; 0 black )

%(DRAFT Milica Markovic Summer 2004) % text you want to see

%true charpath

%show % or: true charpath for hollow letters

%true charpath

%stroke grestore}def end}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\input psfig.sty

\begin{document}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\noindent

%\rule[.5mm]{\textwidth}{.5mm}

%\vspace*{0.5cm}

\centerline{\Large{EEE161 Applied Electromagnetics Laboratory 6}}

\vspace{0.3cm}

\noindent

\rule[.5mm]{\textwidth}{.5mm}

\noindent

\centerline{Instructor: Dr. Milica Markovi{\'c}} \\

\centerline{Office: Riverside Hall 3028} \\

\centerline{Email: } \\

\centerline{Web:

%\vspace*{0.2cm}

\noindent

\rule[.5mm]{\textwidth}{.5mm}

\vspace*{0.2cm}

\begin{description}

\item{\bf{Part 1}}

Solve the following problem on paper. Do not attempt to solve the integral. Find the potenital due to a ring of charge everywhere around the ring. The ring is charged with a line charge density of $\rho_l$\,nC/m.

\item{\bf{Part 2}}

Use the code below to plot the potential of a ring of charge

\begin{verbatim}

clearall

%Specify the extents of x,y,z axes

rad=-1.5:0.1:1.5

%Make X,Y,Z matrices

[X Y Z]=meshgrid(rad,rad,rad)

%Define constants epsilon, Q. They are obviously not physical. They are set

%to small constants so that we get smaller numbers.

eps=1

Q=1

const=Q/(2*pi*eps)

%Set the initial potential value to zero. Initialize V.

V=0

%Here we find the potential at all X,Y,Z points defined previously from

%each of the "unit" charges on the ring. The th variable starts from 0.1

%to avoid the infinite value of V at the point r=1,theta=0.

forth=0.1:pi/20:2*pi

t=const./sqrt((X-cos(th)).^2 + (Y-sin(th)).^2 + (Z).^2)

V= V+t;

end

%Plot the volume distribution of potential at planes x=0, y=0, z=0

slice(X,Y,Z,V,[0],[0],[0])

%Keep the same figure

holdon;

%Plot contours of potential at planes x=0, y=0, z=0

h=contourslice(X,Y,Z,V,[0],[0],[0])

set(h,'EdgeColor','k','LineWidth',1.5)

\end{verbatim}

\item{\bf{Part 3}}

Plot several equipotential surfaces using the code below.

\begin{verbatim}

clearall

%Specify the extents of x,y,z axes

rad=-1.5:0.1:1.5

%Make X,Y,Z matrices

[X Y Z]=meshgrid(rad,rad,rad)

%Define constants epsilon, Q. They are obviously not physical. They are set

%to small constants so that we get smaller numbers.

eps=1

Q=1

const=Q/(2*pi*eps)

%Set the initial potential value to zero. Initialize V.

V=0

%Here we find the potential at all X,Y,Z points defined previously from

%each of the "unit" charges on the ring. The th variable starts from 0.1

%to avoid the infinite value of V at the point r=1,theta=0.

forth=0.1:pi/20:2*pi

t=const./sqrt((X-cos(th)).^2 + (Y-sin(th)).^2 + (Z).^2)

V= V+t;

end

%Plot the volume distribution of potential at planes x=0, y=0, z=0

p = patch(isosurface(X,Y,Z,V,7));

isonormals(X,Y,Z,V,p)

set(p,'FaceColor','red','EdgeColor','none');

daspect([1 1 1])

view(3); axis tight

camlight

lightinggouraud

\end{verbatim}

\item{\bf{Part 4}}

Solve the following problem on paper. Do not attempt to solve the integral. Find the electric field due to a ring of charge everywhere around the ring. The ring is charged with a line charge density of $\rho_l$\,nC/m.

\item{\bf{Part 5}}

Write a code to plot the electric field due to ring with a line charge distribution $\rho_l$. To solve this problem replace the integral with a finite sum. You can modify the example for the potential to find the electric field. Remember that the electric field is the negative gradient of the potential.

\begin{figure}[htbp]

\begin{center}

\strut\psfig{figure=../fig/chargedistribution.ps,width=8cm} \\

\end{center}

\caption{Part 1}

\label{meshgrid}

\end{figure}

\item{\bf{Conclusion}}

Solve {\bf all of the above examples by hand} and {\bf compare} the results with the ones you found during the lab. In addition, for each of the problems, write what you have learned. Do not write an essay, just in a few sentences write what you have done in each problem, and specifically what you have learned from the work done.

\item{\bf{Due Date}}

Submit the printout of the lab work and the conclusion by NEXT FRIDAY. LAB IS DUE next Friday in the lab. No late labs.

\end{description}

\end{document}

\bye