AgentSkillsCN

power-systems-modeling

涵盖热评级模型(CIGRE TB 601、IEEE 738)、导线温度限值、悬链线物理(弧垂、张力、净空距离)、电气特性(电阻、电抗),以及标准合规性(CIGRE、IEEE、IEC)。在实施热模型、计算导线物理,或当用户询问“CIGRE 方程有哪些?”或“如何验证这一计算结果?”时,可加以应用。

SKILL.md
--- frontmatter
name: power-systems-modeling
description: >-
  Covers thermal rating models (CIGRE TB 601, IEEE 738), conductor temperature
  limits, catenary physics (sag, tension, clearance), electrical properties
  (resistance, reactance), and standards compliance (CIGRE, IEEE, IEC). Use when
  implementing thermal models, calculating conductor physics, or when the user
  asks "what are the CIGRE equations?" or "how do I validate this calculation?"
user-invocable: false
agent: backend-dev
allowed-tools: 'Read, Write, Edit, Glob, Grep, Bash(python:*)'

Power Systems Reference

Follows foundations principles.

Domain knowledge for overhead transmission line physics, thermal ratings, and mechanical analysis.

When to Use This Skill

  • Implementing thermal models or conductor temperature calculations
  • Working with catenary physics (sag, tension, clearance)
  • Validating electrical properties (resistance, reactance, impedance)
  • Referencing industry standards (CIGRE, IEEE, IEC)
  • Applying physical bounds validation
  • Reviewing or writing physics algorithms
  • Implementing conductor property calculations

Key Reference Files

FileContent
references/thermal-models.mdCIGRE TB 601, IEEE 738 thermal rating implementations
references/conductor-limits.mdPhysical validation bounds and parameter constraints
references/electrical-properties.mdResistance, sag, catenary formulas and calculations
references/standards-reference.mdIndustry standards summary (CIGRE, IEEE, IEC, EN)

Available Scripts

ScriptUsageDescription
scripts/validate-bounds.pyvalidate-bounds.py -t conductor_temp -v 85Validate physics values against bounds
scripts/convert-units.pyconvert-units.py 25 C KConvert between units (temp, length, power, speed)
scripts/check-standard-refs.shcheck-standard-refs.sh <dir>Check for proper CIGRE/IEEE citations in code

Quick Reference

Default Standard

CIGRE TB 601 is the default thermal rating standard. Document any deviations in code comments:

python
# Note: Using CIGRE 601 natural convection formula (Section 4.2.3)
# IEEE 738 differs in treatment of low wind speeds

Physical Bounds (Quick Check)

ParameterValid Range
Conductor temperature-40°C to 250°C
Ambient temperature-50°C to 60°C
Wind speed0 to 50 m/s
Solar radiation0 to 1400 W/m²

Unit Conventions

  • Internal: SI units, temperatures in Kelvin
  • Display: Celsius for temperatures
  • Document: Always include units in variable names or docstrings

Code Patterns

Parameter Validation

Always validate physical parameters at function boundaries:

python
def calculate_conductor_temperature(
    current_a: float,
    ambient_temp_c: float,
    wind_speed_mps: float,
) -> float:
    """Calculate steady-state conductor temperature.

    Args:
        current_a: Line current in Amperes (0 to rated × 2)
        ambient_temp_c: Ambient temperature in Celsius (-50 to 60)
        wind_speed_mps: Wind speed in m/s (0 to 50)

    Raises:
        ValueError: If parameters outside physical bounds
    """
    if not -50 <= ambient_temp_c <= 60:
        raise ValueError(f"Ambient temperature {ambient_temp_c}°C outside valid range [-50, 60]")
    # ... implementation

Standard Citations

Always cite standard section numbers in code comments:

python
# CIGRE TB 601, Section 4.2.3: Natural convection heat loss
# Formula: P_n = pi * D * lambda * Nu * (T_s - T_a)

Testing Patterns

Use pytest.approx() with appropriate tolerances:

python
def test_thermal_model():
    result = calculate_ampacity(...)
    # Thermal calculations: 1e-3 tolerance (0.1% accuracy)
    assert result == pytest.approx(expected, rel=1e-3)

Related Skills

  • database-patterns — For persisting physics results
  • foundations/code-style — For Python conventions in physics code