## 2 Modeling Grounding Electrodes with Internal Resistance: Backgrounds
In order to properly implement the boundary conditions (2), it is necessary to convert the first term on the right hand of (7) to an integral form so that the entire expression is in an integral form. The integral forms of Lipschitz (3), allow such a conversion to be carried out [14],  
\[\frac{1}{\left|\overrightarrow{r}-\overrightarrow{r}_{p}\right|}=\int\limits _{0}^{\infty}{e^{-\lambda\cdot\left|z-z_{p}\right|}J_{0}(r\lambda)d\lambda} \tag{3}\]  
Thus, the boundary conditions (2) lead to a linear system in the unknowns \(f_{ij}\) and \(g_{ij}\) that is solved by symbolic calculus using the software Wolfram Mathematica. The point current source potentials (1), serve as the basis for calculating the grounding resistance of any electrode, particularly a rod driven into the soil. If it is a perfectly conductive rod, the potential can be calculated using the superposition law and the grounding resistance, as well as the step and touch potentials can be obtained. Indeed, the expression (1) stands for the potential generated by a single point current source. When an extended electrode leaking a fault current to the ground is considered, expressions like (1) can be used under some conditions imposed on the electrodes. The electrodes are assumed as composed by thin wire pieces assembled to form the entire electrode. Thus, each thin wire could be considered as a distribution of point current sources located in the axis. The potential at point \(\overrightarrow{r}\) of the layer \(j\) generated by a thin wire of length L located in the layer \(i\), is given by  
\[ \begin{split}&\phi_{ij}(\overrightarrow{r})=\int\limits_{L}{ \frac{\rho_{i}\cdot\left(\overrightarrow{r}_{p}\right)}{4\pi\left| \overrightarrow{r}-\overrightarrow{r}_{p}\right|}dlp}\cdot\delta_{ij}+\\ &+\int\limits_{L}{\frac{\rho_{i}\cdot\left(\overrightarrow{r}_{p} \right)}{4\pi\left|\int\limits_{0}^{\infty}{(\hat{f}_{ij}(\lambda)e^{-\lambda (z-z_{p})}+\hat{g}_{ij}(\lambda)e^{\lambda(z-z_{p})})J_{0}(\lambda r)d\lambda }\right|dl_{P}}}\end{split}  \tag{4}\]  
where \(\mu(\overrightarrow{r}_{p})\) stands for the point current sources density along the thin wire axis and the functions \(\hat{f}_{ij}\)and \(\hat{g}_{ij}\) need to be calculated, again imposing the boundary conditions at each interface. A more general situation could take place when the thin wire is between several layers at the same time. In practice, the thin wire is segmented in M short pieces of length \(\Delta l_{m}\) each of them with constant point current sources density \(\left\{\mu_{m}\right\}_{m=1\cdots M}\), which are used to calculate the potential of the electrode itself by imposing a constant value of such potential along the entire electrode, the grounding electrode potential [15]. Thus, the potential at point \(\overset{\rightarrow}{r}\) of the layer \(j\) becomes:  
\[ \begin{split}&\phi(\overset{\rightarrow}{r}_{j})=\sum\limits_{m=1}^{M }\frac{\rho_{m}\cdot\mu_{m}\cdot\Delta t_{m}}{4\pi}\frac{\sigma_{m}\cdot\mu_{m} \cdot\Delta t_{m}}{\sigma_{j}^{-}-\tau_{m}}\delta_{mj}+\\ &+\sum\limits_{m=1}^{M}\frac{\rho_{m}\cdot\mu_{m}\cdot\Delta t_{m }}{4\pi}\int\limits_{0}^{\infty}(f_{mj}(\lambda)e^{-\lambda(z_{j}-z_{m})}+ \delta_{mj}(\lambda)e^{\lambda(z_{j}-z_{m})})f_{0}(\lambda r)d\lambda\end{split}  \tag{5}\]  
This procedure, known as moment method, gives rise to a system of linear equations whose unknowns are the constant densities \(\{\mu_{m}\}_{m=1\cdots M}\) of point current sources in each segment [16]. The knowledge of these densities allows the calculation of the potential at any point on the ground by superposition. The electrode potential itself is of special interest for this work. As it was pointed out, it is obtained as a part of the solution for the \(\mu_{k}\) densities and then the grounding resistance can be easily calculated. When the electrode is a conductor with non-zero internal resistance, the calculation of the potential acquired by the electrode is somewhat more complicated since it is no longer equipotential.