Harmony
HARMONic stabilitY assessment of PE-penetrated power systems
Loading...
Searching...
No Matches
overhead_line.h
Go to the documentation of this file.
1#ifndef OVERHEAD_LINE_H
2#define OVERHEAD_LINE_H
3
9#include "Transmissionline.h"
10#include "../Element.h"
11
12class Element; // Forward declaration of Element class
13
19class Overhead_Line : public Element {
20private:
25 class Conductors {
26 public:
27 int number_bundles = 1; //number of bundles (phases) nᵇ
28 int number_conductors_bundle = 1; //number of subconductors per bundle nˢᵇ
29 double ybc = 0; //height above the ground of the lowest bundle [m] yᵇᶜ
30 double deltaYbc = 0; //vertical offset between the bundles [m] Δyᵇᶜ
31 double deltaXbc = 0; //horizontal offset between the lowest bundles [m] Δxᵇᶜ
32 double deltaTildeXbc = 0; //horizontal offset in group of bundles [m] Δ̃xᵇᶜ
33 // used for concentric and offset organization only
34 double dsag = 0; //sag offset [m]
35 double dsb = 0; // subconductor spacing (symmetric) [m]
36 double rc = 0; //conductor radius [m]
37 double Rdc = 0; //DC resistance for the entire conductor [Ω/m]
38 double gc = 1e-11; // shunt conductance
39 double mu_rc = 1; // relative conductor permeability μᵣᶜ
40 std::tuple<std::vector<double>, std::vector<double>> positions = { {},{} }; //add absolute positions manually,
41 // then organization must be set to "absolute"
42 std::string organization; // Symbol for organization
43
44 // Constructors
45 Conductors() {};
57 Conductors(std::string, std::vector<int>&, std::vector<double>&, double, double, double, double, std::tuple<std::vector<double>, std::vector<double>>); // Default constructor for organization
58
59 // Functions for bundle positions
60 void estimate_flat();
61 void estimate_vertical();
62 void estimate_delta();
63 void estimate_concentric();
64 void estimate_offset();
65
66 std::tuple<std::vector<double>, std::vector<double>> bundle_position();
67 };
68
73 class Groundwires {
74 public:
75 int ng = 0; // number of groundwires (typically 0 or 2)
76 double deltaXg = 0; // horizontal offset between groundwires [m] Δxg
77 double deltaYg = 0; // vertical offset between the lowest conductor and groundwires [m] Δyg
78 double rg = 0; // ground wire radius [m] rg
79 double dgsag = 0; // sag offset [m] dgsag
80 double Rgdc = 0; // groundwire DC resistance [Ω/m] Rgdc
81 double mu_g = 1; // relative groundwire permeability μᵣ
82 std::tuple<std::vector<double>, std::vector<double>> positions; // add absolute positions manually
83
92 Groundwires(int, std::vector<double>&, double, double, std::tuple<std::vector<double>, std::vector<double>>);
93 };
94
95 double length = 0; // line length [km]
96 Conductors* conductors = nullptr;
97 Groundwires* groundwires = nullptr;
98
99 // Earth parameters are defined as (mu_r, epsilon_r, resistivity)
100 std::tuple<double, double, double> earthParameters = std::make_tuple(1, 1, 1); // (μᵣ_earth, ϵᵣ_earth, ρ_earth) in units ([], [], [Ωm])
101 MatrixXd P;
102 DenseMatrix Y;
103 DenseMatrix Z;
104
105 bool eliminate = true;
106
107 // Variables to store organization x and y values
108 std::vector<double> organization_x_values;
109 std::vector<double> organization_y_values;
110public:
120 Overhead_Line(const std::string& symbol, const std::string& location, double length, std::tuple<double, double, double> earth,
121 std::tuple<std::string, std::vector<int>, std::vector<double>, double, double, double, double> conductor,
122 std::tuple<int, std::vector<double>, double> groundwire);
123
124 ~Overhead_Line() override;
125
126 // Function to compute Y parameters
127 virtual vector<vector<complex<double>>> compute_y_parameters(double omega_num) override;
128};
129
130#endif // OVERHEAD_LINE_H
131
Lumped-parameter transmission line model with distributed R, L, G, C.
Base class for multi-phase network elements with Y-parameters and MNA stamping hooks.
Definition Element.h:29
Overhead line model with bundle geometry and frequency-dependent Y parameters.
Definition overhead_line.h:19
~Overhead_Line() override
Definition overhead_line.cpp:230
virtual vector< vector< complex< double > > > compute_y_parameters(double omega_num) override
Compute complex Y-parameters at a single frequency.
Definition overhead_line.cpp:372