3

I would like to draw an electric circuit diagram that looks like this:

Circuit diagram to draw

I am suffering from those circular flows $i_1(t),i_2(t)$ (I drew them in red to point out; they actually don't need to be colored).

I have so far coded:

\begin{circuitikz}
        \ctikzset{inductor=american}
        \draw(0,0)to[open,v^>=$v_i(t)$,o-o](0,2);
        \draw(0,2)to[short,o-*,R=$R_1$](2,2)to[short,*-*,L=$L$](2,0);
        \draw(2,2)to[short,*-*,R=$R_2$](4,2)to[C,*-,l_=$C$,v^<=$v_o(t)$](4,0);
        \draw(0,0)to[short,-*](2,0)to[short,*-](4,0);
        % FIXME the following line and so far
        \draw(1,1.5)arc[short,start angle=90,end angle=-90,I=$i_1(t)$,radius=0.5];
\end{circuitikz}

, which outputs:

What I have drawn

1 Answers1

5
\documentclass[border=3.1314592mm]{standalone}
\usepackage{circuitikz}

\begin{document}
    \begin{circuitikz}
    \ctikzset{inductor=american}
\draw   (0,0)   to [open,v^>=$v_i(t)$]  ++ (0,2) 
                to [R=$R_1$,o-*]        ++ (2,0) coordinate (L)
                to [R=$R_2$,*-*]        ++ (3,0)
                to [C,a=$C$,v^<=$v_o(t)$] ++ (0,-2)
                to [short, *-o] (0,0)
        (L)     to [L=$L$,-*]           ++ (0,-2);
%
% now is FIXED  :-)
\draw[->]   (0.8,1.5) arc(110:-110:5mm) node[midway, left, font=\footnotesize] {$i_1(t)$};
\draw[->]   (3.3,1.5) arc(110:-110:5mm) node[midway, left, font=\footnotesize] {$i_2(t)$};
    \end{circuitikz}
\end{document}

enter image description here

or (to my opinion better):

enter image description here

where MWE is

\documentclass[border=3.1314592mm]{standalone}
\usepackage{circuitikz}

\begin{document} \begin{circuitikz} \ctikzset{inductor=american, bipoles/capacitor/height=0.4, bipoles/capacitor/width=0.1 } \draw (0,0) to [open,v^>=$v_i(t)$] ++ (0,2) to [R=$R_1$,o-*] ++ (2,0) coordinate (L) to [R=$R_2$,*- ] ++ (3,0) to [C,a=$C$,v^<=$v_o(t)$] ++ (0,-2) to [short, -o] (0,0) (L) to [L=$L$,-*] ++ (0,-2); % % now is FIXED :-) \draw[->] (0.8,1.5) arc(110:-110:5mm) node[midway, left, font=\footnotesize] {$i_1(t)$}; \draw[->] (3.7,0.5) arc(290: 70:5mm) node[midway, right,font=\footnotesize] {$i_2(t)$}; \end{circuitikz} \end{document}

Zarko
  • 296,517