Skip to main content

Earthing

PyPI Release License

A python library for design of earthing networks in electrical substations.

Features

  • Earth grid design as per IEEE 80 / ENA EREC S34.
  • Electrode resistance by IEEE formulae where available, with ENA EREC S34 and IS 3043 alternatives:
    • grid (IEEE 80 Eq. 52) and grid with rods (Schwarz, IEEE 80 Eqs. 53-56; or ENA S34 R4-R6);
    • rod (IEEE 80 / ENA S34 R1), strip and plate (Dwight, IEEE 142; or ENA S34 R7, R2).
  • Mesh and step voltage for rectangular, L-shaped and irregular grids (IEEE 80), with perimeter or interior rods.
  • Permissible touch and step voltage: IEEE 80 (50 kg and 70 kg) and ENA TS 41-24 Tables 1 and 2.
  • Surface, touch and step potential formulae of ENA EREC S34 (P1-P7).
  • Electrode current density limits: ENA S34 C2 (default), IS 3043 and IEEE 142.
  • Numerical earth network calculations using boundary discretisation method, validated against the EPRI results of IEEE 80 Annex B Examples 1-4.
  • 3D plotting of electrode geometry used for design.
  • 3D plotting of current density distribution for the earth network.
  • 2D/3D plotting of surface potential distribution.
  • Plotting and evaluation of mesh and step potentials.

Problem geometry Problem geometry solved Surface potential distribuion Mesh voltage profile Step voltage profile

Documentation

  • User guide: installation, units, workflows, and examples.
  • API reference: exported functions, parameters, return values, and Network methods.
  • Validation: checks against IEEE Std 80-2000, ENA EREC S34, ENA TS 41-24, IS 3043:2018 and IEEE Std 142 worked examples and tables, with the latest report.

Usage

Package is available on PyPI for installation (https://pypi.org/project/earthing). Use python3 -m pip install earthing to install.

Program source includes detailed usage instructions for various functions and classes. Alternately project page has ipython notebooks covering typical use cases.

from earthing import resistance_grid_with_rods, e_mesh_step_grid, e_touch_70

# 70 m x 70 m grid, 11 x 11 conductors (d = 10 mm) at 0.5 m, 20 rods x 7.5 m
R = resistance_grid_with_rods(400, 4900, 1540, 7.5, 20, 14, 0.016, None, b=0.01)
Em, Es = e_mesh_step_grid(400, 70, 70, 7.5, 11, 11, 20, 0.01, 0.5, 1908)
print(R, Em, Es, e_touch_70(400, 2500, 0.102, 0.5))

Changes in defaults

Recent versions changed some default formulae. Pass method= to keep the earlier behaviour:

Function New default Earlier formula
resistance_grid_with_rods 'IEEE80' (Schwarz) method='S34'
resistance_plate 'IEEE142' (Dwight) method='S34'
resistance_strip 'IEEE142' (Dwight) IS 3043:1987 (removed); method='S34' for ENA S34 R7 / IS 3043:2018
max_current_density 'S34' (Formula C2) method='IS3043'

Descrete* classes and descretise() are renamed Discrete* and discretise(); the old names still work with a DeprecationWarning.

Validation

validation/ checks the package against worked examples and tables of IEEE Std 80-2000, ENA EREC S34, ENA TS 41-24, IS 3043:2018 and IEEE Std 142 (231 cases). Run:

python3 validation/run_validation.py

See validation/README.md for coverage, tolerances, solver step-size guidance and the issues found in the standards.

Dependencies:

  • Python 3
  • Numpy
  • Matplotlib

Metadata

Release files for earthing 2.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for earthing 2.0.3
File Size Uploaded Provenance Actions
earthing-2.0.3.tar.gz 32.7 kB With provenance Details for earthing-2.0.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for earthing 2.0.3
File Interpreter ABI Platform Actions
earthing-2.0.3-py3-none-any.whl Python 3 none any Details for earthing-2.0.3-py3-none-any.whl

Total release size: 63.7 kB

Release files / earthing-2.0.3.tar.gz

Download URL earthing-2.0.3.tar.gz
Size 32.7 kB
Tags Source
SHA-256 checksum
How to use checksums
bde74371c970d40a5c38dc876f50222db88d706a4d04a0f595c6e342e3f2795d
BLAKE2b-256 checksum
How to use checksums
94982819b3ae0647f21fc3500e7385e0f48c245bd59a2cf7001a5e9754bbbc16
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 18, 2026.

Transparency log

Release files / earthing-2.0.3-py3-none-any.whl

Download URL earthing-2.0.3-py3-none-any.whl
Size 31.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9eb9cf813b663d08bd70b134d1ad685d09387b1bffdc95d8160dee28f2df93cc
BLAKE2b-256 checksum
How to use checksums
831c7d0253d62c27c77d6f485c941f08d854584cfbfe6264b063b2d6a4b95d4a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 18, 2026.

Transparency log

Security for earthing 2.0.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for earthing-2.0.3.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 18, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page