网格分析 LaTeX circuitikz

网格分析 LaTeX circuitikz

因此,我尝试创建一个非常简单的电路。这是我的代码:

\documentclass[border=10pt,multi,tikz]{standalone}
\usepackage{circuitikz,siunitx}% cfr: these seem necessary but what else?
\standaloneenv{circuitikz}
\begin{document}
\ctikzset{bipoles/resistor/height=0.15}
\ctikzset{bipoles/resistor/width=0.4}
\begin{circuitikz}
  \draw (0,0)
  to[I,i=$1 \mA$,] (0,5) % The voltage source
  to[short] (0,5)
  to[short] (4,5) % The resistor
  to[R=$ 1\kilo\ohm$,] (4,0) % The resistor
  to[short] (0,0);
  \draw (4,5)
  to[R=$1\kilo\ohm$] (8,5) % The resistor
  %to[short] (8,5)
  to[R=$10 \kilo\ohm$] (8,0) % The voltage source
  to[short] (0,0);
  \draw (8,5)
  to[R=$1 \kilo\ohm$] (14,5) % The voltage source
  to[R=$1 \kilo\ohm $]  (14,3)
  to[cV=$A V_{in} $]  (14,0)
  to[short] (0,0);
  \draw (10,5)
  to[short] (16,5) node[anchor=west]{A}
  to [open,o-o] (16,0)node[anchor=west]{B}
  to[short] (0,0);
  \draw [red,latex-] (2,2) node[above,color=red]{$i_2$} arc(-90:145:5mm)
\end{circuitikz}
\end{document}

我所要做的就是能够i_1, i_2,i_3在画出的细圆圈内写字,以表示流经整个网格的电流。

当我尝试放置圆形箭头时,出现错误。

答案1

我花了很多时间编译你的代码,所以现在我编译完代码后仍然不明白这个问题,这也许是意料之中的事。我不知道圆怎么会“细”。我以为你可能指的是椭圆,但似乎没有椭圆。

因此,也许您想将i_1和添加i_3到包含的圆圈中i_2。我想知道您是否想要额外的圆圈,但那没有意义。如果您知道如何制作一个,显然可以再制作两个。所以我只能认为问题是在同一个圆圈上添加额外的标签。

像这样:

more labels

\documentclass[border=10pt,multi,tikz]{standalone}
\usepackage[siunitx,european]{circuitikz}
\usetikzlibrary{arrows.meta}
\standaloneenv{circuitikz}
\begin{document}
\ctikzset{bipoles/resistor/height=0.15}
\ctikzset{bipoles/resistor/width=0.4}
\begin{circuitikz}[european currents]
  \draw (0,0)
  to [I, i=1<\milli\ampere>] (0,5) % The voltage source
  to [short] (0,5)
  to [short] (4,5) % The resistor
  to [R=1<\kilo\ohm>] (4,0) % The resistor
  to [short] (0,0)
  (4,5)
  to [R=1<\kilo\ohm>] (8,5) % The resistor
  to [R=10<\kilo\ohm>] (8,0) % The voltage source
  to [short] (0,0)
  (8,5)
  to [R=1<\kilo\ohm>] (14,5) % The voltage source
  to [R=1<\kilo\ohm>]  (14,3)
  to [cV=$A V_{in} $]  (14,0)
  to [ short] (0,0)
  (14,5)
  to [short] (16,5) node [anchor=west] {A}
  to [open, o-o] (16,0) node [anchor=west] {B}
  to [short] (0,0);
  \draw [red, Latex-] (2,2) node [above] {$i_3$} arc (-90:145:5mm) node [midway, left] {$i_2$} node [near end, below left] {$i_1$};
\end{circuitikz}
\end{document}

答案2

\documentclass{article}
     \usepackage{graphicx}
     \usepackage[american]{circuitikz}
      \usetikzlibrary{arrows.meta}
       \usepackage{amsmath}
       \usepackage{amsthm}
         \usepackage{amsfonts}
   \usepackage[free-standing-units]{siunitx}

    \begin{document}
   \begin{figure}
 \begin{center}
 \ctikzset{bipoles/resistor/height=0.15}
\ctikzset{bipoles/resistor/width=0.4}
\begin{circuitikz}[scale=0.7]
 \draw (0,0)
      to[I,i=$1 \mA$,] (0,5) 
      to[short] (0,5)
      to[short] (4,5)     
      to[R=$ 100\ohm$,] (4,0) 
      to[short] (0,0);          
\draw (4,5)          
     to[R=$1\kilo\ohm$] (8,5) 
     to[R=$1 \kilo\ohm$] (8,0)
     to[short] (0,0);       
  \draw (8,5) 
      to[R=$10 \kilo\ohm$] (14,5)
      to[R=$1 \kilo\ohm $]  (14,3)         
      to[cV=$A V_{i} $]  (14,0)
      to[short] (0,0);     
 \draw (10,5)         
     to[short] (16,5) node[anchor=west]{A}
     to [open,o-o] (16,0)node[anchor=west]{B}
     to[short] (0,0);
\draw [red, Latex-] (2,2) arc (-90:175:5mm) node [midway, below left]                {$i_1$};
\draw [red, Latex-] (6.3,2) arc (-90:175:5mm) node [midway, below left]         {$i_2$}; 
 \draw [red, Latex-] (11,2) arc (-90:175:5mm) node [midway, below left]             {$i_3$};
\end{circuitikz}
\label{1.1}

\end{中心} \end{图} \end{文档}

相关内容