created at June 11, 2021

# Mesh current method

The Mesh Current Method is used to calculate electric circuits with more than one loop. Calculating mesh means to find the currents in all mesh branches. Both Kirchhoff's laws are the basis for that method.

The First Kirchhoff's law says that the total algebraic sum of all branch currents, which are connected to the node, is zero. Some currents are flowing to the node, some are leaving the node, but the total is zero, because the node is not able to accumulate electric charge.

$I_{1} - I_{2} - I_{3} = 0$

The Second Kirchhoff's law says that the total sum of voltages on resistive elements within a loop is equal to the sum of all voltage sources within that loop.

$\sum_{k} R_{k}\cdot I_{k} = \sum_{n} E_{n}$

Consider the following mesh, which we need to calculate:

The total number of nodes: N = 2. The total number of independent node equations we can write is: n = N - 1 = 1. The number of branches (and also unknown currents) is 3. The number of equations we can compose according to Mesh Current Method is: m = M - n = 3 - 1 = 2. In other words, the mesh contains two loops, and we can compose two equations in total.

Next we choose the loops in the mesh, there is some virtual current flowing within each loop. We need to consider some direction for that virtual currents (IA and IB). Direction is not important at this point, we just need to choose one. Then we write the voltage balance equations for each loop, based on the Kirchhoff's second law. The obtained equation system is then resolved around the unknown virtual currents (IA and IB). The real currents (I1, I2, I3) can be then expressed through the virtual ones.

For each loop, the sum of all resistive element voltages equals the sum of voltage sources. If the voltage source direction source is opposite to the chosen loop direction - it enters the equation with "minus" sign.

Let's compose the equations:

$\begin{cases} I_{A}\cdot R_{01} + I_{A}\cdot R_{1} + I_{A}\cdot R_{02} - I_{B}\cdot R_{02} = E_{1} + E_{2}\\ I_{B}\cdot R_{02} - I_{A}\cdot R_{02} + I_{B}\cdot R_{03} + I_{B}\cdot R_{3} = -E_{2} - E_{3} \end{cases}$

There are two virtual currents flowing through R02 - hence they both are present in the equations. Let's rewrite the equations in a bit different way, so that's easier to solve them:

$\begin{cases} I_{A}\cdot (R_{01} + R_{1} + R_{02}) - I_{B}\cdot R_{02} = E_{1} + E_{2}\\ I_{A}\cdot R_{02} - I_{B}\cdot (R_{02} + R_{03} + R_{3}) = E_{2} + E_{3} \end{cases}$

This is the system of linear algebraic equations with two unknowns IA and IB. After we solve it, the real currents can be found as:

$I_{1} = I_{A}$
$I_{2} = I_{A} - I_{B}$
$I_{3} = I_{B}$

If some current has a negative value in the end, this only means that the real current flows in direction opposite to the chosen one.