Numerical field computation for grounding systems (PDE / field model, coupling to groundinsight)
Project description
groundfield
Numerical field computation for grounding systems.
groundfield is an open-source Python package for the physical
reference modelling of networked grounding systems. Within the
groundmeas / groundinsight / groundfield software family,
groundfield covers the field-theoretical side: soil models,
electrode geometries, conductors and their couplings are formulated
as a 3-D problem in the soil and solved numerically. Field profiles,
potential curves and current distributions are reduced to equivalent
rho-f models that can be handed over to groundinsight as a
BusType. See the documentation
for full details.
- Documentation: https://ce1ectric.github.io/groundfield/
- Source code: https://github.com/Ce1ectric/groundfield
- Issue tracker: https://github.com/Ce1ectric/groundfield/issues
Position within the software family
groundmeas ──▶ groundinsight ◀── groundfield
(measurement) (reduced network (field model,
model) PDE reference)
groundfield provides the physically grounded reference model from
which reduced impedance and multi-port representations are derived.
These travel into groundinsight as BusType / BranchType
formulas where they can be reconciled with measurement data from
groundmeas.
Scope
groundfield covers layered soil (two-layer and multi-layer models),
typical electrode geometries (ring, strip, rod, foundation, mesh),
conductors, cable shields and PEN with their mutual coupling, the
Carson 1926 and rigorous Sommerfeld earth-return corrections, cross-
layer electrodes, current and potential distribution in the soil, the
influence of the measurement geometry on the grounding-measurement
result, and the derivation of reduced rho-f models for
groundinsight. See the scope and concepts page
for the full list with references to the underlying ADRs.
What's new
groundfield follows Keep a Changelog
and Semantic Versioning. See the
changelog for the
full release history and the forward-looking roadmap.
Recent highlights:
- 0.12 —
PolylineElectrode. Foundation rings follow the real building outline (a closed polyline) instead of the oriented bounding rectangle, removing the perimeter bias and the coincident-conductor artefacts that appear at AP1 scale. - 0.11 — one-shot mutual grounding-impedance matrix plus an audit-driven hardening of the inductive (Carson / Sommerfeld / Neumann) and cross-layer stacks.
- 0.7 —
OrtsnetzLayout. Imperative TN-Ortsnetz builder with a Manhattan-routed PEN router and a simulated fall-of-potential measurement.
Installation
groundfield requires Python 3.12 or newer.
git clone https://github.com/Ce1ectric/groundfield.git
cd groundfield
poetry install
For OSM-driven building footprints (ADR-0011), enable the optional
geo extra (pulls in requests, shapely, pyproj):
pip install groundfield[geo]
# or, from a Poetry checkout
poetry install --extras geo
The documentation extras live in an optional Poetry group:
poetry install --with docs
Quickstart
import groundfield as gf
soil = gf.TwoLayerSoil(rho_1=100.0, rho_2=500.0, h_1=2.0)
world = gf.create_world(soil=soil)
gf.create_electrode(
world, "ring", name="g1",
center=(0.0, 0.0, 0.8), radius=5.0, wire_radius=0.005,
)
gf.create_source(world, attached_to="g1", magnitude=1.0)
engine = gf.create_engine(backend="image",
frequencies=[50.0, 150.0, 250.0])
result = world.solve(engine)
print(result.cluster_impedance("g1"))
backend="image" auto-dispatches to the matching layered backend.
The full backend list, the rho-f export to groundinsight and
the TnNetworkGenerator are documented in
Quickstart
and the examples gallery.
Guiding principles
- The PDE / field model is a reference, not the end product. The solver must be instrumented so that every solution can be reduced to an identification-friendly form.
- Measurability before accuracy. The relevant frequency range is < 1 kHz; this allows simplified soil models and fast solvers.
- Grey-box, not black-box. Geometric and material inputs stay visible; only the parts that are not physically prescribed are identified.
Development
# Tests with coverage
poetry run pytest --cov=groundfield
# Formatting
poetry run black src tests scripts
# Local documentation
poetry install --with docs
poetry run mkdocs serve
Releases are triggered through the Poetry script. It updates the
version in pyproject.toml, src/groundfield/__init__.py, and
CITATION.cff, moves the [Unreleased] block of CHANGELOG.md into
a new section, and creates an annotated tag.
poetry run release patch
poetry run release minor
poetry run release major
poetry run release set 1.2.3
Citing
If you use groundfield in academic work, please cite according to
the metadata in CITATION.cff.
License
groundfield is released under the MIT license.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file groundfield-0.14.0.tar.gz.
File metadata
- Download URL: groundfield-0.14.0.tar.gz
- Upload date:
- Size: 328.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f84c7c52cb8ca030aa0abc5693bbc7cca9c15ddb2867560353ddaaef23cce3cb
|
|
| MD5 |
683a026f233772f21f4591dbc0af1ac8
|
|
| BLAKE2b-256 |
f48e9c0449d4d15f451309080f9273b662304fec072b14d12636241a91091b2a
|
Provenance
The following attestation bundles were made for groundfield-0.14.0.tar.gz:
Publisher:
release.yml on Ce1ectric/groundfield
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
groundfield-0.14.0.tar.gz -
Subject digest:
f84c7c52cb8ca030aa0abc5693bbc7cca9c15ddb2867560353ddaaef23cce3cb - Sigstore transparency entry: 2207612242
- Sigstore integration time:
-
Permalink:
Ce1ectric/groundfield@428442d3f879ac9c8c4994d4eff0195cdd721acb -
Branch / Tag:
refs/tags/v0.14.0 - Owner: https://github.com/Ce1ectric
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@428442d3f879ac9c8c4994d4eff0195cdd721acb -
Trigger Event:
push
-
Statement type:
File details
Details for the file groundfield-0.14.0-py3-none-any.whl.
File metadata
- Download URL: groundfield-0.14.0-py3-none-any.whl
- Upload date:
- Size: 391.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b7547d466ff696f03a0a250f7dae948765cf609a6c94e2f0c5fe3f93d314ab23
|
|
| MD5 |
2f8c1eb6ed0139e0442664facb5751e1
|
|
| BLAKE2b-256 |
c7b174dad51091b8f69e051e7efd814561ab196896cdb56696b79685b7016287
|
Provenance
The following attestation bundles were made for groundfield-0.14.0-py3-none-any.whl:
Publisher:
release.yml on Ce1ectric/groundfield
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
groundfield-0.14.0-py3-none-any.whl -
Subject digest:
b7547d466ff696f03a0a250f7dae948765cf609a6c94e2f0c5fe3f93d314ab23 - Sigstore transparency entry: 2207612275
- Sigstore integration time:
-
Permalink:
Ce1ectric/groundfield@428442d3f879ac9c8c4994d4eff0195cdd721acb -
Branch / Tag:
refs/tags/v0.14.0 - Owner: https://github.com/Ce1ectric
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@428442d3f879ac9c8c4994d4eff0195cdd721acb -
Trigger Event:
push
-
Statement type: