line_angles
CablePlane
CablePlane(
span_length: ndarray,
conductor_attachment_altitude: ndarray,
crossarm_length: ndarray,
insulator_length: ndarray,
line_angle: ndarray,
beta: ndarray,
get_displacement: Callable[[], ndarray],
get_attachments_coords: Callable,
)
This class handles the parameters for defining the cable plane
Source code in src/mechaphlowers/core/geometry/line_angles.py
306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 | |
a_chain
property
a_chain: ndarray
Span length, taking into account arm, line angles and chain
a_prime
property
a_prime: ndarray
Span length after taking wind angle into account
azimuth_angle
property
azimuth_angle: ndarray
Azimuth angle: horizontal angle between the current span (chain and arm included) and the first line (the line between the first two supports)
b
property
b
no need here to compute b but for memory // for coherence of the class it could be added one day
b_chain
property
b_chain: ndarray
Elevation difference, taking into account arm, line angles and chain
b_prime
property
b_prime: ndarray
Elevation difference after taking wind angle into account
DisplacementVector
DisplacementVector(
get_displacement: Callable[[], ndarray],
line_angle: ndarray,
)
Class to store chain displacement, and change frame of displacement vector into the global frame
Source code in src/mechaphlowers/core/geometry/line_angles.py
265 266 267 268 269 270 271 272 | |
dxdydz_global_frame
property
dxdydz_global_frame: ndarray
Returns displacement vector dxdydz in the global frame.
Format: [[dx0, dy0, dz0], [dx1, dy1, dz1], ...]
Returns:
| Type | Description |
|---|---|
ndarray
|
np.ndarray: displacement vector in the global frame |
change_frame
change_frame() -> None
Change frame of displacement vector from support frame to global frame
Source code in src/mechaphlowers/core/geometry/line_angles.py
274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 | |
angle_between_vectors
Calculate the angle between two 2D vectors.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
ndarray
|
A 2D array of shape (n, 2) representing the first set of vectors. |
required |
|
ndarray
|
A 2D array of shape (n, 2) representing the second set of vectors. |
required |
Returns:
| Type | Description |
|---|---|
ndarray
|
A 1D array of angles in radians, where each angle corresponds to the angle between the vectors at the same index. |
Source code in src/mechaphlowers/core/geometry/line_angles.py
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 | |
compute_span_azimuth
compute_span_azimuth(attachment_coords: ndarray) -> ndarray
compute_span_azimuth
Compute the azimuth angle of the span between two attachment points. The azimuth angle is the angle between the x-axis and the line connecting two attachment points in the xy-plane. The angle is computed in radians and rotation is counter-clockwise (trigonometric).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
ndarray
|
Attachment coordinates of the span. |
required |
Returns:
| Type | Description |
|---|---|
ndarray
|
1D array of shape (n,) representing the azimuth angle of the span in radians. |
Source code in src/mechaphlowers/core/geometry/line_angles.py
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | |
get_attachment_coords
get_attachment_coords(
edge_arm_coords: ndarray, displacement_vector: ndarray
) -> ndarray
Get the coordinates of the attachment points in the global frame. These are the coordinates of the end of the suspension insulators. Currently, we assume that isulators set are vetical.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
ndarray
|
coordinates of the edge of the arms (output of |
required |
|
ndarray
|
displacement vector of the chains (output of BalanceEngine.change_state()) |
required |
Returns:
| Type | Description |
|---|---|
ndarray
|
np.ndarray: coordinates of the attachment points in the global frame. |
Source code in src/mechaphlowers/core/geometry/line_angles.py
155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 | |
get_edge_arm_coords
get_edge_arm_coords(
supports_ground_coords: ndarray,
conductor_attachment_altitude: ndarray,
crossarm_length: ndarray,
line_angle: ndarray,
insulator_length: ndarray,
) -> tuple[ndarray, ndarray]
Build the supports and arms in the global frame.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
ndarray
|
coordinates of ground supports (output of |
required |
|
ndarray
|
attachment altitude (input from SectionArray) |
required |
|
ndarray
|
crossarm lengths (input from SectionArray) |
required |
|
ndarray
|
line angles (input from SectionArray) |
required |
|
ndarray
|
insulator lengths (input from SectionArray) |
required |
Returns:
| Type | Description |
|---|---|
tuple[ndarray, ndarray]
|
Returns two 2D arrays of shape (n, 3): - center_arm_coords: coordinates of the intersection of arms and supports in the global frame - edge_arm_coords: coordinates of the edge of the arms in the global frame |
Source code in src/mechaphlowers/core/geometry/line_angles.py
105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 | |
get_elevation_diff_between_attachments
get_elevation_diff_between_attachments(
attachment_coords: ndarray,
) -> ndarray
Get the elevation differences between attachment points.
Source code in src/mechaphlowers/core/geometry/line_angles.py
220 221 222 223 224 225 226 227 228 229 230 | |
get_insulator_layer
get_insulator_layer(
edge_arm_coords: ndarray, attachment_coords: ndarray
) -> ndarray
Stack the coordinates of the insulators in the global frame.
Source code in src/mechaphlowers/core/geometry/line_angles.py
189 190 191 192 193 194 195 196 197 198 199 200 201 | |
get_span_lengths_between_attachments
get_span_lengths_between_attachments(
attachment_coords: ndarray,
) -> ndarray
Get the lengths between the attachment points.
Source code in src/mechaphlowers/core/geometry/line_angles.py
204 205 206 207 208 209 210 211 212 213 214 215 216 217 | |
get_supports_coords
get_supports_coords(
span_length: ndarray,
line_angle: ndarray,
conductor_attachment_altitude: ndarray,
crossarm_length: ndarray,
insulator_length: ndarray,
displacement_vector: ndarray,
ground_altitude: ndarray,
) -> tuple[ndarray, ndarray, ndarray, ndarray]
Helper to get all the coordinates of the supports packed in a tuple.
Source code in src/mechaphlowers/core/geometry/line_angles.py
233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 | |
get_supports_ground_coords
get_supports_ground_coords(
span_length: ndarray,
line_angle: ndarray,
ground_altitude: ndarray,
) -> ndarray
Get the coordinates of the supports in the global frame. These are the coordinates of the barycenter of the support, at ground.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
ndarray
|
span lengths between supports (input from SectionArray) |
required |
|
ndarray
|
line angles (input from SectionArray) |
required |
Returns:
| Type | Description |
|---|---|
ndarray
|
2D array of shape (n, 3) representing the coordinates of the supports in the global frame. |
Source code in src/mechaphlowers/core/geometry/line_angles.py
71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 | |
get_supports_layer
get_supports_layer(
supports_ground_coords: ndarray,
center_arm_coords: ndarray,
edge_arm_coords: ndarray,
) -> ndarray
Stack the coordinates of the supports and the arms in the global frame.
Source code in src/mechaphlowers/core/geometry/line_angles.py
172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 | |