Electric current; the conservation of charge
We consider first how we can understand the magnetic forces on wires carrying electric currents. In order to do this, we define what is meant by the current density. Electric currents are electrons or other charges in motion with a net drift or flow. We can represent the charge flow by a vector which gives the amount of charge passing per unit area and per unit time through a surface element at right angles to the flow (just as we did for the case of heat flow). We call this the current density and represent it by the vector $\FLPj$. It is directed along the motion of the charges. If we take a small area $\Delta S$ at a given place in the material, the amount of charge flowing across that area in a unit time is \begin{equation} \label{Eq:II:13:2} \FLPj\cdot\FLPn\,\Delta S, \end{equation}  where $\FLPn$ is the unit vector normal to $\Delta S$. The current density is related to the average flow velocity of the charges. Suppose that we have a distribution of charges whose average motion is a drift with the velocity $\FLPv$. As this distribution passes over a surface element $\Delta S$, the charge $\Delta q$ passing through the surface element in a time $\Delta t$ is equal to the charge contained in a parallelepiped whose base is $\Delta S$ and whose height is $v\,\Delta t$, as shown in Fig. 13–2. The volume of the parallelepiped is the projection of $\Delta S$ at right angles to $\FLPv$ times $v\,\Delta t$, which when multiplied by the charge density $\rho$ will give $\Delta q$. Thus \begin{equation*} \Delta q=\rho\FLPv\cdot\FLPn\,\Delta S\,\Delta t. \end{equation*}  The charge per unit time is then $\rho\FLPv\cdot\FLPn\,\Delta S$, from which we get \begin{equation} \label{Eq:II:13:3} \FLPj=\rho\FLPv. \end{equation}  If the charge distribution consists of individual charges, say electrons, each with the charge $q$ and moving with the mean velocity $\FLPv$, then the current density is \begin{equation} \label{Eq:II:13:4} \FLPj=Nq\FLPv. \end{equation}  where $N$ is the number of charges per unit volume. The total charge passing per unit time through any surface $S$ is called the electric current, $I$. It is equal to the integral of the normal component of the flow through all of the elements of the surface: \begin{equation} \label{Eq:II:13:5} I=\int_S\FLPj\cdot\FLPn\,dS \end{equation}  (see Fig. 13–3). The current $I$ out of a closed surface $S$ represents the rate at which charge leaves the volume $V$ enclosed by $S$. One of the basic laws of physics is that electric charge is indestructible; it is never lost or created. Electric charges can move from place to place but never appear from nowhere. We say that charge is conserved. If there is a net current out of a closed surface, the amount of charge inside must decrease by the corresponding amount (Fig. 13–4). We can, therefore, write the law of the conservation of charge as \begin{equation} \label{Eq:II:13:6} \underset{\substack{\text{any closed}\\\text{surface}}}{\int} \FLPj\cdot\FLPn\,dS=-\ddt{}{t}(Q_{\text{inside}}). \end{equation}  The charge inside can be written as a volume integral of the charge density: \begin{equation} \label{Eq:II:13:7} Q_{\text{inside}}= \underset{\substack{\text{$V$}\\\text{inside $S$}}}{\int} \rho\,dV. \end{equation}  If we apply (13.6) to a small volume $\Delta V$, we know that the left-hand integral is $\FLPdiv{\FLPj}\,\Delta V$. The charge inside is $\rho\,\Delta V$, so the conservation of charge can also be written as \begin{equation} \label{Eq:II:13:8} \FLPdiv{\FLPj}=-\ddp{\rho}{t} \end{equation}  (Gauss’ mathematics once again!).