Skip to content

References

groundfield.references collects the closed-form results of the classical literature that the numerical backends are validated against. They are independent of the solver code: every engine and every new geometry is checked against at least one of them (see the validation page).

Module Source Content Used to check
dwight1936 Dwight, Calculation of Resistances to Ground, AIEE Trans., Dec. 1936, Table I rod, two rods (close / far), horizontal wire, right-angle wire, 3/4/6/8-point star, buried ring, strip, round and vertical plate, hemisphere grounding resistance of the image and MoM families in homogeneous soil
ieee80 IEEE Std 80-2013, Eq. 53 (Sverak; Eq. 57 of the 2000 edition) resistance of a horizontal grid grids; the Annex H benchmark grids are reproduced in tests/test_ieee80_benchmark.py
oeding Oeding and Oswald, Elektrische Kraftwerke und Netze (Springer, 2016), ch. 9 loop self and mutual inductance per unit length, internal inductance Neumann inductance of distributed conductors
carson Carson, Bell Syst. Tech. J. 5(4), 1926; Tleis, Power Systems Modelling and Fault Analysis, 2008 worked examples and tabulated values the Carson correction \(P, Q\)
earth_return Carson's line impedance in engineering form self and mutual earth-return impedance per unit length, equivalent depth \(D_e\), \(R' = \omega\mu_0/8\) the assembled Sommerfeld/Pollaczek stack
pollaczek Pollaczek (1926), Sunde (1968), Tsiamitros et al. (2005) earth-return impedance of buried conductors in two-layer soil (self, mutual, conductor–earth loop) layered earth return

Mathematical and physical context

All formulas assume the same physics as the solver — quasi-static fields, linear isotropic soil — but in idealised geometries where the boundary-value problem has a closed or semi-closed solution. Two examples:

  • Driven rod of length \(L\) and radius \(a\), top at the surface of a homogeneous soil (Dwight 1936): \(R = \dfrac{\rho}{2\pi L}\left(\ln\dfrac{4L}{a} - 1\right)\).
  • Buried conductor at depth \(d\) in two-layer soil (Pollaczek, Sunde): the self impedance per unit length is a spectral integral with the effective vertical wavenumber of the layered earth; it reduces to Carson's line impedance for \(\rho_1 = \rho_2\) and lies between the two homogeneous Carson values otherwise.

Each reference states its own accuracy: Dwight's rod and ring formulas are asymptotic in \(a/L\) and accurate to well below 1 % for thin electrodes; Sverak's grid formula is an empirical estimate that IEEE 80 quotes to a few per cent for typical substation grids.

Example

import groundfield as gf
from groundfield.references import dwight1936, ieee80


def resistance(kind, **geometry):
    """Grounding resistance in Ω of one electrode in 100 Ω·m soil."""
    world = gf.create_world(soil=gf.HomogeneousSoil(rho=100.0))
    electrode = gf.create_electrode(world, kind, name="e", **geometry)
    gf.create_source(world, attached_to="e", magnitude=1.0)
    return gf.create_engine().solve(world).input_impedance()[0].real, electrode


R_rod, rod = resistance("rod", position=(0.0, 0.0, 0.0), length=3.0)        # 35.99 Ω
R_grid, grid = resistance(
    "grid_mesh", corner=(-10.0, -10.0, 0.5), size=(20.0, 20.0), n_x=5, n_y=5
)                                                                             # 2.31 Ω

R_dwight = dwight1936.rod(rho=100.0, length=3.0, radius=0.005)               # 35.99 Ω
R_sverak = ieee80.grid_resistance_sverak(
    rho=100.0, total_conductor_length=grid.total_length(), area=400.0, depth=0.5
)                                                                             # 2.54 Ω
assert abs(R_rod / R_dwight - 1) < 1e-3     # closed form: agreement to 0.01 %
assert abs(R_grid / R_sverak - 1) < 0.10    # empirical estimate: 9 % for this small grid

API reference

dwight1936

Grounding resistances of simple geometries after Dwight (1936).

Source

Dwight, H. B.: Calculation of Resistances to Ground. Electrical Engineering / AIEE Transactions, Vol. 55, No. 12, December 1936, pp. 1319-1328 (Paper 36-129). In particular the summary Table I on p. 1325.

Conventions
  • All lengths are given in metres (Dwight uses cm; the SI conversion is lossless because only dimensionless ratios and the prefactor \(\rho/(\dots\pi L)\) appear).
  • \(\rho\) is the resistivity of the homogeneous soil in \(\Omega\,\mathrm{m}\).
  • For buried electrodes Dwight's Table I uses \(s\) for the image distance, i.e. twice the burial depth: \(s = 2\,t\), where \(t\) is the depth of the centre of the electrode below the surface. The functions defined here take depth (= \(t\)) and convert internally to \(s = 2\,t\).
  • Wire parameters: a is the wire radius (not the diameter); for geometries that use the wire diameter \(d\) in Table I (the ring), the conversion d = 2*a applies.
Range of validity

All formulas assume homogeneous soil in the low-frequency (quasi-static) regime. Dwight quotes a few-percent accuracy for most expressions (Howe's average-potential method). The rod formula is within < 1 %; the star geometries within a few percent (Dwight 1936, p. 1324, "equations 23 to 26").

Notes

The functions are pure Python scalars (NumPy scalars also work). They are intentionally not vectorised — comparison tests need clarity, not performance.

buried_ring

buried_ring(rho: float, ring_diameter: float, wire_diameter: float, depth: float) -> float

Buried wire ring, Table I, Eq. (29). $$ R = \frac{\rho}{2\pi^2\,D}\, \Bigl(\ln\tfrac{8D}{d} + \ln\tfrac{4D}{s}\Bigr) $$

Parameters:

Name Type Description Default
rho float

Resistivity of the homogeneous soil in Ω·m.

required
ring_diameter float

Ring diameter \(D\) in m.

required
wire_diameter float

Wire diameter \(d\) in m (i.e. 2*radius).

required
depth float

Burial depth \(t\) in m; \(s = 2\,t\).

required

Returns:

Type Description
float

Grounding resistance in Ω.

Notes

Validity: \(d \ll s \ll D\). Outside this regime the error grows quickly.

Source code in src/groundfield/references/dwight1936.py
def buried_ring(
    rho: float, ring_diameter: float, wire_diameter: float, depth: float
) -> float:
    """Buried wire ring, Table I, Eq. (29).
    $$
    R = \\frac{\\rho}{2\\pi^2\\,D}\\,
        \\Bigl(\\ln\\tfrac{8D}{d} + \\ln\\tfrac{4D}{s}\\Bigr)
    $$
    Parameters
    ----------
    rho : float
        Resistivity of the homogeneous soil in Ω·m.
    ring_diameter : float
        Ring diameter $D$ in m.
    wire_diameter : float
        Wire diameter $d$ in m (i.e. ``2*radius``).
    depth : float
        Burial depth $t$ in m; $s = 2\\,t$.

    Returns
    -------
    float
        Grounding resistance in Ω.

    Notes
    -----
    Validity: $d \\ll s \\ll D$. Outside this regime the error
    grows quickly.
    """
    D = ring_diameter
    d = wire_diameter
    s = 2.0 * depth
    return (
        rho / (2.0 * math.pi**2 * D) * (math.log(8.0 * D / d) + math.log(4.0 * D / s))
    )

hemisphere

hemisphere(rho: float, radius: float) -> float

Hemispherical electrode of radius \(A\) at the soil surface. $$ R = \frac{\rho}{2\pi A} $$ (Dwight, p. 1320: hemisphere + image = full sphere, \(C_{\text{full sphere}} = A\), hence \(R = \rho/(2\pi C) = \rho/(2\pi A)\).)

Parameters:

Name Type Description Default
rho float

Resistivity of the homogeneous soil in Ω·m.

required
radius float

Hemisphere radius \(A\) in m.

required

Returns:

Type Description
float

Grounding resistance in Ω.

Raises:

Type Description
ValueError

If radius is not positive.

Source code in src/groundfield/references/dwight1936.py
def hemisphere(rho: float, radius: float) -> float:
    """Hemispherical electrode of radius $A$ at the soil surface.
    $$
    R = \\frac{\\rho}{2\\pi A}
    $$
    (Dwight, p. 1320: hemisphere + image = full sphere,
    $C_{\\text{full sphere}} = A$, hence
    $R = \\rho/(2\\pi C) = \\rho/(2\\pi A)$.)

    Parameters
    ----------
    rho : float
        Resistivity of the homogeneous soil in Ω·m.
    radius : float
        Hemisphere radius $A$ in m.

    Returns
    -------
    float
        Grounding resistance in Ω.

    Raises
    ------
    ValueError
        If ``radius`` is not positive.
    """
    if radius <= 0.0:
        raise ValueError("radius must be positive.")
    return rho / (2.0 * math.pi * radius)

horizontal_round_plate

horizontal_round_plate(rho: float, radius: float, depth: float) -> float

Horizontal round plate, Table I (Eqs. 32 + 36). $$ R = \frac{\rho}{8 a} + \frac{\rho}{4\pi s}\, \Bigl(1 - \tfrac{7 a^2}{12 s^2} + \tfrac{33 a^4}{40 s^4}\Bigr) $$ Assumption: plate plane parallel to the soil surface; image distance \(s = 2\,t\) ≫ plate radius \(a\) for the series to converge.

Parameters:

Name Type Description Default
rho float

Resistivity of the homogeneous soil in Ω·m.

required
radius float

Plate radius \(a\) in m.

required
depth float

Burial depth \(t\) of the plate in m; internally \(s = 2t\).

required

Returns:

Type Description
float

Grounding resistance in Ω.

Source code in src/groundfield/references/dwight1936.py
def horizontal_round_plate(rho: float, radius: float, depth: float) -> float:
    """Horizontal round plate, Table I (Eqs. 32 + 36).
    $$
    R = \\frac{\\rho}{8 a} +
        \\frac{\\rho}{4\\pi s}\\,
          \\Bigl(1 - \\tfrac{7 a^2}{12 s^2}
                    + \\tfrac{33 a^4}{40 s^4}\\Bigr)
    $$
    Assumption: plate plane parallel to the soil surface; image
    distance $s = 2\\,t$ ≫ plate radius $a$ for the series
    to converge.

    Parameters
    ----------
    rho : float
        Resistivity of the homogeneous soil in Ω·m.
    radius : float
        Plate radius $a$ in m.
    depth : float
        Burial depth $t$ of the plate in m; internally $s = 2t$.

    Returns
    -------
    float
        Grounding resistance in Ω.
    """
    s = 2.0 * depth
    a = radius
    R_self = rho / (8.0 * a)
    R_image = (
        rho
        / (4.0 * math.pi * s)
        * (1.0 - 7.0 * a**2 / (12.0 * s**2) + 33.0 * a**4 / (40.0 * s**4))
    )
    return R_self + R_image

horizontal_strip

horizontal_strip(rho: float, length: float, width: float, thickness: float, depth: float) -> float

Buried strip electrode (rectangular cross-section), Table I, Eq. (31). $$ R = \frac{\rho}{4\pi L}\, \Bigl(\ln\tfrac{4L}{a} + \tfrac{a^2 - \pi a b}{2(a+b)^2} + \ln\tfrac{4L}{s} - 1 + \tfrac{s}{2L} - \tfrac{s^2}{16 L^2} + \tfrac{s^4}{512 L^4}\Bigr) $$

Parameters:

Name Type Description Default
rho float

Resistivity of the homogeneous soil in Ω·m.

required
length float

Half the strip length \(L\) in m (total length 2*L).

required
width float

Strip width \(a\) in m.

required
thickness float

Strip thickness \(b\) in m. Validity: \(b < a/8\).

required
depth float

Burial depth \(t\) in m; \(s = 2\,t\).

required

Returns:

Type Description
float

Grounding resistance in Ω.

Raises:

Type Description
ValueError

If thickness is not smaller than width / 8 (the precondition of Dwight's Eq. 30).

Notes

The constant is \(-1\), not the \(-2\) of the round-wire form horizontal_wire(), because the strip bracket already carries the cross-section term \((a^2 - \pi a b)/(2(a+b)^2) \to 1/2\) as \(b \to 0\):

\[ \underbrace{\ln\tfrac{4L}{a} + \tfrac12 + \ln\tfrac{4L}{s} - 1}_{\text{strip of width } a} \;=\; \underbrace{\ln\tfrac{4L}{a} + \tfrac32 + \ln\tfrac{4L}{s} - 2}_{\text{round wire of radius } a\,e^{-3/2}}, \]

i.e. a vanishingly thin strip of width \(a\) is the round wire of radius equal to the strip's self-GMD \(a\,e^{-3/2}\). That is the consistency check: for \(b \to 0\) this function equals horizontal_wire(rho, L, a*exp(-1.5), depth) up to the \(O(b/a)\) residual of the cross-section term (8.6e-6 relative at \(a = 30\) mm, \(b = 1\) µm; 8.6e-9 at \(b = 1\) nm). Corrected in 0.15.0 (finding F37): the \(-2\) used up to 0.14.1 made the bracket one full unit too small, i.e. \(R\) low by \(\rho/(4\pi L)\) — 10 % at \(a = 30\) mm, 13 % at \(a = 300\) mm for \(L = 10\) m, \(t = 0.8\) m.

Source code in src/groundfield/references/dwight1936.py
def horizontal_strip(
    rho: float,
    length: float,
    width: float,
    thickness: float,
    depth: float,
) -> float:
    """Buried strip electrode (rectangular cross-section), Table I, Eq. (31).
    $$
    R = \\frac{\\rho}{4\\pi L}\\,
        \\Bigl(\\ln\\tfrac{4L}{a} + \\tfrac{a^2 - \\pi a b}{2(a+b)^2}
               + \\ln\\tfrac{4L}{s} - 1 + \\tfrac{s}{2L}
               - \\tfrac{s^2}{16 L^2}
               + \\tfrac{s^4}{512 L^4}\\Bigr)
    $$
    Parameters
    ----------
    rho : float
        Resistivity of the homogeneous soil in Ω·m.
    length : float
        Half the strip length $L$ in m (total length ``2*L``).
    width : float
        Strip width $a$ in m.
    thickness : float
        Strip thickness $b$ in m. Validity: $b < a/8$.
    depth : float
        Burial depth $t$ in m; $s = 2\\,t$.

    Returns
    -------
    float
        Grounding resistance in Ω.

    Raises
    ------
    ValueError
        If ``thickness`` is not smaller than ``width / 8`` (the
        precondition of Dwight's Eq. 30).

    Notes
    -----
    The constant is $-1$, **not** the $-2$ of the round-wire form
    :func:`horizontal_wire`, because the strip bracket already carries
    the cross-section term $(a^2 - \\pi a b)/(2(a+b)^2) \\to 1/2$ as
    $b \\to 0$:

    $$
    \\underbrace{\\ln\\tfrac{4L}{a} + \\tfrac12
                 + \\ln\\tfrac{4L}{s} - 1}_{\\text{strip of width } a}
    \\;=\\;
    \\underbrace{\\ln\\tfrac{4L}{a} + \\tfrac32
                 + \\ln\\tfrac{4L}{s} - 2}_{\\text{round wire of radius }
                                            a\\,e^{-3/2}},
    $$

    i.e. a vanishingly thin strip of width $a$ *is* the round wire of
    radius equal to the strip's self-GMD $a\\,e^{-3/2}$. That is the
    consistency check: for $b \\to 0$ this function equals
    ``horizontal_wire(rho, L, a*exp(-1.5), depth)`` up to the $O(b/a)$
    residual of the cross-section term (8.6e-6 relative at
    $a = 30$ mm, $b = 1$ µm; 8.6e-9 at $b = 1$ nm). Corrected in
    0.15.0 (finding F37): the $-2$ used up to 0.14.1 made the bracket
    one full unit too small, i.e. $R$ low by $\\rho/(4\\pi L)$ —
    10 % at $a = 30$ mm, 13 % at $a = 300$ mm for $L = 10$ m,
    $t = 0.8$ m.
    """
    L, a, b = length, width, thickness
    if b >= a / 8.0:
        raise ValueError(
            "horizontal_strip: precondition b < a/8 violated "
            f"(a={a}, b={b}). See Dwight 1936, Eq. 30."
        )
    s = 2.0 * depth
    inner = (
        math.log(4.0 * L / a)
        + (a**2 - math.pi * a * b) / (2.0 * (a + b) ** 2)
        + math.log(4.0 * L / s)
        - 1.0
        + s / (2.0 * L)
        - s**2 / (16.0 * L**2)
        + s**4 / (512.0 * L**4)
    )
    return rho / (4.0 * math.pi * L) * inner

horizontal_wire

horizontal_wire(rho: float, length: float, radius: float, depth: float) -> float

Buried horizontal wire of total length \(2L\), Table I. $$ R = \frac{\rho}{4\pi L} \Bigl(\ln\tfrac{4L}{a} + \ln\tfrac{4L}{s} - 2 + \tfrac{s}{2L} - \tfrac{s^2}{16 L^2} + \tfrac{s^4}{512 L^4}\Bigr) $$

Parameters:

Name Type Description Default
rho float

Resistivity of the homogeneous soil in Ω·m.

required
length float

L = half the wire length in m (total length is 2*L).

required
radius float

Wire radius \(a\) in m.

required
depth float

Burial depth \(t\) in m. The image distance is \(s = 2\,t\).

required

Returns:

Type Description
float

Grounding resistance in Ω.

Source code in src/groundfield/references/dwight1936.py
def horizontal_wire(rho: float, length: float, radius: float, depth: float) -> float:
    """Buried horizontal wire of total length $2L$, Table I.
    $$
    R = \\frac{\\rho}{4\\pi L}
        \\Bigl(\\ln\\tfrac{4L}{a} + \\ln\\tfrac{4L}{s}
               - 2 + \\tfrac{s}{2L}
               - \\tfrac{s^2}{16 L^2}
               + \\tfrac{s^4}{512 L^4}\\Bigr)
    $$
    Parameters
    ----------
    rho : float
        Resistivity of the homogeneous soil in Ω·m.
    length : float
        ``L`` = half the wire length in m (total length is ``2*L``).
    radius : float
        Wire radius $a$ in m.
    depth : float
        Burial depth $t$ in m. The image distance is
        $s = 2\\,t$.

    Returns
    -------
    float
        Grounding resistance in Ω.
    """
    s = 2.0 * depth
    inner = (
        math.log(4.0 * length / radius)
        + math.log(4.0 * length / s)
        - 2.0
        + s / (2.0 * length)
        - s**2 / (16.0 * length**2)
        + s**4 / (512.0 * length**4)
    )
    return rho / (4.0 * math.pi * length) * inner

n_point_star

n_point_star(rho: float, arm_length: float, radius: float, depth: float, n_arms: int) -> float

n-point star (star of \(n\) equal-length arms). Table I. $$ R = \frac{\rho}{2 n \pi L}\, \Bigl(\ln\tfrac{2L}{a} + \ln\tfrac{2L}{s} + c_0 + c_1\tfrac{s}{L} + c_2\tfrac{s^2}{L^2} + c_3\tfrac{s^4}{L^4}\Bigr) $$

Parameters:

Name Type Description Default
rho float

Resistivity of the homogeneous soil in Ω·m.

required
arm_length float

Length of a single arm \(L\) in m.

required
radius float

Wire radius \(a\) in m.

required
depth float

Burial depth \(t\) in m; internally \(s = 2\,t\).

required
n_arms int

Number of arms. Supported values: 3, 4, 6, 8 (Dwight, Eqs. 23-26).

required

Returns:

Type Description
float

Grounding resistance in Ω.

Raises:

Type Description
ValueError

If n_arms is not one of 3, 4, 6, 8.

Source code in src/groundfield/references/dwight1936.py
def n_point_star(
    rho: float,
    arm_length: float,
    radius: float,
    depth: float,
    n_arms: int,
) -> float:
    """n-point star (star of $n$ equal-length arms). Table I.
    $$
    R = \\frac{\\rho}{2 n \\pi L}\\,
        \\Bigl(\\ln\\tfrac{2L}{a} + \\ln\\tfrac{2L}{s}
               + c_0 + c_1\\tfrac{s}{L}
               + c_2\\tfrac{s^2}{L^2}
               + c_3\\tfrac{s^4}{L^4}\\Bigr)
    $$
    Parameters
    ----------
    rho : float
        Resistivity of the homogeneous soil in Ω·m.
    arm_length : float
        Length of a single arm $L$ in m.
    radius : float
        Wire radius $a$ in m.
    depth : float
        Burial depth $t$ in m; internally $s = 2\\,t$.
    n_arms : int
        Number of arms. Supported values: 3, 4, 6, 8 (Dwight,
        Eqs. 23-26).

    Returns
    -------
    float
        Grounding resistance in Ω.

    Raises
    ------
    ValueError
        If ``n_arms`` is not one of 3, 4, 6, 8.
    """
    if n_arms not in _STAR_COEFFS:
        raise ValueError(
            f"Dwight 1936 only covers n_arms in {{3, 4, 6, 8}}, got {n_arms}."
        )
    L = arm_length
    s = 2.0 * depth
    c0, c1, c2, c3 = _STAR_COEFFS[n_arms]
    inner = (
        math.log(2.0 * L / radius)
        + math.log(2.0 * L / s)
        + c0
        + c1 * (s / L)
        + c2 * (s / L) ** 2
        + c3 * (s / L) ** 4
    )
    return rho / (2.0 * n_arms * math.pi * L) * inner

right_angle_wire

right_angle_wire(rho: float, arm_length: float, radius: float, depth: float) -> float

Right-angle wire: two arms of length \(L\), Table I, Eq. (22).

Parameters:

Name Type Description Default
rho float

Resistivity of the homogeneous soil in Ω·m.

required
arm_length float

Length \(L\) of each arm in m.

required
radius float

Wire radius \(a\) in m.

required
depth float

Burial depth \(t\) in m; internally \(s = 2t\).

required

Returns:

Type Description
float

Grounding resistance in Ω.

Source code in src/groundfield/references/dwight1936.py
def right_angle_wire(
    rho: float, arm_length: float, radius: float, depth: float
) -> float:
    """Right-angle wire: two arms of length $L$, Table I, Eq. (22).

    Parameters
    ----------
    rho : float
        Resistivity of the homogeneous soil in Ω·m.
    arm_length : float
        Length $L$ of each arm in m.
    radius : float
        Wire radius $a$ in m.
    depth : float
        Burial depth $t$ in m; internally $s = 2t$.

    Returns
    -------
    float
        Grounding resistance in Ω.
    """
    L = arm_length
    s = 2.0 * depth
    inner = (
        math.log(2.0 * L / radius)
        + math.log(2.0 * L / s)
        - 0.2373
        + 0.2146 * (s / L)
        + 0.1035 * (s / L) ** 2
        - 0.0424 * (s / L) ** 4
    )
    return rho / (4.0 * math.pi * L) * inner

rod

rod(rho: float, length: float, radius: float) -> float

Vertical driven rod (single ground rod), Eq. (13) / Table I. $$ R = \frac{\rho}{2\pi L}\,\bigl(\ln\tfrac{4L}{a} - 1\bigr) $$ Assumptions: rod starts at the soil surface and extends \(L\) downwards; the rod is treated together with its image in the half-space. Wire radius \(a \ll L\).

Parameters:

Name Type Description Default
rho float

Resistivity of the homogeneous soil in Ω·m.

required
length float

Rod length \(L\) in m.

required
radius float

Rod radius \(a\) in m.

required

Returns:

Type Description
float

Grounding resistance in Ω.

Raises:

Type Description
ValueError

If length or radius is not positive.

Source code in src/groundfield/references/dwight1936.py
def rod(rho: float, length: float, radius: float) -> float:
    """Vertical driven rod (single ground rod), Eq. (13) / Table I.
    $$
    R = \\frac{\\rho}{2\\pi L}\\,\\bigl(\\ln\\tfrac{4L}{a} - 1\\bigr)
    $$
    Assumptions: rod starts at the soil surface and extends $L$
    downwards; the rod is treated together with its image in the
    half-space. Wire radius $a \\ll L$.

    Parameters
    ----------
    rho : float
        Resistivity of the homogeneous soil in Ω·m.
    length : float
        Rod length $L$ in m.
    radius : float
        Rod radius $a$ in m.

    Returns
    -------
    float
        Grounding resistance in Ω.

    Raises
    ------
    ValueError
        If ``length`` or ``radius`` is not positive.
    """
    if length <= 0.0 or radius <= 0.0:
        raise ValueError("length and radius must be positive.")
    return rho / (2.0 * math.pi * length) * (math.log(4.0 * length / radius) - 1.0)

two_rods_close

two_rods_close(rho: float, length: float, radius: float, spacing: float) -> float

Two parallel rods, axis spacing \(s < L\). Table I, Eq. (21). $$ R = \frac{\rho}{4\pi L}\Bigl(\ln\tfrac{4L}{a} + \ln\tfrac{4L}{s} - 2 + \tfrac{s}{2L} - \tfrac{s^2}{16 L^2} + \tfrac{s^4}{512 L^4}\Bigr) $$ Suitable for closely-spaced rods, \(s \ll L\).

Parameters:

Name Type Description Default
rho float

Resistivity of the homogeneous soil in Ω·m.

required
length float

Length \(L\) of each rod in m.

required
radius float

Rod radius \(a\) in m.

required
spacing float

Horizontal axis-to-axis distance \(s\) in m.

required

Returns:

Type Description
float

Grounding resistance of the two rods in parallel, in Ω.

Raises:

Type Description
ValueError

If spacing is not positive.

Source code in src/groundfield/references/dwight1936.py
def two_rods_close(rho: float, length: float, radius: float, spacing: float) -> float:
    """Two parallel rods, axis spacing $s < L$. Table I, Eq. (21).
    $$
    R = \\frac{\\rho}{4\\pi L}\\Bigl(\\ln\\tfrac{4L}{a}
        + \\ln\\tfrac{4L}{s} - 2 + \\tfrac{s}{2L}
        - \\tfrac{s^2}{16 L^2} + \\tfrac{s^4}{512 L^4}\\Bigr)
    $$
    Suitable for closely-spaced rods, $s \\ll L$.

    Parameters
    ----------
    rho : float
        Resistivity of the homogeneous soil in Ω·m.
    length : float
        Length $L$ of each rod in m.
    radius : float
        Rod radius $a$ in m.
    spacing : float
        Horizontal axis-to-axis distance $s$ in m.

    Returns
    -------
    float
        Grounding resistance of the two rods in parallel, in Ω.

    Raises
    ------
    ValueError
        If ``spacing`` is not positive.
    """
    s = spacing
    if s <= 0.0:
        raise ValueError("spacing must be positive.")
    inner = (
        math.log(4.0 * length / radius)
        + math.log(4.0 * length / s)
        - 2.0
        + s / (2.0 * length)
        - s**2 / (16.0 * length**2)
        + s**4 / (512.0 * length**4)
    )
    return rho / (4.0 * math.pi * length) * inner

two_rods_far

two_rods_far(rho: float, length: float, radius: float, spacing: float) -> float

Two parallel rods, axis spacing \(s > L\). Table I, Eq. (20). $$ R = \frac{\rho}{4\pi L}\bigl(\ln\tfrac{4L}{a} - 1\bigr) + \frac{\rho}{4\pi s}\, \Bigl(1 - \tfrac{L^2}{3 s^2} + \tfrac{2 L^4}{5 s^4}\Bigr) $$ Assumption: spacing is the horizontal axis-to-axis distance. The series is an expansion for large s/L and is usable for \(s/L \gtrsim 1\).

Parameters:

Name Type Description Default
rho float

Resistivity of the homogeneous soil in Ω·m.

required
length float

Length \(L\) of each rod in m.

required
radius float

Rod radius \(a\) in m.

required
spacing float

Horizontal axis-to-axis distance \(s\) in m.

required

Returns:

Type Description
float

Grounding resistance of the two rods in parallel, in Ω.

Raises:

Type Description
ValueError

If spacing is not positive.

Source code in src/groundfield/references/dwight1936.py
def two_rods_far(rho: float, length: float, radius: float, spacing: float) -> float:
    """Two parallel rods, axis spacing $s > L$. Table I, Eq. (20).
    $$
    R = \\frac{\\rho}{4\\pi L}\\bigl(\\ln\\tfrac{4L}{a} - 1\\bigr)
        + \\frac{\\rho}{4\\pi s}\\,
          \\Bigl(1 - \\tfrac{L^2}{3 s^2}
                    + \\tfrac{2 L^4}{5 s^4}\\Bigr)
    $$
    Assumption: ``spacing`` is the horizontal axis-to-axis distance.
    The series is an expansion for large ``s/L`` and is usable for
    $s/L \\gtrsim 1$.

    Parameters
    ----------
    rho : float
        Resistivity of the homogeneous soil in Ω·m.
    length : float
        Length $L$ of each rod in m.
    radius : float
        Rod radius $a$ in m.
    spacing : float
        Horizontal axis-to-axis distance $s$ in m.

    Returns
    -------
    float
        Grounding resistance of the two rods in parallel, in Ω.

    Raises
    ------
    ValueError
        If ``spacing`` is not positive.
    """
    if spacing <= 0.0:
        raise ValueError("spacing must be positive.")
    s = spacing
    R_self = rho / (4.0 * math.pi * length) * (math.log(4.0 * length / radius) - 1.0)
    series = 1.0 - (length**2) / (3.0 * s**2) + 2.0 * (length**4) / (5.0 * s**4)
    R_mutual = rho / (4.0 * math.pi * s) * series
    return R_self + R_mutual

vertical_round_plate

vertical_round_plate(rho: float, radius: float, depth: float) -> float

Vertical round plate, Table I (Eqs. 32 + 38). $$ R = \frac{\rho}{8 a} + \frac{\rho}{4\pi s}\, \Bigl(1 + \tfrac{7 a^2}{24 s^2} + \tfrac{99 a^4}{320 s^4}\Bigr) $$ Assumption: plate plane perpendicular to the soil surface; image distance \(s = 2\,t\) ≫ plate radius \(a\) for the series to converge.

Parameters:

Name Type Description Default
rho float

Resistivity of the homogeneous soil in Ω·m.

required
radius float

Plate radius \(a\) in m.

required
depth float

Burial depth \(t\) of the plate centre in m; internally \(s = 2t\).

required

Returns:

Type Description
float

Grounding resistance in Ω.

Notes

Same leading image term \(\rho/(4\pi s)\) as horizontal_round_plate() — the orientation of the plate is invisible in the far field, so the two must agree to \(O(a^2/s^2)\); only the sign and size of the \(a^2\) correction differ (Eq. 38 vs Eq. 36), because the vertical plate presents its edge, not its face, to the image. (Corrected in 0.15.0 — finding F38; up to 0.14.1 the divisor carried an extra factor 2, halving the image term, because s had been read as the burial depth rather than as the plate-to-image distance it already is.)

Source code in src/groundfield/references/dwight1936.py
def vertical_round_plate(rho: float, radius: float, depth: float) -> float:
    """Vertical round plate, Table I (Eqs. 32 + 38).
    $$
    R = \\frac{\\rho}{8 a} +
        \\frac{\\rho}{4\\pi s}\\,
          \\Bigl(1 + \\tfrac{7 a^2}{24 s^2}
                    + \\tfrac{99 a^4}{320 s^4}\\Bigr)
    $$
    Assumption: plate plane perpendicular to the soil surface; image
    distance $s = 2\\,t$ ≫ plate radius $a$ for the series to
    converge.

    Parameters
    ----------
    rho : float
        Resistivity of the homogeneous soil in Ω·m.
    radius : float
        Plate radius $a$ in m.
    depth : float
        Burial depth $t$ of the plate centre in m; internally $s = 2t$.

    Returns
    -------
    float
        Grounding resistance in Ω.

    Notes
    -----
    Same leading image term $\\rho/(4\\pi s)$ as
    :func:`horizontal_round_plate` — the orientation of the plate is
    invisible in the far field, so the two must agree to
    $O(a^2/s^2)$; only the sign and size of the $a^2$ correction
    differ (Eq. 38 vs Eq. 36), because the vertical plate presents its
    edge, not its face, to the image. (Corrected in 0.15.0 — finding
    F38; up to 0.14.1 the divisor carried an extra factor 2, halving
    the image term, because ``s`` had been read as the burial depth
    rather than as the plate-to-image distance it already is.)
    """
    s = 2.0 * depth
    a = radius
    R_self = rho / (8.0 * a)
    # Series Eq. (38): (1 + 7 a^2 / (24 s^2) + 99 a^4 / (320 s^4))
    R_image = (
        rho
        / (4.0 * math.pi * s)
        * (1.0 + 7.0 * a**2 / (24.0 * s**2) + 99.0 * a**4 / (320.0 * s**4))
    )
    return R_self + R_image

ieee80

IEEE Std 80 grounding-grid reference formulas.

Source

IEEE Std 80, IEEE Guide for Safety in AC Substation Grounding. The grid grounding-resistance estimate implemented here is Sverak's equation, IEEE Std 80-2000 Eq. (57) — identical to IEEE Std 80-2013 Eq. (53) — which refines the earlier Laurent–Niemann expression by an explicit burial-depth term.

Conventions
  • SI units throughout: resistivity in Ω·m, lengths in m, areas in m².
  • depth is the burial depth \(h\) of the horizontal grid below the soil surface; ground rods (if any) are folded into total_conductor_length.
Range of validity

Sverak's formula assumes uniform soil and a horizontal grid. IEEE Std 80 states it for burial depths \(0.25\,\mathrm{m} \le h \le 2.5\,\mathrm{m}\) and quotes an accuracy of a few percent for typical substation grids; the groundfield image backend reproduces it to well under 1 % (tests/test_ieee80_benchmark.py).

Notes

Pure-Python scalars, intentionally not vectorised — comparison tests need clarity, not performance (mirrors groundfield.references.dwight1936).

grid_resistance_sverak

grid_resistance_sverak(rho: float, total_conductor_length: float, area: float, depth: float) -> float

Grid grounding resistance after Sverak (IEEE Std 80 Eq. 57).

\[ R_g = \rho\left[\frac{1}{L_T} + \frac{1}{\sqrt{20\,A}} \left(1 + \frac{1}{1 + h\sqrt{20/A}}\right)\right] \]

Parameters:

Name Type Description Default
rho float

Uniform soil resistivity \(\rho\) in Ω·m.

required
total_conductor_length float

Total buried length \(L_T\) of all grid conductors (plus any ground rods) in metres.

required
area float

Area \(A\) of ground occupied by the grid in m².

required
depth float

Burial depth \(h\) of the grid in metres. IEEE Std 80 states the formula for \(0.25 \le h \le 2.5\) m.

required

Returns:

Type Description
float

Grid grounding resistance \(R_g\) in Ω.

Raises:

Type Description
ValueError

If rho, total_conductor_length, area or depth is not positive.

Notes

In the two limits the formula behaves as expected: \(h \to \infty\) removes the second bracket term (deep grid, no surface image boost) while \(h \to 0\) doubles it (grid at the surface). The \(1/L_T\) term is the conductor's own spreading contribution and vanishes for a very dense grid.

Source code in src/groundfield/references/ieee80.py
def grid_resistance_sverak(
    rho: float,
    total_conductor_length: float,
    area: float,
    depth: float,
) -> float:
    r"""Grid grounding resistance after Sverak (IEEE Std 80 Eq. 57).

    $$
    R_g = \rho\left[\frac{1}{L_T}
          + \frac{1}{\sqrt{20\,A}}
            \left(1 + \frac{1}{1 + h\sqrt{20/A}}\right)\right]
    $$

    Parameters
    ----------
    rho
        Uniform soil resistivity $\rho$ in Ω·m.
    total_conductor_length
        Total buried length $L_T$ of all grid conductors (plus any
        ground rods) in metres.
    area
        Area $A$ of ground occupied by the grid in m².
    depth
        Burial depth $h$ of the grid in metres. IEEE Std 80 states the
        formula for $0.25 \le h \le 2.5$ m.

    Returns
    -------
    float
        Grid grounding resistance $R_g$ in Ω.

    Raises
    ------
    ValueError
        If ``rho``, ``total_conductor_length``, ``area`` or ``depth`` is
        not positive.

    Notes
    -----
    In the two limits the formula behaves as expected: $h \to \infty$
    removes the second bracket term (deep grid, no surface image boost)
    while $h \to 0$ doubles it (grid at the surface). The $1/L_T$ term
    is the conductor's own spreading contribution and vanishes for a
    very dense grid.
    """
    if rho <= 0.0 or total_conductor_length <= 0.0 or area <= 0.0:
        raise ValueError("rho, total_conductor_length and area must be positive.")
    if depth <= 0.0:
        raise ValueError("depth must be positive.")
    L_T, A, h = total_conductor_length, area, depth
    return rho * (
        1.0 / L_T
        + 1.0 / math.sqrt(20.0 * A) * (1.0 + 1.0 / (1.0 + h * math.sqrt(20.0 / A)))
    )

oeding

Inductance formulas from Oeding/Oswald 2016, Elektrische Kraftwerke und Netze, chapter 9 (overhead lines) and chapter 16 (cables).

This module collects the per-unit-length loop self- and mutual inductance formulas that the standard German power-engineering reference uses to characterise long, parallel conductor systems. They are the textbook results that the segment-based Neumann implementation in groundfield.coupling.inductance must reproduce in the limit \(\ell \to \infty\).

All formulas assume:

  • straight, parallel conductors,
  • conductor radius small compared to inter-conductor distance,
  • non-magnetic conductors (\(\mu_r = 1\)),
  • DC / quasi-static current distribution (uniform across the cross section, internal-field contribution \(\mu_0 / (8\pi)\) per wire, see include_internal knobs).

The earth-return path is not included here — those corrections (Carson, Pollaczek) live in their own reference modules in a later release.

References

Oeding, D. & Oswald, B. R. (2016). Elektrische Kraftwerke und Netze, 8th ed., Springer.

  • §9.3, Eq. (9.8) / (9.9): mutual-inductance per unit length between two two-wire loops, with mean geometric distances.
  • §9.3, Eq. (9.13b) / (9.13c): self-inductance per unit length of a two-wire loop.
  • Anhang A.7: mean geometric distances for typical cross-sectional geometries (rod with itself: \(g_{11} = r \cdot e^{-1/4}\)).

MU_0 module-attribute

MU_0 = 4e-07 * math.pi

Vacuum permeability μ0 = 4π · 10⁻⁷ H/m (the conventional value).

internal_inductance_per_length

internal_inductance_per_length() -> float

Internal-field inductance per unit length of a single round conductor with uniform DC current distribution and \(\mu_r = 1\).

Closed-form result \(L'_\text{int} = \mu_0 / (8\pi)\) — the classical textbook value, independent of the wire radius.

Returns:

Name Type Description
L_per_length float

\(5.0 \cdot 10^{-8}\) H/m, to numerical precision.

Source code in src/groundfield/references/oeding.py
def internal_inductance_per_length() -> float:
    """Internal-field inductance per unit length of a single round
    conductor with uniform DC current distribution and
    $\\mu_r = 1$.

    Closed-form result $L'_\\text{int} = \\mu_0 / (8\\pi)$ — the
    classical textbook value, independent of the wire radius.

    Returns
    -------
    L_per_length : float
        $5.0 \\cdot 10^{-8}$ H/m, to numerical precision.
    """
    return MU_0 / (8.0 * math.pi)

loop_mutual_inductance_per_length

loop_mutual_inductance_per_length(*, s13: float, s14: float, s23: float, s24: float) -> float

Mutual-inductance per unit length between two two-wire loops.

Implements Oeding/Oswald 2016 Eq. (9.8):

\[ L'_{c,\mathrm{I,II}} \;=\; \frac{\mu_0}{2\pi} \ln\!\Bigl(\frac{s_{14}\, s_{23}}{s_{13}\, s_{24}}\Bigr). \]

Loop I consists of wires 1 and 2 (carrying currents \(+I\) and \(-I\)); loop II consists of wires 3 and 4. The arguments are centre-to-centre distances between the indicated wire pairs; they must all be positive (no wire pair coincides — the self-inductance limit is handled by loop_self_inductance_per_length() instead).

The same formula applies — with appropriate mean-geometric distances \(g_{ij}\) in place of the centroid distances \(s_{ij}\) (Oeding/Oswald: Schwerpunktabstände) — to wires of finite cross section (Eq. 9.9 in Oeding/Oswald 2016). For circular cross sections with \(r \ll s\) the difference is negligible.

Parameters:

Name Type Description Default
s13 float

Centre-to-centre distances in metres.

required
s14 float

Centre-to-centre distances in metres.

required
s23 float

Centre-to-centre distances in metres.

required
s24 float

Centre-to-centre distances in metres.

required

Returns:

Name Type Description
L_per_length float

Mutual inductance per unit length in H/m. Sign follows the wire-numbering convention (positive when both loops carry currents in the conventional + — + — sense, i.e. wire 1 is anti-parallel to wire 2 and wire 3 is anti-parallel to wire 4). The result can be negative when the loops are crossed.

Raises:

Type Description
ValueError

If any of the four distances is not positive.

Source code in src/groundfield/references/oeding.py
def loop_mutual_inductance_per_length(
    *,
    s13: float,
    s14: float,
    s23: float,
    s24: float,
) -> float:
    """Mutual-inductance per unit length between two two-wire loops.

    Implements Oeding/Oswald 2016 Eq. (9.8):

    $$
    L'_{c,\\mathrm{I,II}} \\;=\\; \\frac{\\mu_0}{2\\pi}
    \\ln\\!\\Bigl(\\frac{s_{14}\\, s_{23}}{s_{13}\\, s_{24}}\\Bigr).
    $$

    Loop I consists of wires 1 and 2 (carrying currents $+I$ and
    $-I$); loop II consists of wires 3 and 4. The arguments are
    centre-to-centre distances between the indicated wire pairs;
    they must all be positive (no wire pair coincides — the
    self-inductance limit is handled by
    :func:`loop_self_inductance_per_length` instead).

    The same formula applies — with appropriate mean-geometric
    distances $g_{ij}$ in place of the centroid distances
    $s_{ij}$ (Oeding/Oswald: *Schwerpunktabstände*) — to wires of
    finite cross section
    (Eq. 9.9 in Oeding/Oswald 2016). For circular cross sections
    with $r \\ll s$ the difference is negligible.

    Parameters
    ----------
    s13, s14, s23, s24
        Centre-to-centre distances in metres.

    Returns
    -------
    L_per_length : float
        Mutual inductance per unit length in H/m. Sign follows the
        wire-numbering convention (positive when both loops carry
        currents in the conventional ``+ — + —`` sense, i.e. wire
        1 is anti-parallel to wire 2 and wire 3 is anti-parallel to
        wire 4). The result can be negative when the loops are
        crossed.

    Raises
    ------
    ValueError
        If any of the four distances is not positive.
    """
    for label, val in (("s13", s13), ("s14", s14), ("s23", s23), ("s24", s24)):
        if val <= 0.0:
            raise ValueError(f"{label} must be positive (got {val})")
    return (MU_0 / (2.0 * math.pi)) * math.log((s14 * s23) / (s13 * s24))

loop_self_inductance_per_length

loop_self_inductance_per_length(distance: float, wire_radius: float, *, include_internal: bool = True) -> float

Self-inductance per unit length of a two-wire loop.

Implements Oeding/Oswald 2016 Eq. (9.13c):

\[ L'_S \;=\; \frac{\mu_0}{\pi} \Bigl[\ln\!\Bigl(\frac{d}{r}\Bigr) + \frac{1}{4}\Bigr], \]

valid for two long, straight, parallel wires of radius \(r\) at centre-to-centre distance \(d\), with \(d \gg r\).

Parameters:

Name Type Description Default
distance float

Centre-to-centre distance \(d\) between the two wires (m).

required
wire_radius float

Wire radius \(r\) (m).

required
include_internal bool

True (default) — include the internal-field contribution \(\mu_0 / (4\pi)\) per loop. False — return the external-field expression \(L'_{S,\text{ext}} = (\mu_0 / \pi) \ln(d/r)\) that applies in the high-frequency skin-effect limit.

True

Returns:

Name Type Description
L_per_length float

Loop self-inductance per unit length in H/m.

Raises:

Type Description
ValueError

If distance or wire_radius is not positive, or if distance does not exceed wire_radius.

Source code in src/groundfield/references/oeding.py
def loop_self_inductance_per_length(
    distance: float,
    wire_radius: float,
    *,
    include_internal: bool = True,
) -> float:
    """Self-inductance per unit length of a two-wire loop.

    Implements Oeding/Oswald 2016 Eq. (9.13c):

    $$
    L'_S \\;=\\; \\frac{\\mu_0}{\\pi}
    \\Bigl[\\ln\\!\\Bigl(\\frac{d}{r}\\Bigr) + \\frac{1}{4}\\Bigr],
    $$

    valid for two long, straight, parallel wires of radius $r$ at
    centre-to-centre distance $d$, with $d \\gg r$.

    Parameters
    ----------
    distance
        Centre-to-centre distance $d$ between the two wires (m).
    wire_radius
        Wire radius $r$ (m).
    include_internal
        ``True`` (default) — include the internal-field
        contribution $\\mu_0 / (4\\pi)$ per loop. ``False`` —
        return the external-field expression
        $L'_{S,\\text{ext}} = (\\mu_0 / \\pi) \\ln(d/r)$ that
        applies in the high-frequency skin-effect limit.

    Returns
    -------
    L_per_length : float
        Loop self-inductance per unit length in H/m.

    Raises
    ------
    ValueError
        If ``distance`` or ``wire_radius`` is not positive, or if
        ``distance`` does not exceed ``wire_radius``.
    """
    if distance <= 0.0 or wire_radius <= 0.0:
        raise ValueError("distance and wire_radius must be positive")
    if distance <= wire_radius:
        raise ValueError("distance must exceed wire_radius (d >> r assumed)")
    r_eff = two_wire_loop_radius(wire_radius, include_internal=include_internal)
    return (MU_0 / math.pi) * math.log(distance / r_eff)

two_wire_loop_radius

two_wire_loop_radius(wire_radius: float, *, include_internal: bool = True) -> float

Effective wire radius \(r' = r \cdot e^{-1/4}\) used in the Oeding loop-inductance formulas.

The factor \(e^{-1/4}\) is the mean geometric distance of a circular cross section from itself (Anhang A.7, case 1) and folds the internal-field contribution \(\mu_0 / (8\pi)\) into a purely geometric expression. With \(r' = r \cdot e^{-1/4}\) the loop self-inductance becomes \(L'_S = (\mu_0 / \pi) \ln(d/r')\), which equals \((\mu_0 / \pi)(\ln(d/r) + 1/4)\) — Eq. (9.13c).

Pass include_internal=False to suppress the substitution and obtain the pure external-field expression.

Parameters:

Name Type Description Default
wire_radius float

Wire radius \(r\) in m.

required
include_internal bool

True returns \(r' = r \cdot e^{-1/4}\) (internal field folded in); False returns \(r\) unchanged.

True

Returns:

Type Description
float

Effective wire radius in m.

Raises:

Type Description
ValueError

If wire_radius is not positive.

Source code in src/groundfield/references/oeding.py
def two_wire_loop_radius(wire_radius: float, *, include_internal: bool = True) -> float:
    """Effective wire radius $r' = r \\cdot e^{-1/4}$ used in the
    Oeding loop-inductance formulas.

    The factor $e^{-1/4}$ is the **mean geometric distance** of a
    circular cross section from itself (Anhang A.7, case 1) and
    folds the internal-field contribution
    $\\mu_0 / (8\\pi)$ into a purely geometric expression. With
    $r' = r \\cdot e^{-1/4}$ the loop self-inductance becomes
    $L'_S = (\\mu_0 / \\pi) \\ln(d/r')$, which equals
    $(\\mu_0 / \\pi)(\\ln(d/r) + 1/4)$ — Eq. (9.13c).

    Pass ``include_internal=False`` to suppress the substitution and
    obtain the pure external-field expression.

    Parameters
    ----------
    wire_radius : float
        Wire radius $r$ in m.
    include_internal : bool, default True
        ``True`` returns $r' = r \\cdot e^{-1/4}$ (internal field
        folded in); ``False`` returns $r$ unchanged.

    Returns
    -------
    float
        Effective wire radius in m.

    Raises
    ------
    ValueError
        If ``wire_radius`` is not positive.
    """
    if wire_radius <= 0.0:
        raise ValueError("wire_radius must be positive")
    if include_internal:
        return wire_radius * math.exp(-0.25)
    return wire_radius

carson

Closed-form Carson 1926 reference values for the test suite.

This module collects the worked examples and tabulated values from Carson's original paper (Bell Syst. Tech. J. 5(4), 1926, pp. 539–554) plus a small set of textbook reference cases from Tleis 2008 and Oeding/Oswald 2016. They are the ground truth that the implementation in groundfield.coupling.carson must reproduce.

All values are returned in the dimensionless form \(J(p, q) = P(a, \theta) + j Q(a, \theta)\) — the bare Carson integral, without the \((\omega \mu_0 / \pi)\) pre-factor. The production code applies that pre-factor in carson_self_correction() and carson_mutual_correction().

References
  • Carson, J. R. (1926). Wave propagation in overhead wires with ground return. Bell Syst. Tech. J. 5(4), 539–554. Section V worked examples are reproduced verbatim.
  • Tleis, N. D. (2008). Power Systems Modelling and Fault Analysis, Newnes, Tab. 3.2 (P, Q values for the intermediate-\(a\) regime).
  • Oeding, D. & Oswald, B. R. (2016). Elektrische Kraftwerke und Netze, 8. Aufl., Springer, §9.4.

RAILWAY_25HZ module-attribute

RAILWAY_25HZ = CarsonExample(name='Railway induction (Carson 1926 p. 553)', a=0.2, theta=math.radians(63.5), P_expected=0.369, Q_expected=1.135, abs_tolerance=0.005, rel_tolerance=0.01, source='Carson 1926, Bell STJ 5(4), §V, p. 553')

Carson's railway-induction example (1926, §V, p. 553) at 25 Hz.

Trolley wire and telephone line at 10 m height, 40 m apart: a = 0.2, theta = 63.5°; reference value J = 0.369 + j 1.135.

TLEIS_TAB_3_2 module-attribute

TLEIS_TAB_3_2 = REGRESSION_ANCHORS

Four regression anchors of the Carson integral (tuple of CarsonExample).

The values come from a direct numerical evaluation of Carson's Eq. 29 (Gauss-Legendre quadrature) across the small-a, intermediate and asymptotic regimes, not from Tleis (2008), Tab. 3.2. The name is a backwards-compatible alias retained from an early draft.

WAVE_ANTENNA_HIGH_RHO module-attribute

WAVE_ANTENNA_HIGH_RHO = CarsonExample(name='Wave antenna, high rho (Carson 1926 p. 552)', a=4.0, theta=0.0, P_expected=0.126, Q_expected=0.168, abs_tolerance=0.005, rel_tolerance=0.05, source='Carson 1926, Bell STJ 5(4), §V, p. 552')

Carson's wave-antenna example (1926, §V, p. 552) at a = 4.0, theta = 0.

The asymptotic regime of the Carson series; reference value J = 0.126 + j 0.168.

WAVE_ANTENNA_LOW_RHO module-attribute

WAVE_ANTENNA_LOW_RHO = CarsonExample(name='Wave antenna, low rho (Carson 1926 p. 552)', a=0.4, theta=0.0, P_expected=0.323, Q_expected=0.871, abs_tolerance=0.02, rel_tolerance=0.03, source='Carson 1926, Bell STJ 5(4), §V, p. 552')

Carson's wave-antenna example (1926, §V, p. 552) at a = 0.4, theta = 0.

The intermediate regime of the Carson series; reference value J = 0.323 + j 0.871 as printed by Carson (a modern evaluation gives Q ≈ 0.853, hence the 3 % relative tolerance).

CarsonExample dataclass

CarsonExample(name: str, a: float, theta: float, P_expected: float, Q_expected: float, abs_tolerance: float = 0.0, rel_tolerance: float = 0.05, source: str = '')

One worked example for the Carson series test suite.

Attributes:

Name Type Description
name str

Human-readable label.

a float

Carson parameter \(a = D \sqrt{\omega\mu_0\sigma}\).

theta float

Carson angle \(\theta\) in radians (\(\theta = 0\) for the self-impedance case, \(\arctan(d/(h_i+h_j))\) for mutual).

P_expected float

Reference value for the real part \(P\) of the Carson integral \(J = P + jQ\).

Q_expected float

Reference value for the imaginary part \(Q\) of \(J\).

abs_tolerance float

Absolute tolerance on \(P\) and \(Q\) against which the implementation is compared (default 0.0).

rel_tolerance float

Relative tolerance on \(P\) and \(Q\) (default 0.05). The test passes if either bound is met.

source str

Bibliographic source.

all_examples

all_examples() -> tuple[CarsonExample, ...]

Return all Carson reference examples used by the test suite.

Returns:

Type Description
tuple of CarsonExample

The three Carson 1926 worked examples followed by the four regression anchors of TLEIS_TAB_3_2.

Source code in src/groundfield/references/carson.py
def all_examples() -> tuple[CarsonExample, ...]:
    """Return all Carson reference examples used by the test suite.

    Returns
    -------
    tuple of CarsonExample
        The three Carson 1926 worked examples followed by the four
        regression anchors of :data:`TLEIS_TAB_3_2`.
    """
    return (
        WAVE_ANTENNA_HIGH_RHO,
        WAVE_ANTENNA_LOW_RHO,
        RAILWAY_25HZ,
        *TLEIS_TAB_3_2,
    )

earth_return

Carson earth-return line-impedance reference (per unit length).

Closed-form series impedance of a conductor with earth return, as derived by Carson (1926) and reproduced in every power-system textbook. It is the engineering-level (Ω/km) companion to the dimensionless Carson integral tabulated in groundfield.references.carson, and the reference against which the assembled Sommerfeld/Pollaczek earth-return stack (earth_inductive_model="sommerfeld") is benchmarked in tests/test_earth_return_benchmark.py and notebooks/45_earth_return_line_impedance.ipynb.

Mathematical background

For a thin conductor of geometric mean radius \(\mathrm{GMR}\) above or below a homogeneous earth of resistivity \(\rho\), carrying a current that returns through the earth, Carson's series impedance per unit length at angular frequency \(\omega = 2\pi f\) is

\[ Z'_\text{self} = \underbrace{\frac{\omega\mu_0}{8}}_{R'_\text{earth}} + j\,\frac{\omega\mu_0}{2\pi}\,\ln\!\frac{D_e}{\mathrm{GMR}}, \qquad Z'_\text{mutual} = \frac{\omega\mu_0}{8} + j\,\frac{\omega\mu_0}{2\pi}\,\ln\!\frac{D_e}{d_{ij}}, \]

where \(d_{ij}\) is the conductor–conductor separation and

\[ D_e = 658.87\,\sqrt{\rho / f}\ \text{[m]} \]

is Carson's equivalent earth-return depth — the depth of the fictitious return conductor that reproduces the earth's inductive effect. Two features carry the physics:

  • the earth-return resistance \(R'_\text{earth} = \omega\mu_0/8\) (\(\approx 0.0493\) Ω/km at 50 Hz) is independent of the soil resistivity — it is the loss of the return current spreading through the earth;
  • the equivalent depth \(D_e \propto \sqrt{\rho/f}\) shrinks with frequency and grows with soil resistivity — a more resistive or lower-frequency earth lets the return current spread deeper and wider. The earth-return reactance \(X' = (\omega\mu_0/2\pi)\ln(D_e/\mathrm{GMR})\) therefore increases with soil resistivity and also increases with frequency: the \(\omega\) prefactor dominates the shrinking logarithm, so \(X'\) rises almost linearly with \(f\) (1000 Ω·m, GMR = 7 mm: 0.814 mΩ/m at 50 Hz → 14.39 mΩ/m at 1 kHz, a 17.7× rise over a 20× frequency step).

Internal-inductance convention (review pass 10, finding 10.46). The formulas here are external to the conductor for a given \(\mathrm{GMR}\). The assembled inductive stack of groundfield adds the DC internal inductance \(\mu_0/(8\pi)\) per metre of a solid round conductor to every self term by default (groundfield.coupling.inductance.thin_wire_self_inductance(), include_internal=True), so a like-for-like comparison uses \(\mathrm{GMR} = a\,e^{-1/4} = 0.7788\,a\); with GMR = a the stack sits 2.0–2.5 % above Carson's reactance (100 Ω·m at 50 Hz to 30 Ω·m at 1 kHz, 4 mm wire) for that reason alone. Use GMR = a together with include_internal=False. The frequency dependence of the internal impedance (skin effect) is groundfield.conductors.Conductor.internal_impedance_per_length().

References
  • Carson, J. R. (1926). Wave propagation in overhead wires with ground return. Bell Syst. Tech. J. 5(4), 539–554.
  • Tleis, N. D. (2008). Power Systems Modelling and Fault Analysis, Newnes, §3.2 (earth-return impedance, equivalent depth \(D_e\)).
  • Oeding, D. & Oswald, B. R. (2016). Elektrische Kraftwerke und Netze,
  • Aufl., Springer, §9.4.

MU_0 module-attribute

MU_0 = 4e-07 * math.pi

Vacuum permeability μ0 = 4π · 10⁻⁷ H/m (the conventional value).

carson_earth_return_resistance

carson_earth_return_resistance(frequency: float) -> float

Carson earth-return resistance per unit length \(\omega\mu_0/8\).

Independent of the soil resistivity. Returns Ω/m.

Parameters:

Name Type Description Default
frequency float

Frequency in Hz. Must be positive.

required

Returns:

Type Description
float

Earth-return resistance in Ω/m (\(\approx 4.93\times10^{-5}\) at 50 Hz, i.e. 0.0493 Ω/km).

Source code in src/groundfield/references/earth_return.py
def carson_earth_return_resistance(frequency: float) -> float:
    r"""Carson earth-return resistance per unit length :math:`\omega\mu_0/8`.

    Independent of the soil resistivity. Returns Ω/m.

    Parameters
    ----------
    frequency
        Frequency in Hz. Must be positive.

    Returns
    -------
    float
        Earth-return resistance in Ω/m (:math:`\approx 4.93\times10^{-5}`
        at 50 Hz, i.e. 0.0493 Ω/km).
    """
    _check_positive(frequency=frequency)
    return 2.0 * math.pi * frequency * MU_0 / 8.0

carson_equivalent_depth

carson_equivalent_depth(rho: float, frequency: float) -> float

Carson equivalent earth-return depth \(D_e = 658.87\sqrt{\rho/f}\).

Parameters:

Name Type Description Default
rho float

Soil resistivity in Ω·m. Must be positive.

required
frequency float

Frequency in Hz. Must be positive.

required

Returns:

Type Description
float

Equivalent depth in metres.

Source code in src/groundfield/references/earth_return.py
def carson_equivalent_depth(rho: float, frequency: float) -> float:
    r"""Carson equivalent earth-return depth :math:`D_e = 658.87\sqrt{\rho/f}`.

    Parameters
    ----------
    rho
        Soil resistivity in Ω·m. Must be positive.
    frequency
        Frequency in Hz. Must be positive.

    Returns
    -------
    float
        Equivalent depth in metres.
    """
    _check_positive(rho=rho, frequency=frequency)
    return 658.87 * math.sqrt(rho / frequency)

carson_mutual_impedance

carson_mutual_impedance(rho: float, frequency: float, *, separation: float) -> complex

Carson earth-return mutual impedance per unit length (Ω/m).

\(Z' = \omega\mu_0/8 + j\,(\omega\mu_0/2\pi)\ln(D_e/d)\), the per-unit-length coupling between two parallel conductors a horizontal distance separation apart, both closing through the earth. This is the impedance behind an induced voltage on a parallel measurement / pilot line — Carson's original railway-induction problem.

Parameters:

Name Type Description Default
rho float

Soil resistivity in Ω·m. Must be positive.

required
frequency float

Frequency in Hz. Must be positive.

required
separation float

Conductor–conductor distance in m. Must be positive.

required

Returns:

Type Description
complex

Mutual impedance \(R' + jX'\) in Ω/m.

Source code in src/groundfield/references/earth_return.py
def carson_mutual_impedance(
    rho: float, frequency: float, *, separation: float
) -> complex:
    r"""Carson earth-return **mutual** impedance per unit length (Ω/m).

    :math:`Z' = \omega\mu_0/8 + j\,(\omega\mu_0/2\pi)\ln(D_e/d)`, the
    per-unit-length coupling between two parallel conductors a horizontal
    distance ``separation`` apart, both closing through the earth. This is
    the impedance behind an induced voltage on a parallel measurement /
    pilot line — Carson's original railway-induction problem.

    Parameters
    ----------
    rho
        Soil resistivity in Ω·m. Must be positive.
    frequency
        Frequency in Hz. Must be positive.
    separation
        Conductor–conductor distance in m. Must be positive.

    Returns
    -------
    complex
        Mutual impedance :math:`R' + jX'` in Ω/m.
    """
    _check_positive(rho=rho, frequency=frequency, separation=separation)
    omega = 2.0 * math.pi * frequency
    r_earth = omega * MU_0 / 8.0
    d_e = carson_equivalent_depth(rho, frequency)
    x = omega * MU_0 / (2.0 * math.pi) * math.log(d_e / separation)
    return complex(r_earth, x)

carson_self_impedance

carson_self_impedance(rho: float, frequency: float, *, gmr: float) -> complex

Carson earth-return self impedance per unit length (Ω/m).

\(Z' = \omega\mu_0/8 + j\,(\omega\mu_0/2\pi)\ln(D_e/\mathrm{GMR})\), the external earth-return series impedance of a single conductor (no internal-conductor resistance or inductance).

Parameters:

Name Type Description Default
rho float

Soil resistivity in Ω·m. Must be positive.

required
frequency float

Frequency in Hz. Must be positive.

required
gmr float

Geometric mean radius of the conductor in m: the physical wire radius \(a\) for an external-inductance model, 0.7788·a to include the internal inductance of a solid round conductor (the convention of the assembled stack, see the module docstring). Must be positive.

required

Returns:

Type Description
complex

Series impedance \(R' + jX'\) in Ω/m.

Source code in src/groundfield/references/earth_return.py
def carson_self_impedance(rho: float, frequency: float, *, gmr: float) -> complex:
    r"""Carson earth-return **self** impedance per unit length (Ω/m).

    :math:`Z' = \omega\mu_0/8 + j\,(\omega\mu_0/2\pi)\ln(D_e/\mathrm{GMR})`,
    the external earth-return series impedance of a single conductor (no
    internal-conductor resistance or inductance).

    Parameters
    ----------
    rho
        Soil resistivity in Ω·m. Must be positive.
    frequency
        Frequency in Hz. Must be positive.
    gmr
        Geometric mean radius of the conductor in m: the physical wire
        radius :math:`a` for an external-inductance model, ``0.7788·a``
        to include the internal inductance of a solid round conductor
        (the convention of the assembled stack, see the module
        docstring). Must be positive.

    Returns
    -------
    complex
        Series impedance :math:`R' + jX'` in Ω/m.
    """
    _check_positive(rho=rho, frequency=frequency, gmr=gmr)
    omega = 2.0 * math.pi * frequency
    r_earth = omega * MU_0 / 8.0
    d_e = carson_equivalent_depth(rho, frequency)
    x = omega * MU_0 / (2.0 * math.pi) * math.log(d_e / gmr)
    return complex(r_earth, x)

pollaczek

Layered (Pollaczek/Sunde) earth-return line impedance reference.

The per-unit-length self and mutual impedances of conductors buried in a two-layer earth, as exact quasi-static spectral integrals. This is the layered, buried-conductor companion to groundfield.references.earth_return.carson_self_impedance(): where Carson gives the homogeneous equivalent-depth closed form, this gives the spectral integral over a stratified earth, and reduces to Pollaczek's homogeneous form for rho_1 == rho_2.

It is the analytic per-unit-length quantity that the assembled Sommerfeld/Pollaczek stack (earth_inductive_model="sommerfeld") does not expose directly — the assembled stack builds a PEEC segment inductance matrix, from which a single per-unit-length line impedance cannot be read back without an ill-defined return-path assumption. This closed integral form therefore both (a) serves callers that need a frequency- and layer-dependent series impedance belag z'(f) (e.g. a reduced nodal network of a distribution earthing system) and (b) gives groundfield an independent per-unit-length reference against which the assembled stack's earth-return reactance can be benchmarked.

Mathematical background

A line current at depth \(h\) in a two-layer earth (layer 1 of thickness \(h_1\) and resistivity \(\rho_1\) over a half-space \(\rho_2\), air above) has the quasi-static vector potential

\[ A(y, z) \propto K_0(\gamma_k R) + \int_0^\infty F(\lambda; z, h)\,\cos(\lambda y)\,d\lambda , \]

with \(\gamma_k^2 = j\omega\mu_0/\rho_k\) of the conductor's layer and \(u_k = \sqrt{\lambda^2 + \gamma_k^2}\). The spectral amplitude \(F\) follows exactly from the continuity of \(A\) and \(\partial A/\partial z\) at the soil surface and at the layer interface (Tsiamitros et al. 2005, Eq. 8). For a conductor in layer 1, with \(r_0 = (u_1-\lambda)/(u_1+\lambda)\) and \(K = (u_1-u_2)/(u_1+u_2)\),

\[ F = \frac{r_0 e^{-u_1(h+h')} + K e^{-u_1(2h_1-h-h')} + r_0 K\bigl[e^{-u_1(2h_1-h+h')} + e^{-u_1(2h_1+h-h')}\bigr]} {u_1\,\bigl(1 - r_0 K e^{-2u_1 h_1}\bigr)} , \]

and the per-unit-length self impedance is

\[ Z'_\text{self} = j\,\frac{\omega\mu_0}{2\pi}\left[ K_0(\gamma_1\,\mathrm{GMR}) + \int_0^\infty F(\lambda; h, h)\,d\lambda \right]. \]

Conductors in layer 2 and pairs in different layers use the corresponding generalised-reflection and transmission amplitudes (see _two_layer_amplitude()). For \(\rho_1 = \rho_2\) the form reduces to the homogeneous Pollaczek integral \(K_0(\gamma\,\mathrm{GMR}) - K_0(2\gamma h) + 2\int_0^\infty e^{-2hu}/(\lambda+u)\,d\lambda\).

Review pass 10 (finding 10.45) replaced two approximations of earlier releases:

  • the two-layer kernel used the surface wavenumber \(u_\text{eff}\) of the layered earth (Tagg/Sunde/Wait recursion, layered_effective_wavenumber()) in the buried exponent, \(e^{-2h u_\text{eff}}/(\lambda + u_\text{eff})\) — exact only for \(h \to 0\) or \(\rho_1 = \rho_2\); it missed the lower-interface term \(K e^{-2u_1(h_1-h)}\): \(R'\) −0.13…−0.5 % in band near an interface, −28.5 % at 1 MHz;
  • the head term was the small-argument form \(\ln(2h/\mathrm{GMR})\) of \(K_0(\gamma\,\mathrm{GMR}) - K_0(2\gamma h)\): \(R'\) −0.15 % (1 m) and −0.99 % (3 m) at 30 Ω·m, 1 kHz — more than the documented "< 0.05 %".

Both are now exact at every frequency (quasi-static) for the same cost.

Note the exponent: for a conductor buried in the earth the vertical decay of the reflected field is governed by \(u_1\), not by \(\lambda\). The Laplace kernel \(e^{-2h\lambda}\) is Carson's air kernel, valid only for a conductor above the interface; using it below the interface under-counts \(R'\) and inverts the sign of its depth dependence (fixed in 0.15.0, pass-9 F09).

Internal-inductance convention. Like groundfield.references.earth_return, this returns the earth-return series impedance, external to the conductor, for the geometric mean radius gmr: pass gmr equal to the physical wire radius \(a\) for a pure external model, or \(a\,e^{-1/4} = 0.7788\,a\) to include the DC internal inductance \(\mu_0/(8\pi)\) of a solid round conductor — the convention of the assembled inductive stack (include_internal=True, the default of groundfield.coupling.inductance.thin_wire_self_inductance()).

Limiting cases (all covered by the regression tests):

  • rho_1 == rho_2 — homogeneous Pollaczek, which matches carson_self_impedance() to well under 1 % in the reactance across 50 Hz – 1 kHz; the earth-return resistance sits slightly above \(\omega\mu_0/8\) (Carson's low-frequency, surface-return limit) and rises with burial depth and with frequency.
  • h_1 → ∞ — upper layer only; h_1 → 0 (conductor in layer 2) — lower layer only.
  • two-layer — the reactance lies within the [carson(rho_1), carson(rho_2)] bracket, weighted toward the deeper, more conductive layer at low frequency.
References
  • Pollaczek, F. (1926). Über das Feld einer unendlich langen wechselstromdurchflossenen Einfachleitung. Elektr. Nachr.-Techn. 3, 339–359.
  • Sunde, E. D. (1949). Earth Conduction Effects in Transmission Systems, Van Nostrand, §§ 3–4 (buried-conductor earth-return, layered surface impedance).
  • Wait, J. R. (1970). Electromagnetic Waves in Stratified Media, §2.
  • Tsiamitros, D. A. et al. (2005). Earth return path impedances of underground cables for the two-layer earth case. IEEE Trans. Power Delivery 20(3), 2174–2181 (Eq. 8).

layered_effective_wavenumber

layered_effective_wavenumber(lam: float, rho_1: float, rho_2: float, h_1: float, omega: float) -> complex

Effective vertical wavenumber \(u_\text{eff}(\lambda)\) of a two-layer earth.

The Tagg/Sunde/Wait tanh-recursion surface term: the input wavenumber of the layered earth seen from the surface (it sets the surface reflection coefficient \((u_\text{eff}-\lambda)/ (u_\text{eff}+\lambda)\) of an overhead conductor). It is not the exponent of a buried conductor's kernel — the self and mutual impedances of this module use the exact buried amplitude since review pass 10 (finding 10.45). Reduces to the homogeneous half-space value \(u_1\) when rho_1 == rho_2, to \(u_1\) as h_1 → ∞ and to \(u_2\) as h_1 → 0. Units: 1/m.

Parameters:

Name Type Description Default
lam float

Spectral (Hankel) variable, 1/m.

required
rho_1 float

Upper / lower layer resistivity in Ω·m.

required
rho_2 float

Upper / lower layer resistivity in Ω·m.

required
h_1 float

Upper-layer thickness in m.

required
omega float

Angular frequency in rad/s.

required

Returns:

Type Description
complex

Effective wavenumber \(u_\text{eff}\) in 1/m.

Source code in src/groundfield/references/pollaczek.py
def layered_effective_wavenumber(
    lam: float, rho_1: float, rho_2: float, h_1: float, omega: float
) -> complex:
    r"""Effective vertical wavenumber :math:`u_\text{eff}(\lambda)` of a two-layer earth.

    The Tagg/Sunde/Wait tanh-recursion surface term: the input
    wavenumber of the layered earth seen from the **surface** (it sets the
    surface reflection coefficient :math:`(u_\text{eff}-\lambda)/
    (u_\text{eff}+\lambda)` of an overhead conductor). It is not the
    exponent of a buried conductor's kernel — the self and mutual
    impedances of this module use the exact buried amplitude since review
    pass 10 (finding 10.45). Reduces to the homogeneous half-space value :math:`u_1` when
    ``rho_1 == rho_2``, to :math:`u_1` as ``h_1 → ∞`` and to :math:`u_2`
    as ``h_1 → 0``. Units: 1/m.

    Parameters
    ----------
    lam
        Spectral (Hankel) variable, 1/m.
    rho_1, rho_2
        Upper / lower layer resistivity in Ω·m.
    h_1
        Upper-layer thickness in m.
    omega
        Angular frequency in rad/s.

    Returns
    -------
    complex
        Effective wavenumber :math:`u_\text{eff}` in 1/m.
    """
    u1 = cmath.sqrt(lam * lam + 1j * omega * MU_0 / rho_1)
    if rho_1 == rho_2:
        return u1
    u2 = cmath.sqrt(lam * lam + 1j * omega * MU_0 / rho_2)
    t = cmath.tanh(u1 * h_1)
    return u1 * (u2 + u1 * t) / (u1 + u2 * t)

loop_impedance_conductor_earth

loop_impedance_conductor_earth(rho_1: float, rho_2: float, h_1: float, frequency: float, *, depth: float, gmr: float, r_internal: float) -> complex

Conductor–earth loop impedance per unit length (Ω/m), ideal termination.

The series impedance seen by a current that flows out along a buried earthing conductor — a cable PEN, a cable screen — and returns through the earth, with the earthing electrodes at both ends idealised as \(\approx 0\,\Omega\):

\[ z'_\text{loop} = \underbrace{R'_\text{internal}}_{\text{conductor}} + \underbrace{Z'_\text{earth-return}}_{\text{Pollaczek self}} = R'_\text{internal} + Z'_\text{self}(\rho_1, \rho_2, h_1, f;\, \text{depth}, \text{gmr}). \]

This is the "go along the conductor, return through the soil" loop that governs earth-fault current sharing and the reach of an earthing system connected through cable PENs / screens — the quantity a bare earth-return impedance (pollaczek_self_impedance()) does not give on its own, because it omits the conductor's own series resistance.

Convention. The earth-return term carries the external inductance and, through gmr, the conductor's internal inductance: for a solid round conductor pass gmr = 0.7788·a = a·e^{-1/4} (a the physical radius), which already includes the internal inductance \(\mu_0/(8\pi)\); for a thin tubular / wire screen pass gmr equal to the screen radius (negligible internal inductance). r_internal is the conductor's series resistance per unit length — its DC / IEC 60228 value, or a skin-corrected AC value near the top of the band. With the ideal (\(\approx 0\,\Omega\)) earthing at both ends the loop impedance of a line of length \(\ell\) is simply \(z'_\text{loop}\,\ell\); a real earthing resistance \(R_E\) at the terminations adds in series on top of that.

Parameters:

Name Type Description Default
rho_1 float

Two-layer earth resistivities (Ω·m), upper-layer thickness (m) and frequency (Hz), exactly as in pollaczek_self_impedance(). Set rho_1 == rho_2 for a homogeneous earth.

required
rho_2 float

Two-layer earth resistivities (Ω·m), upper-layer thickness (m) and frequency (Hz), exactly as in pollaczek_self_impedance(). Set rho_1 == rho_2 for a homogeneous earth.

required
h_1 float

Two-layer earth resistivities (Ω·m), upper-layer thickness (m) and frequency (Hz), exactly as in pollaczek_self_impedance(). Set rho_1 == rho_2 for a homogeneous earth.

required
frequency float

Two-layer earth resistivities (Ω·m), upper-layer thickness (m) and frequency (Hz), exactly as in pollaczek_self_impedance(). Set rho_1 == rho_2 for a homogeneous earth.

required
depth float

Burial depth of the conductor in m. Must be positive.

required
gmr float

Geometric mean radius in m — 0.7788·a for a solid round conductor, the screen radius for a tubular / wire screen. Must be positive.

required
r_internal float

Conductor series resistance per unit length in Ω/m. Must be non-negative.

required

Returns:

Type Description
complex

Loop series impedance \(R'_\text{loop} + jX'_\text{loop}\) in Ω/m. Multiply by the line length for the terminated loop impedance.

Raises:

Type Description
ValueError

If rho_1, rho_2, h_1, frequency, depth or gmr is not positive and finite, or if r_internal is negative.

Notes

Earth-return path only: no mutual coupling to a parallel conductor, and no internal skin-effect model (pass a skin-corrected r_internal if that matters at the top of the band). A conductor–conductor loop (e.g. line–PEN at a fixed spacing) has its return-path reactance set by that spacing, not by the earth-return depth, and is much smaller — this function is specifically the conductor–earth loop.

Examples:

>>> import math
>>> a = math.sqrt(150e-6 / math.pi)          # 150 mm^2 solid-round radius
>>> z = loop_impedance_conductor_earth(       # NAYY PEN, 100 Ohm.m, 50 Hz
...     100.0, 100.0, 10.0, 50.0,
...     depth=0.7, gmr=0.7788 * a, r_internal=0.206e-3)
>>> round(z.real * 1e3, 3), round(z.imag * 1e3, 3)  # mOhm/m -> Ohm/km
(0.255, 0.758)
Source code in src/groundfield/references/pollaczek.py
def loop_impedance_conductor_earth(
    rho_1: float,
    rho_2: float,
    h_1: float,
    frequency: float,
    *,
    depth: float,
    gmr: float,
    r_internal: float,
) -> complex:
    r"""Conductor–earth loop impedance per unit length (Ω/m), ideal termination.

    The series impedance seen by a current that flows out along a buried
    earthing conductor — a cable PEN, a cable screen — and returns through
    the earth, with the earthing electrodes at both ends idealised as
    :math:`\approx 0\,\Omega`:

    .. math::

        z'_\text{loop}
        = \underbrace{R'_\text{internal}}_{\text{conductor}}
          + \underbrace{Z'_\text{earth-return}}_{\text{Pollaczek self}}
        = R'_\text{internal}
          + Z'_\text{self}(\rho_1, \rho_2, h_1, f;\, \text{depth}, \text{gmr}).

    This is the "go along the conductor, return through the soil" loop that
    governs earth-fault current sharing and the reach of an earthing system
    connected through cable PENs / screens — the quantity a bare
    earth-return impedance (:func:`pollaczek_self_impedance`) does not give
    on its own, because it omits the conductor's own series resistance.

    Convention. The earth-return term carries the external inductance and,
    **through** ``gmr``, the conductor's internal inductance: for a solid
    round conductor pass ``gmr = 0.7788·a = a·e^{-1/4}`` (``a`` the physical
    radius), which already includes the internal inductance
    :math:`\mu_0/(8\pi)`; for a thin tubular / wire screen pass ``gmr`` equal
    to the screen radius (negligible internal inductance). ``r_internal`` is
    the conductor's series resistance per unit length — its DC / IEC 60228
    value, or a skin-corrected AC value near the top of the band. With the
    ideal (:math:`\approx 0\,\Omega`) earthing at both ends the loop
    impedance of a line of length :math:`\ell` is simply
    :math:`z'_\text{loop}\,\ell`; a real earthing resistance :math:`R_E` at
    the terminations adds in series on top of that.

    Parameters
    ----------
    rho_1, rho_2, h_1, frequency
        Two-layer earth resistivities (Ω·m), upper-layer thickness (m) and
        frequency (Hz), exactly as in :func:`pollaczek_self_impedance`.
        Set ``rho_1 == rho_2`` for a homogeneous earth.
    depth
        Burial depth of the conductor in m. Must be positive.
    gmr
        Geometric mean radius in m — ``0.7788·a`` for a solid round
        conductor, the screen radius for a tubular / wire screen. Must be
        positive.
    r_internal
        Conductor series resistance per unit length in Ω/m. Must be
        non-negative.

    Returns
    -------
    complex
        Loop series impedance :math:`R'_\text{loop} + jX'_\text{loop}` in
        Ω/m. Multiply by the line length for the terminated loop impedance.

    Raises
    ------
    ValueError
        If ``rho_1``, ``rho_2``, ``h_1``, ``frequency``, ``depth`` or
        ``gmr`` is not positive and finite, or if ``r_internal`` is
        negative.

    Notes
    -----
    Earth-return path only: no mutual coupling to a parallel conductor, and
    no internal skin-effect model (pass a skin-corrected ``r_internal`` if
    that matters at the top of the band). A conductor–conductor loop (e.g.
    line–PEN at a fixed spacing) has its return-path reactance set by that
    spacing, not by the earth-return depth, and is much smaller — this
    function is specifically the conductor–*earth* loop.

    Examples
    --------
    >>> import math
    >>> a = math.sqrt(150e-6 / math.pi)          # 150 mm^2 solid-round radius
    >>> z = loop_impedance_conductor_earth(       # NAYY PEN, 100 Ohm.m, 50 Hz
    ...     100.0, 100.0, 10.0, 50.0,
    ...     depth=0.7, gmr=0.7788 * a, r_internal=0.206e-3)
    >>> round(z.real * 1e3, 3), round(z.imag * 1e3, 3)  # mOhm/m -> Ohm/km
    (0.255, 0.758)
    """
    _check_positive(
        rho_1=rho_1,
        rho_2=rho_2,
        h_1=h_1,
        frequency=frequency,
        depth=depth,
        gmr=gmr,
    )
    if r_internal < 0.0:
        raise ValueError(f"r_internal must be non-negative, got {r_internal}")
    z_earth = pollaczek_self_impedance(
        rho_1,
        rho_2,
        h_1,
        frequency,
        depth=depth,
        gmr=gmr,
    )
    return complex(r_internal, 0.0) + z_earth

pollaczek_mutual_impedance

pollaczek_mutual_impedance(rho_1: float, rho_2: float, h_1: float, frequency: float, *, depth_i: float, depth_j: float, separation: float) -> complex

Layered Pollaczek earth-return mutual impedance per unit length (Ω/m).

The per-unit-length coupling impedance between two parallel buried conductors — each closing its current through the earth — over a two-layer earth, in the same exact spectral form as pollaczek_self_impedance():

\[ Z'_\text{M} = j\,\frac{\omega\mu_0}{2\pi}\left[ K_0(\gamma_k d) + \int_0^\infty F(\lambda; h_i, h_j)\cos(\lambda x)\,d\lambda \right], \]

with the horizontal separation \(x\), the direct distance \(d = \sqrt{x^2 + (h_i - h_j)^2}\), \(\gamma_k\) of the common layer and the exact two-layer amplitude \(F\) (module docstring). For two conductors in different layers there is no direct \(K_0\) term and \(F\) is the transmitted amplitude. In the homogeneous case the bracket is \(K_0(\gamma d) - K_0(\gamma D) + 2\int_0^\infty e^{-(h_i+h_j)u}/(\lambda + u)\cos(\lambda x)\,d\lambda\) with \(D = \sqrt{x^2 + (h_i + h_j)^2}\).

This is the mutual (off-diagonal) counterpart of pollaczek_self_impedance(): the coupling that induces a voltage on a parallel earthing conductor / cable through the shared earth-return path — the term a self impedance alone omits. It carries no internal-conductor term (the two conductors are galvanically separate; the coupling is purely inductive through the soil), so with ideal (\(\approx 0\,\Omega\)) earthing at both ends the coupling impedance of a parallel run of length \(\ell\) is \(Z'_\text{M}\,\ell\). Together with two self impedances it forms the \(2\times2\) loop impedance matrix of the coupled pair.

Limiting behaviour (covered by the tests): it reduces to the homogeneous Carson mutual impedance (carson_mutual_impedance()) when \(\rho_1 = \rho_2\) (reactance to well under 1 % at low frequency), its magnitude is below the self impedance and decays monotonically with the separation \(x\), and its two-layer reactance lies within the two homogeneous Carson bounds, deep-layer dominated at low frequency.

Parameters:

Name Type Description Default
rho_1 float

Two-layer earth resistivities (Ω·m), upper-layer thickness (m) and frequency (Hz), as in pollaczek_self_impedance(). Set rho_1 == rho_2 for a homogeneous earth.

required
rho_2 float

Two-layer earth resistivities (Ω·m), upper-layer thickness (m) and frequency (Hz), as in pollaczek_self_impedance(). Set rho_1 == rho_2 for a homogeneous earth.

required
h_1 float

Two-layer earth resistivities (Ω·m), upper-layer thickness (m) and frequency (Hz), as in pollaczek_self_impedance(). Set rho_1 == rho_2 for a homogeneous earth.

required
frequency float

Two-layer earth resistivities (Ω·m), upper-layer thickness (m) and frequency (Hz), as in pollaczek_self_impedance(). Set rho_1 == rho_2 for a homogeneous earth.

required
depth_i float

Burial depths of the two conductors in m. Must be positive.

required
depth_j float

Burial depths of the two conductors in m. Must be positive.

required
separation float

Horizontal centre-to-centre distance \(x\) between the conductors in m. Must be non-negative; separation == 0 is allowed only when depth_i != depth_j (one conductor directly above the other). Coincident conductors (separation == 0 and depth_i == depth_j) are the self case — use pollaczek_self_impedance().

required

Returns:

Type Description
complex

Mutual series impedance \(R'_\text{M} + jX'_\text{M}\) in Ω/m.

Notes

Earth-return coupling only: quasi-static, no displacement current. The vertical decay in the soil is governed by \(u_1\), not by Carson's air kernel \(e^{-(h_i+h_j)\lambda}\). As \(x \to \mathrm{GMR}\) with \(depth_i = depth_j\) it recovers pollaczek_self_impedance().

Raises:

Type Description
ValueError

If rho_1, rho_2, h_1, frequency, depth_i or depth_j is not positive and finite, if separation is negative, or if the two conductors coincide (separation == 0 and depth_i == depth_j).

Source code in src/groundfield/references/pollaczek.py
def pollaczek_mutual_impedance(
    rho_1: float,
    rho_2: float,
    h_1: float,
    frequency: float,
    *,
    depth_i: float,
    depth_j: float,
    separation: float,
) -> complex:
    r"""Layered Pollaczek earth-return **mutual** impedance per unit length (Ω/m).

    The per-unit-length coupling impedance between two parallel buried
    conductors — each closing its current through the earth — over a
    two-layer earth, in the same exact spectral form as
    :func:`pollaczek_self_impedance`:

    .. math::

        Z'_\text{M} = j\,\frac{\omega\mu_0}{2\pi}\left[
            K_0(\gamma_k d)
            + \int_0^\infty F(\lambda; h_i, h_j)\cos(\lambda x)\,d\lambda
        \right],

    with the horizontal separation :math:`x`, the direct distance
    :math:`d = \sqrt{x^2 + (h_i - h_j)^2}`, :math:`\gamma_k` of the common
    layer and the exact two-layer amplitude :math:`F` (module docstring).
    For two conductors in different layers there is no direct
    :math:`K_0` term and :math:`F` is the transmitted amplitude. In the
    homogeneous case the bracket is
    :math:`K_0(\gamma d) - K_0(\gamma D) + 2\int_0^\infty
    e^{-(h_i+h_j)u}/(\lambda + u)\cos(\lambda x)\,d\lambda` with
    :math:`D = \sqrt{x^2 + (h_i + h_j)^2}`.

    This is the mutual (off-diagonal) counterpart of
    :func:`pollaczek_self_impedance`: the coupling that induces a voltage on
    a parallel earthing conductor / cable through the shared earth-return
    path — the term a self impedance alone omits. It carries **no
    internal-conductor term** (the two conductors are galvanically separate;
    the coupling is purely inductive through the soil), so with ideal
    (:math:`\approx 0\,\Omega`) earthing at both ends the coupling impedance
    of a parallel run of length :math:`\ell` is :math:`Z'_\text{M}\,\ell`.
    Together with two self impedances it forms the :math:`2\times2` loop
    impedance matrix of the coupled pair.

    Limiting behaviour (covered by the tests): it reduces to the homogeneous
    Carson mutual impedance
    (:func:`~groundfield.references.earth_return.carson_mutual_impedance`)
    when :math:`\rho_1 = \rho_2` (reactance to well under 1 % at low
    frequency), its magnitude is below the self impedance and decays
    monotonically with the separation :math:`x`, and its two-layer reactance
    lies within the two homogeneous Carson bounds, deep-layer dominated at
    low frequency.

    Parameters
    ----------
    rho_1, rho_2, h_1, frequency
        Two-layer earth resistivities (Ω·m), upper-layer thickness (m) and
        frequency (Hz), as in :func:`pollaczek_self_impedance`. Set
        ``rho_1 == rho_2`` for a homogeneous earth.
    depth_i, depth_j
        Burial depths of the two conductors in m. Must be positive.
    separation
        Horizontal centre-to-centre distance :math:`x` between the
        conductors in m. Must be non-negative; ``separation == 0`` is
        allowed only when ``depth_i != depth_j`` (one conductor directly
        above the other). Coincident conductors (``separation == 0`` and
        ``depth_i == depth_j``) are the self case — use
        :func:`pollaczek_self_impedance`.

    Returns
    -------
    complex
        Mutual series impedance :math:`R'_\text{M} + jX'_\text{M}` in Ω/m.

    Notes
    -----
    Earth-return coupling only: quasi-static, no displacement current. The
    vertical decay in the soil is governed by :math:`u_1`, not by Carson's
    air kernel :math:`e^{-(h_i+h_j)\lambda}`. As :math:`x \to \mathrm{GMR}`
    with :math:`depth_i = depth_j` it recovers
    :func:`pollaczek_self_impedance`.

    Raises
    ------
    ValueError
        If ``rho_1``, ``rho_2``, ``h_1``, ``frequency``, ``depth_i`` or
        ``depth_j`` is not positive and finite, if ``separation`` is
        negative, or if the two conductors coincide (``separation == 0``
        and ``depth_i == depth_j``).
    """
    _check_positive(
        rho_1=rho_1,
        rho_2=rho_2,
        h_1=h_1,
        frequency=frequency,
        depth_i=depth_i,
        depth_j=depth_j,
    )
    if separation < 0.0:
        raise ValueError(f"separation must be non-negative, got {separation}")
    omega = 2.0 * math.pi * frequency
    x = separation
    d = math.hypot(x, depth_i - depth_j)
    if d <= 0.0:
        raise ValueError(
            "coincident conductors (separation == 0 and depth_i == depth_j); "
            "use pollaczek_self_impedance for the self case"
        )
    if rho_1 == rho_2:
        rho_2, h_1 = rho_1, max(h_1, 1e3 * max(depth_i, depth_j))
    same_layer = (depth_i < h_1) == (depth_j < h_1)
    head = 0.0j
    if same_layer:
        rho_k = rho_1 if depth_i < h_1 else rho_2
        gamma = cmath.sqrt(1j * omega * MU_0 / rho_k)
        head = complex(kv(0, gamma * d))
    integral = _spectral_integral(rho_1, rho_2, h_1, omega, depth_i, depth_j, x)
    return 1j * omega * MU_0 / (2.0 * math.pi) * (head + integral)

pollaczek_self_impedance

pollaczek_self_impedance(rho_1: float, rho_2: float, h_1: float, frequency: float, *, depth: float, gmr: float) -> complex

Layered Pollaczek earth-return self impedance per unit length (Ω/m).

Exact two-layer, buried-conductor series impedance \(Z' = R' + jX'\) (quasi-static), earth-return only — no internal conductor resistance; the internal inductance is included only through gmr (see the module docstring). Reduces to Pollaczek's homogeneous form for rho_1 == rho_2 and agrees with carson_self_impedance() in the reactance.

Parameters:

Name Type Description Default
rho_1 float

Upper / lower layer resistivity in Ω·m. Must be positive. Set equal for a homogeneous earth.

required
rho_2 float

Upper / lower layer resistivity in Ω·m. Must be positive. Set equal for a homogeneous earth.

required
h_1 float

Upper-layer thickness in m. Must be positive (ignored when rho_1 == rho_2).

required
frequency float

Frequency in Hz. Must be positive.

required
depth float

Burial depth of the conductor in m. Must be positive; a depth >= h_1 places the conductor in the lower layer.

required
gmr float

Geometric mean radius of the conductor in m: the physical wire radius for an external-inductance model, 0.7788·a to include the internal inductance of a solid round conductor. Must be positive.

required

Returns:

Type Description
complex

Earth-return series impedance \(R' + jX'\) in Ω/m.

Source code in src/groundfield/references/pollaczek.py
def pollaczek_self_impedance(
    rho_1: float,
    rho_2: float,
    h_1: float,
    frequency: float,
    *,
    depth: float,
    gmr: float,
) -> complex:
    r"""Layered Pollaczek earth-return **self** impedance per unit length (Ω/m).

    Exact two-layer, buried-conductor series impedance
    :math:`Z' = R' + jX'` (quasi-static), earth-return only — no internal
    conductor resistance; the internal inductance is included only through
    ``gmr`` (see the module docstring). Reduces to Pollaczek's homogeneous
    form for ``rho_1 == rho_2`` and agrees with
    :func:`carson_self_impedance` in the reactance.

    Parameters
    ----------
    rho_1, rho_2
        Upper / lower layer resistivity in Ω·m. Must be positive. Set
        equal for a homogeneous earth.
    h_1
        Upper-layer thickness in m. Must be positive (ignored when
        ``rho_1 == rho_2``).
    frequency
        Frequency in Hz. Must be positive.
    depth
        Burial depth of the conductor in m. Must be positive; a depth
        ``>= h_1`` places the conductor in the lower layer.
    gmr
        Geometric mean radius of the conductor in m: the physical wire
        radius for an external-inductance model, ``0.7788·a`` to include
        the internal inductance of a solid round conductor. Must be
        positive.

    Returns
    -------
    complex
        Earth-return series impedance :math:`R' + jX'` in Ω/m.
    """
    _check_positive(
        rho_1=rho_1,
        rho_2=rho_2,
        h_1=h_1,
        frequency=frequency,
        depth=depth,
        gmr=gmr,
    )
    omega = 2.0 * math.pi * frequency
    if rho_1 == rho_2:
        rho_2, h_1 = rho_1, max(h_1, 1e3 * depth)  # one layer: no interface term
    rho_k = rho_1 if depth < h_1 else rho_2
    gamma = cmath.sqrt(1j * omega * MU_0 / rho_k)
    head = complex(kv(0, gamma * gmr))
    integral = _spectral_integral(rho_1, rho_2, h_1, omega, depth, depth, 0.0)
    return 1j * omega * MU_0 / (2.0 * math.pi) * (head + integral)