cigre601 module

Module: cigre601.py

Description

Steady-state and transient thermal rating solver for bare overhead conductors following CIGRE Technical Brochure TB 601. Supports four analysis modes: steady-state conductor temperature (NSELECT = 1), steady-state ampacity (NSELECT = 2), transient conductor temperature (NSELECT = 3), and transient thermal rating (NSELECT = 4). Inputs are provided through a cable.Cable object and a case.Case object.

License

SPDX-License-Identifier: GPL-3.0-only

Notes

This module is part of the PyPacity project.

References

  • CIGRE Technical Brochure 601, Guide for Thermal Rating Calculations of Overhead Lines, 2nd ed., 2014

class pypacity.cigre601.cigre601.CIGRE601

Bases: object

Thermal rating solver implementing CIGRE Technical Brochure 601.

Computes steady-state conductor temperature (NSELECT = 1), steady-state ampacity (NSELECT = 2), and transient conductor temperature (NSELECT = 3) for bare overhead conductors. Inputs are provided via Cable1 and Case1 before calling cigre601().

Attributes

Attribute

Type

Description

Cable1

Cable

Conductor physical and thermal properties.

Case1

Case

Environmental and operational inputs.

Debug

int

Debug output level. 0 disables output; 1 prints intermediate values during computation. Defaults to 0.

Debug_Dec

int

Number of decimal places used in debug output. Defaults to 3.

Tolerance

float

Convergence tolerance for the conductor temperature iteration in amperes. Defaults to 1.

MaxIterations

int

Maximum number of iterations allowed in the conductor temperature solver. Defaults to 400.

error

int

Error code. 0 indicates no error; 100 indicates a thermal balance inconsistency. Defaults to 0.

set_error(error)

Set the solver error code.

Parameters:

error (int) – Error code to assign. Use 0 to clear a previous error.

Note

Sets error on this instance.

get_error()

Return the current solver error code.

Returns:

Error code. 0 indicates no error; 100 indicates a thermal balance inconsistency.

Return type:

int

set_cable(Cable)

Assign a conductor definition to this solver.

Parameters:

Cable (cable.Cable) – Conductor physical and thermal properties.

Note

Sets Cable1 on this instance.

set_case(Case)

Assign an environmental and operational case to this solver.

Initialises any unset attributes required by the solver (CDR_LAT_DEG, NDAY, SUN_TIME, A3) to 0 if not already set.

Parameters:

Case (case.Case) – Environmental and operational inputs.

Note

Sets Case1 on this instance.

sind(angle)

Compute the sine of an angle given in degrees.

Parameters:

angle (float) – Angle in degrees.

Returns:

Sine of the angle.

Return type:

float

cosd(angle)

Compute the cosine of an angle given in degrees.

Parameters:

angle (float) – Angle in degrees.

Returns:

Cosine of the angle.

Return type:

float

solar()

Compute the solar heat gain rate on the conductor using the IEEE 738 polynomial model.

Computes the solar altitude from Case1.CDR_LAT_DEG, Case1.NDAY, and Case1.SUN_TIME, then evaluates the solar irradiance at the Earth surface using the polynomial coefficients selected by Case1.A3 (0 for clear air, 1 for industrial atmosphere). When Case1.SUN_TIME >= 24, Case1.SolarRadiation is used directly as the irradiance instead of computing it from solar position.

Returns:

Solar heat gain rate QS in W/m.

Return type:

float

Note

Sets Case1.QS to the computed value.

solarx()

Compute the solar heat gain rate on the conductor per CIGRE TB 601 Section 3.3.

Uses the CIGRE TB 601 solar model with clearness ratio Case1.Ns and ground reflectance Case1.ALBEDO. The solar source is selected by Case1.SOLAR: 0 uses the measured Case1.SolarRadiation directly; 1 computes the irradiance from date, time, and location.

Returns:

Solar heat gain rate in W/m.

Return type:

float

radiation()

Compute the radiative heat loss rate of the conductor.

Applies the Stefan-Boltzmann law using surface emissivity Cable1.EMISS and the conductor temperature Case1.TCDR.

Returns:

Radiative heat loss rate in W/m.

Return type:

float

joule()

Compute the Joule heating rate of the conductor.

The current used depends on Case1.NSELECT: Case1.XIPRELOAD for NSELECT = 1, Case1.TR for NSELECT = 2, and Case1.XISTEP for NSELECT = 3 and 4.

Returns:

Joule heating rate in W/m.

Return type:

float

Note

Sets Case1.QJ to the computed value.

convection()

Compute the convective heat loss rate of the conductor.

Evaluates both natural and forced convection following CIGRE TB 601 and returns the larger of the two. Natural convection coefficients are selected from the Grashof-Prandtl product. Forced convection coefficients depend on the Reynolds number and the conductor roughness ratio d / (2*(D - d)).

Returns:

Convective heat loss rate in W/m.

Return type:

float

Note

Computes Case1.WINDANG_DEG from Case1.DWIND_DEG and Case1.Z1_DEG before evaluating forced convection.

Rac()

Compute the AC resistance of the conductor at the operating temperature.

Applies a linear interpolation between Cable1.RLO at Cable1.TLO and Cable1.RHI at Cable1.THI, evaluated at Case1.TCDR.

Returns:

AC resistance in ohm/m.

Return type:

float

cigre601()

Run the CIGRE TB 601 thermal rating analysis for the configured mode.

Dispatches to the appropriate solver method based on Case1.NSELECT:

  • 1: calls conductor_temperature() — steady-state conductor temperature for a given current.

  • 2: calls thermal_rating() — steady-state ampacity for a given conductor temperature.

  • 3: calls TCDR_vs_time() — transient conductor temperature evolution.

  • 4: transient thermal rating (reserved for future implementation).

conductor_temperature()

Compute the steady-state conductor temperature for a given current.

Iterates thermal_rating() while stepping the conductor temperature downward from Cable1.TCDRMAX + 100 until the rated current equals Case1.XIPRELOAD, then interpolates to find the exact equilibrium temperature.

Note

Sets Case1.TCDRPRELOAD to the computed conductor temperature.

TCDR_vs_time()

Compute the transient conductor temperature evolution over time.

Integrates the heat balance equation step by step using Case1.DELTIME as the time step. The starting temperature is either computed from steady state (when Case1.TTfromST = 1) or taken directly from Case1.TCDRinitial (when Case1.TTfromST = 0). Total simulation time is Case1.TT seconds, or Case1.TT * 60 seconds when Case1.SORM = 1.

Note

Sets Case1.TIME and Case1.ATCDR with the time and temperature traces respectively.

thermal_rating()

Compute the steady-state ampacity for a given conductor temperature.

Evaluates solar heat gain (solarx()), radiative cooling (radiation()), convective cooling (convection()), and AC resistance (Rac()) at Case1.TCDR, then solves the heat balance for the current that produces thermal equilibrium.

Returns:

Steady-state ampacity in amperes.

Return type:

float

Note

Sets Case1.QS, Case1.QR, Case1.QC, Case1.RAC, Case1.TR, and self.deltaTcTs_value. Sets self.error = 100 if no thermal balance is achievable.

str_round(valuex)

Return a rounded string representation of a numeric value.

Rounds to the number of decimal places defined by Debug_Dec.

Parameters:

valuex (float) – Value to round and convert.

Returns:

Rounded value as a string.

Return type:

str

output()

Print a formatted summary of the most recent analysis results.

For NSELECT = 1 prints the input current and the resulting steady-state temperature. For NSELECT = 2 prints the input temperature and the resulting ampacity. Solar heat gain, radiative cooling, convective cooling, and the core-surface temperature difference are always printed.

print_ver()

Print the module name and release date to standard output.

deltaTcTs()

Compute the temperature difference between conductor core and surface.

Uses the effective radial thermal conductivity Cable1.lambda_ertc and the steady-state current Case1.TR to evaluate the radial temperature gradient through the conductor cross-section.

Returns:

Temperature difference between conductor core and surface in deg C.

Return type:

float

Note

Sets self.deltaTcTs_value to the computed value.