Kirchhoff's Laws Circuit Solver
Build a circuit from junctions and branches, let the tool write Kirchhoff's current and voltage equations, and see every branch current, its direction and each junction voltage.
ทำงานในเบราว์เซอร์ของคุณ ไฟล์ไม่ออกจากอุปกรณ์ ดูวิธีตรวจสอบ
…
วิธีทำ
- 1Start from an example
Load one of the examples or press + Junction and + Branch to build your own circuit.
- 2Enter each branch
In the table choose From and To junctions, type the resistance and the EMF pushing from From to To.
- 3Tidy the drawing
Drag the junction circles on the diagram until the layout matches your textbook figure.
- 4Read the currents
Check the current column and the red arrows, which show the real direction of each current.
- 5Study the equations
Open Equations and matrix steps to see every KCL and KVL equation and each elimination step.
- 6Save and practise
Save circuits by name, print the solution, and try generated two-battery problems in Practice.
เกี่ยวกับเครื่องมือนี้
Circuits with more than one battery, or resistors that are neither in series nor in parallel, cannot be simplified step by step. They need Kirchhoff's two rules: the current flowing into a junction equals the current flowing out, and the voltage changes around any closed loop add up to zero. Setting up those equations is where students lose marks, through sign errors, a missing loop or one equation too many. This solver does the bookkeeping. You describe the circuit as junctions joined by branches, each with a resistance and an optional battery, and it writes the independent junction and loop equations, solves them by Gauss-Jordan elimination with every row operation shown, and draws the real current directions back onto your diagram.
How a circuit is described
Each branch runs between two junctions and has a resistance R in ohms and an optional EMF E in volts. The EMF is entered as the voltage that pushes current from the branch's first junction towards its second, so a 12 V battery whose positive terminal faces junction A is entered as a branch from B to A with E = 12. A battery's internal resistance goes into the same branch's R. The current I in each branch is counted positive from the first junction to the second. If the answer comes out negative, the current really flows the other way, and the diagram arrow turns round.
The equations it writes
With J junctions and B branches there are J − 1 independent junction (KCL) equations; the last junction's equation would repeat information. The tool picks the ground junction as the one it leaves out. It then finds B − J + 1 independent loops by building a spanning tree: each branch not in the tree closes exactly one loop. For each loop it adds R·I for every branch, with a plus sign when the loop runs along the branch direction and a minus sign against it, and sets the total equal to the sum of the EMFs met in the same way. This is the branch-current method of introductory physics.
Solving and checking
The equations form a square system that the tool solves by Gauss-Jordan elimination with partial pivoting. The Equations tab shows the augmented matrix after every swap, scaling and subtraction, so you can compare it with your own working. Junction voltages are then found from V(from) − V(to) = R·I − E along each branch, with the ground junction at 0 V. The total power dissipated in the resistors is shown as a check: it must equal the power delivered by the batteries.
Worked example
Load the example with two sources. A 12 V battery with 2 Ω and a 6 V battery with 3 Ω are connected in parallel across a 4 Ω load, positive terminals joined at A. There are two junctions and three branches, so one KCL equation and two KVL loops. The solution gives V(A) = 96 ÷ 13 ≈ 7.385 V. The load current is 7.385 ÷ 4 = 1.846 A, the 12 V battery supplies (12 − 7.385) ÷ 2 = 2.308 A, and the 6 V battery is being charged: its branch current is (6 − 7.385) ÷ 3 = −0.462 A, so the arrow points back into it. 2.308 = 1.846 + 0.462 confirms Kirchhoff's current law.
Limits
The solver handles resistors and ideal voltage sources in DC circuits. It does not model current sources, capacitors, inductors, diodes or AC phasors, and a loop made only of ideal batteries with no resistance has no unique solution. Results are for study and checking homework, not for designing real circuits, where component tolerances, heating and wire resistance matter.
ตัวอย่างพร้อมวิธีทำ
12 V/2 Ω and 6 V/3 Ω in parallel across 4 Ω: V(A) = 96/13 ≈ 7.385 V, I(load) ≈ 1.846 A, 6 V battery charged at 0.462 A.
สรุปสั้น ๆ
- หมวดหมู่: คณิตศาสตร์และวิทยาศาสตร์
- ทำงานในเบราว์เซอร์ ไม่ต้องสมัคร ไม่ต้องอัปโหลด
- ข้อมูลที่คุณกรอกอยู่บนอุปกรณ์ของคุณ
- มีภาษาอังกฤษ
- ตรวจสอบเนื้อหาล่าสุด:
- แหล่งข้อมูลทางการ: OpenStax University Physics Volume 2, section 10.3: Kirchhoff's rules
คำถามที่พบบ่อย
How many equations do I need?
One for every unknown current. J junctions give J − 1 junction equations and the rest come from B − J + 1 independent loops, which is exactly B equations in total.
What if I choose the wrong current direction?
It does not matter. Pick any direction for each branch; a negative answer simply means the real current flows the opposite way.
How do I enter a battery?
Put its voltage in the EMF column of its branch, oriented so that it pushes current from the From junction to the To junction. Swap From and To if your battery faces the other way.
Why does the tool say there is no unique solution?
Usually part of the circuit is not connected, a junction has no branches, or a loop contains only batteries with zero resistance.
Which junction is ground?
You choose it in the Ground menu. Voltages are measured relative to it, and its junction equation is the one left out.
Can I check my own handwritten equations?
Yes. The Equations tab lists each KCL and KVL equation in words and symbols, and the matrix steps show the elimination so you can find where your working differs.
