RL circuit (source code)

= RL circuit
{c}
{title2=$L\,dI/dt+RI=V$}
{wiki}

An <RL circuit> combines <electrical resistance> $R$ and <self-inductance> $L$. In the series model, the same <electric current> $I$ flows through both components. An ideal <battery> maintains terminal <electric potential difference> $V$; the drops in the direction of positive <electric current> obey <Ohm's law> and the <inductor> relation:
$$
v_R=RI,\qquad v_L=L\frac{dI}{dt},\qquad
V=v_R+v_L.
$$
This is <Kirchhoff's voltage law> with the <inductor>'s terminal drop, rather than its oppositely signed induced <electromotive force>. For constant $R>0$, $L>0$, and $V$, the <first-order linear differential equation> has solution
$$
I(t)=I_\infty+(I(0)-I_\infty)e^{-t/\tau},\qquad
I_\infty=\frac VR,\qquad \tau=\frac LR.
$$
The <time constant> $\tau$ measures <exponential decay> of the difference from the final <electric current>. https://openstax.org/books/university-physics-volume-2/pages/14-4-rl-circuits[OpenStax University Physics 2, §14.4: RL circuits]{ref}.

For a stipulated example, take <electrical resistance> $R=2\,\Omega$, <self-inductance> $L=0.5\,\mathrm H$, terminal <electric potential difference> $V=6\,\mathrm V$, and initial <electric current> $I(0)=0$. Then
$$
\tau=0.25\,\mathrm s,\qquad I_\infty=3\,\mathrm A,
\qquad I(t)=(3\,\mathrm A)(1-e^{-t/(0.25\,\mathrm s)}).
$$
With $t$ measured numerically in seconds, this is $I(t)=3(1-e^{-4t})$ in amperes. At one <time constant>,
$$
I(\tau)=3(1-e^{-1})\,\mathrm A\approx1.89636\,\mathrm A,
$$
and the terminal <electric potential difference> drops are
$$
v_R(\tau)=6(1-e^{-1})\,\mathrm V\approx3.79272\,\mathrm V,
\qquad v_L(\tau)=6e^{-1}\,\mathrm V\approx2.20728\,\mathrm V.
$$
Their sum is exactly $6\,\mathrm V$. At $t=0^+$, the <inductor> takes the entire terminal <electric potential difference> while the <electric current> is still zero. At steady <electric current>, the <inductor>'s terminal drop is zero and the entire drop is across the <electrical resistance>.

\Image[/rl-current-and-voltage.png]
{title=<Electric current> and terminal <electric potential difference> drops during an <RL circuit> response}
{description=The <battery> maintains $6\,\mathrm V$ across <electrical resistance> $2\,\Omega$ and <self-inductance> $0.5\,\mathrm H$ in series. The dashed vertical line marks <time constant> $0.25\,\mathrm s$; $v_L$ uses the positive terminal-drop convention.}

The final <magnetic energy> stored by the <inductor> is $U_\infty=LI_\infty^2/2=2.25\,\mathrm J$. At one <time constant>, the <electric current> has reached about $63.21\%$ of its final value, but its <magnetic energy> has reached only about $39.96\%$:
$$
U(\tau)=\frac12L I(\tau)^2
=2.25(1-e^{-1})^2\,\mathrm J\approx0.899047\,\mathrm J.
$$
This difference follows from the square of <electric current> in the <inductor>'s <magnetic energy>.

For release, take $t=0$ at the start of a separate experiment with initial <electric current> $3\,\mathrm A$. Remove the <battery> from the model while maintaining a closed path through the same <electrical resistance> and <inductor>. Then
$$
L\frac{dI}{dt}+RI=0,\qquad
I(t)=(3\,\mathrm A)e^{-t/(0.25\,\mathrm s)}.
$$
Now $v_L=-v_R$: the induced <electromotive force> supports the continuing positive <electric current> as its magnitude decreases. This closed-loop model describes <exponential decay>, not opening the sole path and imposing an instantaneous jump to zero <electric current>. The <inductor>'s <magnetic energy> and the <power> of <Joule heating> are
$$
U(t)=(2.25\,\mathrm J)e^{-2t/\tau},\qquad
P_R(t)=RI(t)^2=(18\,\mathrm W)e^{-2t/\tau},\qquad
\frac{dU}{dt}=-P_R.
$$
Their <time constant> is $\tau/2=0.125\,\mathrm s$. The total <energy> dissipated by <Joule heating> is exactly the initial <magnetic energy>:
$$
\int_0^\infty P_R(t)\,dt
=(18\,\mathrm W)\frac{\tau}{2}=2.25\,\mathrm J.
$$
The second diagram in <inductor> shows this <energy> transfer. A finite closed path lets us predict both how long the <electric current> persists and how much <energy> becomes heat. https://openstax.org/books/university-physics-volume-2/pages/14-4-rl-circuits[OpenStax University Physics 2, §14.4: decay in a closed RL loop]{ref}.