image — homogeneous image-charge sum¶
Physical context¶
A grounding electrode embedded in a homogeneous half-space of resistivity \(\rho\) injects a current \(I\) into the soil. The quasi-static potential field is governed by Laplace's equation (\(-\nabla \cdot (\sigma \nabla \varphi) = q\) with \(\sigma = 1/\rho\) and \(q\) the source-current density), with an insulating boundary at the soil surface (\(\partial\varphi/\partial z = 0\) at \(z = 0\)) and \(\varphi \to 0\) at infinity.
For frequencies \(f < 1\,\text{kHz}\) the displacement-current term is negligible — the relaxation time of moist soil (\(\tau = \varepsilon/\sigma\)) is on the order of 100 ns, well below the millisecond regime. The static potential field is therefore representative of the entire quasi-static frequency window.
Governing equation: image-charge solution¶
A point current source \(I\) at depth \(z_s > 0\) in a homogeneous half-space satisfies the Neumann boundary at \(z = 0\) exactly through the image-charge construction: place a virtual source of identical strength at the mirror position \(z = -z_s\). The superposition of source and image gives
with \(r' = \sqrt{(x{-}x_s)^2 + (y{-}y_s)^2 + (z{+}z_s)^2}\) the distance to the air-mirrored image.
This is the smallest, cleanest closed form in the engine family and provides the baseline against which every layered engine collapses when its layer contrast vanishes.
Numerical strategy¶
Wire-segment discretisation¶
A finite electrode (rod, ring, mesh) is discretised into \(N\)
collinear segments of length \(L_i \le \Delta s\) (the
engine.segment_length parameter). Each segment carries one point
current source at its midpoint. The total current of an electrode
is distributed uniformly per unit length across its segments —
i.e. the segment current \(I_i = I_{\text{electrode}} \cdot L_i / \sum_j L_j\).
The uniform-current ansatz is an approximation: the true current
distribution along a wire is non-uniform, with end-point
concentrations on the order of \(\sim 5\,\%\). This residual is
handled either by accepting a \(\sim 5\,\%\) Dwight-bias on the input
impedance (cheap), or by switching to the mom backend
which solves for the actual distribution at \(O(N^3)\) cost.
Self-action correction¶
For the average-potential evaluation at segment midpoints, the diagonal of the kernel matrix carries a \(1/r\) singularity that the point-source representation cannot handle. We replace the direct-source self-distance by the analytical line self-potential
with \(a_i\) the wire radius. This is the classic Howe / Sunde average-potential formula for a thin wire of finite length. The image contribution at the same segment carries no singularity (the image is at \(z = -2 z_s\), distance \(2 z_s\) away), so a point-source evaluation suffices there.
Cluster constraints¶
Multiple electrodes connected by a Conductor form a galvanic
cluster with a shared (unknown) cluster potential \(\varphi_c\) and
a known total injected current \(I_{c,\text{in}} = \sum_{e\in c} I_{\text{src},e}\). The current sharing within the cluster is solved
through the multi-port grounding matrix \(Z_{ij}\) (average potential
at electrode \(i\) for unit current at electrode \(j\)):
with \(C\) the cluster-membership indicator. The first \(N\) rows enforce \(\varphi_i = \varphi_c\) for every electrode in cluster \(c\); the last \(K\) rows enforce \(\sum_{i \in c} I_i = I_{c,\text{in}}\).
Postprocessing¶
After the cluster currents are known, every segment current is
fixed by the uniform-per-unit-length rule. Field-point evaluations
(profiles, contours, transferred potentials) reuse the same kernel
\(1/r + 1/r'\) at the actual field point. The
FieldResult.potential helper is a thin
wrapper around this evaluation.
Validity envelope¶
| Property | Range / value |
|---|---|
| Soil model | HomogeneousSoil only |
| Frequency | quasi-static, \(f < 1\,\text{kHz}\) |
| Wire radius | \(a \ll L_i\) (thin-wire) |
| Segment length | \(L_i \lesssim a_{\text{eq}} / 5\) for stable averaging |
| Air boundary | insulating (Neumann at \(z = 0\)) |
| Far-field | \(\varphi \to 0\) as $ |
Convergence and cost¶
- Discretisation error. The uniform-per-unit-length ansatz carries a \(\sim 4{-}5\,\%\) residual compared to the Sunde rod formula at the canonical 1.5 m / 5 mm rod, and shrinks to \(< 1\,\%\) at sub-centimetre segment lengths and short rods.
- Computational cost. \(O(N^2)\) matrix build for the cluster reaction matrix; \(O(K^3)\) for the constraint solve, where \(K\) is the cluster count (typically 1–3). For typical geometries with \(N \le 10^3\), the homogeneous engine completes in milliseconds.
- Numerical singularity. Distances below
_MIN_DISTANCE = 1 mmare clamped at the floor to keep the kernel finite during plot evaluations near the wire axis.
Cross-validation notes¶
| Counterpart | Expected agreement | What is checked |
|---|---|---|
| Dwight 1936 closed forms | \(\le 10\,\%\) | rod / ring / mesh DC resistance |
mom (Galerkin) |
\(\le 2\,\%\) | same kernel, different test function |
image_2layer at \(K = 0\) |
bit-exact | layered family collapses to homogeneous |
cim at \(n = 1\) |
bit-exact | matrix-pencil fit returns \(P = 0\), kernel matches |
mom_sommerfeld at \(n = 1\) |
bit-exact | quadrature short-circuits to closed form |
fem (axisymmetric volume PDE) |
\(\le 10\,\%\) | reduction to equivalent hemisphere |
These bounds are codified as parametric pytest fixtures; see
tests/test_cross_engines.py and
tests/test_cross_engines_extended.py.
References¶
- Sunde, E. D. (1968). Earth Conduction Effects in Transmission Systems, Dover. Chapter 2 — image-charge construction and average-potential method.
- Dwight, H. B. (1936). Calculation of resistances to ground. AIEE Transactions 55. Reference DC resistances for canonical geometries.
- Tagg, G. F. (1964). Earth Resistances, Pitman. The practitioner's reference for image methods.
Example¶
import groundfield as gf
soil = gf.HomogeneousSoil(resistivity=100.0)
world = gf.create_world(soil=soil)
gf.create_electrode(world, "rod", name="g1",
position=(0.0, 0.0, 0.0), length=1.5)
gf.create_source(world, attached_to="g1", magnitude=1.0)
engine = gf.create_engine(backend="image",
segment_length=0.05,
frequencies=[50.0])
result = world.solve(engine)
print(result.cluster_impedance("g1")[0])
API reference¶
image ¶
Image-charge backend for homogeneous soil.
Computes the potential field of an arbitrary grounding system in a homogeneous half-space (resistivity \(\rho\), soil surface at \(z = 0\), \(z\) axis pointing into the soil) using the classical image-charge method.
Notes
A point current source \(I\) at \(r_s = (x_s, y_s, z_s)\) with \(z_s > 0\) (inside the soil) produces, in a homogeneous half-space with an insulating soil surface, the potential $$ \varphi(r) \;=\; \frac{\rho\, I}{4\pi}\, \Big(\frac{1}{|r - r_s|} + \frac{1}{|r - r_s'|}\Big), $$ with the image \(r_s' = (x_s, y_s, -z_s)\) mirrored at the soil surface. An extended electrode is discretised into \(N\) segments; each segment carries one point current source at its midpoint. The total current \(I_e\) of an electrode is distributed uniformly per unit length across its segments — a surprisingly good approximation for wire electrodes at low frequencies (cf. Sunde 1968, Tagg 1964).
The input impedance of an electrode is computed as the average of the potential on its own segment midpoints (average-potential method). For a single driven rod the backend reproduces the Sunde formula within a few per cent.
Further properties of this backend:
- Frequency-independent: in the quasi-static range \(f < 1\,\mathrm{kHz}\) the backend returns the same real solution per frequency. Complex extensions (Carson, frequency-dependent soil) come in later backends.
- Multiple electrodes: each electrode has its own total current (sum of the current sources attached to it). An electrode without a source carries zero current and acts purely as a passive observer.
References
.. [1] E. D. Sunde, Earth Conduction Effects in Transmission Systems, Dover, 1968. .. [2] G. F. Tagg, Earth Resistances, Pitman, 1964.
solve_image ¶
Image-charge solver for homogeneous soil.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
world
|
'World'
|
World whose |
required |
engine
|
'Engine'
|
Engine configuration; relevant fields are |
required |
Source code in src/groundfield/solver/image.py
1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 | |
Related material¶
- ADR-0001 documents why this homogeneous engine sits at the root of the engine family.