diff options
author | Thales Lima Oliveira <thaleslima.ufu@gmail.com> | 2017-09-04 20:05:30 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-04 20:05:30 -0300 |
commit | 926af7f34aaf5aebdbac0cbc550ed75647874258 (patch) | |
tree | 4df26f8c631aeeeed6e5c9e8aab87c4c663bd30f /Project/Bus.h | |
parent | 17d1dd82ec065eff08546ef1fd2a188ce77471b2 (diff) | |
parent | 6f3421c4150e49af026432a2a2be0171d741ad03 (diff) | |
download | PSP.git-926af7f34aaf5aebdbac0cbc550ed75647874258.tar.gz PSP.git-926af7f34aaf5aebdbac0cbc550ed75647874258.tar.xz PSP.git-926af7f34aaf5aebdbac0cbc550ed75647874258.zip |
Merge pull request #33 from Thales1330/wip/electromechanical-calc
Wip electromechanical calc
Diffstat (limited to 'Project/Bus.h')
-rw-r--r-- | Project/Bus.h | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/Project/Bus.h b/Project/Bus.h index 2522be3..cbc8287 100644 --- a/Project/Bus.h +++ b/Project/Bus.h @@ -11,7 +11,7 @@ struct BusElectricalData { ElectricalUnit nominalVoltageUnit = UNIT_kV; bool isVoltageControlled = false; double controlledVoltage = 1.0; - int controlledVoltageUnitChoice = 0; // 0 = p.u., 1 = same as nominalVoltageUnit (UNIT_V or UNIT_kV). + int controlledVoltageUnitChoice = 0; // 0 = p.u., 1 = same as nominalVoltageUnit (UNIT_V or UNIT_kV). bool slackBus = false; // Power flow (p.u.) @@ -24,10 +24,10 @@ struct BusElectricalData { // p.u. fault data double faultResistance = 0.0; double faultReactance = 0.0; - std::complex<double> faultCurrent[3] = { std::complex<double>(0.0, 0.0), std::complex<double>(0.0, 0.0), - std::complex<double>(0.0, 0.0) }; - std::complex<double> faultVoltage[3] = { std::complex<double>(0.0, 0.0), std::complex<double>(0.0, 0.0), - std::complex<double>(0.0, 0.0) }; + std::complex<double> faultCurrent[3] = {std::complex<double>(0.0, 0.0), std::complex<double>(0.0, 0.0), + std::complex<double>(0.0, 0.0)}; + std::complex<double> faultVoltage[3] = {std::complex<double>(0.0, 0.0), std::complex<double>(0.0, 0.0), + std::complex<double>(0.0, 0.0)}; double scPower = 0.0; // Stability @@ -37,11 +37,12 @@ struct BusElectricalData { double stabFaultLength = 0.0; double stabFaultResistance = 0.0; double stabFaultReactance = 0.0; + std::vector<std::complex<double> > stabVoltageVector; }; class Bus : public PowerElement { -public: + public: Bus(); Bus(wxPoint2DDouble position); Bus(wxPoint2DDouble position, wxString name); @@ -57,12 +58,13 @@ public: virtual bool PickboxContains(wxPoint2DDouble position); virtual bool GetContextMenu(wxMenu& menu); virtual wxString GetTipText() const; - virtual BusElectricalData GetEletricalData() const { return m_electricalData; } + virtual BusElectricalData GetElectricalData() const { return m_electricalData; } virtual void SetElectricalData(BusElectricalData electricalData) { m_electricalData = electricalData; } virtual bool ShowForm(wxWindow* parent, Element* element); + virtual bool GetPlotData(ElementPlotData& plotData); -protected: + protected: BusElectricalData m_electricalData; }; -#endif // BUS_H +#endif // BUS_H |