Skip to main content

surge_network/network/
grounding.rs

1// SPDX-License-Identifier: LicenseRef-PolyForm-Noncommercial-1.0.0
2//! Neutral-point grounding impedance types for zero-sequence network construction.
3
4use serde::{Deserialize, Serialize};
5
6/// A neutral-point grounding impedance entry from CGMES `Ground`,
7/// `GroundingImpedance`, or `PetersenCoil` equipment.
8///
9/// - `Ground`: solid earthing — `x_ohm = 0`, no min/max.
10/// - `GroundingImpedance`: fixed neutral reactor — `x_ohm` from `GroundingImpedance.x`.
11/// - `PetersenCoil`: arc-suppression coil — `x_ohm` from `xGroundNominal`,
12///   with optional `x_min_ohm`/`x_max_ohm` tuning range from `xGroundMin`/`xGroundMax`.
13///
14/// Not used in positive-sequence power flow — reserved for zero-seq / 3-phase solver.
15#[derive(Debug, Clone, Default, Serialize, Deserialize)]
16pub struct GroundingEntry {
17    /// Bus number where the grounding equipment is connected.
18    pub bus: u32,
19    /// Grounding reactance in Ohm (0.0 for solid earth).
20    pub x_ohm: f64,
21    /// PetersenCoil minimum tuning reactance (Ohm). None for solid ground or fixed impedance.
22    pub x_min_ohm: Option<f64>,
23    /// PetersenCoil maximum tuning reactance (Ohm). None for solid ground or fixed impedance.
24    pub x_max_ohm: Option<f64>,
25}