Skip to content

external_loads

CableLoads

CableLoads(
    diameter: float64,
    linear_weight: float64,
    ice_thickness: ndarray,
    wind_pressure: ndarray,
    ice_density: float = DEFAULT_ICE_DENSITY,
    **kwargs: Any,
)

CableLoads is a class that allows to calculate the loads on the cable due to wind and ice

Parameters:

Name Type Description Default

diameter

float64

diameter of the cable

required

linear_weight

float64

linear weight of the cable

required

ice_thickness

ndarray

thickness of the ice on the cable

required

wind_pressure

ndarray

wind pressure on the cable

required

ice_density

float

density of the ice. Defaults to DEFAULT_ICE_DENSITY.

DEFAULT_ICE_DENSITY

**kwargs

Any

additional arguments

{}
Source code in src/mechaphlowers/core/models/external_loads.py
32
33
34
35
36
37
38
39
40
41
42
43
44
45
def __init__(
    self,
    diameter: np.float64,
    linear_weight: np.float64,
    ice_thickness: np.ndarray,
    wind_pressure: np.ndarray,
    ice_density: float = DEFAULT_ICE_DENSITY,
    **kwargs: Any,
) -> None:
    self.diameter = diameter
    self.linear_weight = linear_weight
    self.ice_thickness = ice_thickness
    self.wind_pressure = wind_pressure
    self.ice_density = ice_density

ice_load property

ice_load: ndarray

Linear weight of the ice on the cable

Returns:

Type Description
ndarray

np.ndarray: linear weight of the ice for each span

load_angle property

load_angle: ndarray

Load angle (in radians)

Returns:

Type Description
ndarray

np.ndarray: load angle (beta) for each span

resulting_norm property

resulting_norm: ndarray

Norm of the force (R) applied on the cable due to weather loads and cable own weight, per meter cable

wind_load property

wind_load: ndarray

Linear force applied on the cable by the wind.

Returns:

Type Description
ndarray

np.ndarray: linear force applied on the cable by the wind

update_from_dict

update_from_dict(data: dict) -> None

Update the attributes of the instance based on a dictionary.

Parameters:

Name Type Description Default

data

dict

Dictionary containing attribute names as keys and their values.

required
Source code in src/mechaphlowers/core/models/external_loads.py
108
109
110
111
112
113
114
115
116
def update_from_dict(self, data: dict) -> None:
    """Update the attributes of the instance based on a dictionary.

    Args:
            data (dict): Dictionary containing attribute names as keys and their values.
    """
    for key, value in data.items():
        if hasattr(self, key):
            setattr(self, key, value)

WindSpeedPressureConverter

WindSpeedPressureConverter(
    tower_height: ndarray,
    gust: ndarray | None = None,
    speed_average_open_country: ndarray | None = None,
    angle_cable_degrees: ndarray | None = None,
    voltage: int = 400,
    category_surface_roughness: Literal[
        '0', 'II', 'IIIa'
    ] = 'II',
    work: bool = False,
)

WindSpeedPressureConverter is a class that allows to convert wind speed to wind pressure

Parameters:

Name Type Description Default

tower_height

ndarray

height of the tower in meters

required

gust

ndarray | None

gust wind speed in km/h. Defaults to None.

None

speed_average_open_country

ndarray | None

average wind speed in open country in m/s. Defaults to None.

None

angle_cable_degrees

ndarray

angle of the wind on the cable in degrees. Defaults to 90.

None

voltage

int

voltage of the line in kV. Defaults to 400.

400

category_surface_roughness

Literal['0', 'II', 'IIIa']

category of surface roughness. Defaults to "II".

'II'

work

bool

if True, the converter is used for work conditions. Defaults to False.

False
Source code in src/mechaphlowers/core/models/external_loads.py
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
def __init__(
    self,
    tower_height: np.ndarray,  # in m
    gust: np.ndarray | None = None,  # in km/h
    speed_average_open_country: np.ndarray | None = None,  # in m/s
    angle_cable_degrees: np.ndarray | None = None,
    voltage: int = 400,  # in kV
    category_surface_roughness: Literal["0", "II", "IIIa"] = "II",
    work: bool = False,
):
    self.tower_height = tower_height
    self.tower_height_max = np.max(tower_height)
    if speed_average_open_country is None:
        if gust is None:
            raise TypeError(
                "gust_wind or speed_average_wind_open_country need to be not None"
            )
        else:
            speed_average_open_country = gust / 1.54 / 3.6
    # if gust_wind and speed_average_wind_open_country are both given, speed_average_wind_open_country is used
    self.gust = gust
    self._speed_average_open_country = speed_average_open_country
    if angle_cable_degrees is None:
        angle_cable_degrees = np.full(speed_average_open_country.shape, 90)
    self.angle_cable_degrees = angle_cable_degrees
    self.voltage = voltage
    self.category_surface_roughness = category_surface_roughness
    self.work = work

pressure property

pressure: ndarray

Calculates the wind pressure in Pa based on the average wind speed, max tower height, voltage, surface roughness, and work condition.

pressure_rounded property

pressure_rounded: ndarray

Returns the wind pressure rounded to the nearest 10 Pa.

speed_average property

speed_average: ndarray

Returns a rounded value of the average wind speed in open country to the nearest tenth. Value in m/s This value is used for display purposes, but the actual value used in calculations is not rounded.