Earthing
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.
Documentation
- User guide: installation, units, workflows, and examples.
- API reference: exported functions, parameters, return values, and
Networkmethods. - 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 (224 cases). Run:
python3 validation/run_validation.py
See validation/README.md for coverage, tolerances, discretisation guidance and the inconsistencies found in the standards.
Dependencies:
- Python 3
- Numpy
- Matplotlib
Metadata
Release files for earthing 2.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| earthing-2.0.2.tar.gz | 32.5 kB | With provenance | Details for earthing-2.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| earthing-2.0.2-py3-none-any.whl | Python 3 | none | any | Details for earthing-2.0.2-py3-none-any.whl |
Total release size: 63.3 kB
Release files / earthing-2.0.2.tar.gz
| Download URL | earthing-2.0.2.tar.gz |
|---|---|
| Size | 32.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4a5fc17c6c34169caa964cbe2e286ae09f1ddfe2b75029bd98becd549df3f776
|
|
BLAKE2b-256 checksum How to use checksums |
667768b3caaf9184e9e8acfb9919600a297db272f70cdb754ceec6b637198baf
|
| 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 logRelease files / earthing-2.0.2-py3-none-any.whl
| Download URL | earthing-2.0.2-py3-none-any.whl |
|---|---|
| Size | 30.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
505397c51dff4077cd2e6b3777f99a619abe89db651d672324aa292ed042e02f
|
|
BLAKE2b-256 checksum How to use checksums |
a04c5ba4607fa5885672449aeb0c34b3e4f27b6c1c4b7bfaa8254a489c166cb2
|
| 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 logSecurity for earthing 2.0.2
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.
Attestation for earthing-2.0.2.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 logA 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.