From b306118b2683cf6f264b5f1617c3e0e62a6c9042 Mon Sep 17 00:00:00 2001 From: Thales1330 Date: Tue, 1 Nov 2016 19:36:24 -0200 Subject: Power flow (gs) under implementation --- Project/ElectricCalculation.h | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 Project/ElectricCalculation.h (limited to 'Project/ElectricCalculation.h') diff --git a/Project/ElectricCalculation.h b/Project/ElectricCalculation.h new file mode 100644 index 0000000..5339199 --- /dev/null +++ b/Project/ElectricCalculation.h @@ -0,0 +1,38 @@ +#ifndef ELECTRICCALCULATION_H +#define ELECTRICCALCULATION_H + +#include +#include + +class Element; +class Bus; +class Capacitor; +class IndMotor; +class Inductor; +class Line; +class Load; +class SyncGenerator; +class SyncMotor; +class Transformer; + +class ElectricCalculation +{ + public: + ElectricCalculation(); + ~ElectricCalculation(); + virtual void GetElementsFromList(std::vector elementList); + virtual bool GetYBus(std::vector > >& yBus, double systemPowerBase); + + protected: + std::vector m_busList; + std::vector m_capacitorList; + std::vector m_indMotorList; + std::vector m_inductorList; + std::vector m_lineList; + std::vector m_loadList; + std::vector m_syncGeneratorList; + std::vector m_syncMotorList; + std::vector m_transformerList; +}; + +#endif // ELECTRICCALCULATION_H -- cgit From 004257e2abebbf448ba8d1fba32daae216b2c88e Mon Sep 17 00:00:00 2001 From: Thales Lima Oliveira Date: Wed, 2 Nov 2016 23:11:44 -0200 Subject: Gauss-Seidel implemented --- Project/ElectricCalculation.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'Project/ElectricCalculation.h') diff --git a/Project/ElectricCalculation.h b/Project/ElectricCalculation.h index 5339199..1bb6361 100644 --- a/Project/ElectricCalculation.h +++ b/Project/ElectricCalculation.h @@ -4,16 +4,16 @@ #include #include -class Element; -class Bus; -class Capacitor; -class IndMotor; -class Inductor; -class Line; -class Load; -class SyncGenerator; -class SyncMotor; -class Transformer; +#include "Element.h" +#include "Bus.h" +#include "Capacitor.h" +#include "IndMotor.h" +#include "Inductor.h" +#include "Line.h" +#include "Load.h" +#include "SyncGenerator.h" +#include "SyncMotor.h" +#include "Transformer.h" class ElectricCalculation { -- cgit From 4799019fb948226daf5777d0d3ba41257dd55657 Mon Sep 17 00:00:00 2001 From: Thales1330 Date: Thu, 3 Nov 2016 16:26:55 -0200 Subject: Power flow validate method under implementation --- Project/ElectricCalculation.h | 1 + 1 file changed, 1 insertion(+) (limited to 'Project/ElectricCalculation.h') diff --git a/Project/ElectricCalculation.h b/Project/ElectricCalculation.h index 1bb6361..16a761a 100644 --- a/Project/ElectricCalculation.h +++ b/Project/ElectricCalculation.h @@ -22,6 +22,7 @@ class ElectricCalculation ~ElectricCalculation(); virtual void GetElementsFromList(std::vector elementList); virtual bool GetYBus(std::vector > >& yBus, double systemPowerBase); + virtual void ValidateElementsPowerFlow(std::vector > voltage, std::vector > power, double systemPowerBase); protected: std::vector m_busList; -- cgit From 9919f24692c1fe9b8e11fde5c6d5c18f169b5c10 Mon Sep 17 00:00:00 2001 From: Thales1330 Date: Fri, 4 Nov 2016 18:02:03 -0200 Subject: Validation implemented --- Project/ElectricCalculation.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'Project/ElectricCalculation.h') diff --git a/Project/ElectricCalculation.h b/Project/ElectricCalculation.h index 16a761a..02a45e0 100644 --- a/Project/ElectricCalculation.h +++ b/Project/ElectricCalculation.h @@ -15,6 +15,8 @@ #include "SyncMotor.h" #include "Transformer.h" +enum BusType { BUS_SLACK = 0, BUS_PV, BUS_PQ }; + class ElectricCalculation { public: @@ -22,7 +24,10 @@ class ElectricCalculation ~ElectricCalculation(); virtual void GetElementsFromList(std::vector elementList); virtual bool GetYBus(std::vector > >& yBus, double systemPowerBase); - virtual void ValidateElementsPowerFlow(std::vector > voltage, std::vector > power, double systemPowerBase); + virtual void ValidateElementsPowerFlow(std::vector > voltage, + std::vector > power, + std::vector busType, + double systemPowerBase); protected: std::vector m_busList; -- cgit From b6d4815859b494cc6e5e1f1718a3b410fdd6037a Mon Sep 17 00:00:00 2001 From: Thales1330 Date: Mon, 7 Nov 2016 17:23:07 -0200 Subject: Reactive limits under implementation --- Project/ElectricCalculation.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Project/ElectricCalculation.h') diff --git a/Project/ElectricCalculation.h b/Project/ElectricCalculation.h index 02a45e0..ac573cd 100644 --- a/Project/ElectricCalculation.h +++ b/Project/ElectricCalculation.h @@ -24,10 +24,10 @@ class ElectricCalculation ~ElectricCalculation(); virtual void GetElementsFromList(std::vector elementList); virtual bool GetYBus(std::vector > >& yBus, double systemPowerBase); - virtual void ValidateElementsPowerFlow(std::vector > voltage, - std::vector > power, - std::vector busType, - double systemPowerBase); + virtual void UpdateElementsPowerFlow(std::vector > voltage, + std::vector > power, + std::vector busType, + double systemPowerBase); protected: std::vector m_busList; -- cgit From e49af3edd77a3494ff255c45eeee85bd8b287737 Mon Sep 17 00:00:00 2001 From: Thales1330 Date: Wed, 9 Nov 2016 17:38:02 -0200 Subject: Fixing reactive generation limit [2] --- Project/ElectricCalculation.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'Project/ElectricCalculation.h') diff --git a/Project/ElectricCalculation.h b/Project/ElectricCalculation.h index ac573cd..2b449a1 100644 --- a/Project/ElectricCalculation.h +++ b/Project/ElectricCalculation.h @@ -17,6 +17,23 @@ enum BusType { BUS_SLACK = 0, BUS_PV, BUS_PQ }; +enum ReactiveLimitsType { + RL_UNLIMITED = 0, // The bus can generate any ammount of reactive power. + RL_LIMITED, // The bus reactive power generation is limited. + RL_UNLIMITED_SOURCE, // The bus have at least one source of infinite reative power. + RL_MAX_REACHED, // Max limit reached + RL_MIN_REACHED, // Min limit reached + RL_NONE_REACHED // No limits reached +}; + +struct ReactiveLimits { + double maxLimit = 0.0; + double minLimit = 0.0; + ReactiveLimitsType maxLimitType = RL_UNLIMITED; + ReactiveLimitsType minLimitType = RL_UNLIMITED; + ReactiveLimitsType limitReached = RL_NONE_REACHED; +}; + class ElectricCalculation { public: @@ -27,6 +44,7 @@ class ElectricCalculation virtual void UpdateElementsPowerFlow(std::vector > voltage, std::vector > power, std::vector busType, + std::vector reactiveLimit, double systemPowerBase); protected: -- cgit From 6b9054f1bb28b4ac1b0a7b682204baa0e2643220 Mon Sep 17 00:00:00 2001 From: Thales1330 Date: Tue, 29 Nov 2016 18:27:32 -0200 Subject: Text form under implementation --- Project/ElectricCalculation.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'Project/ElectricCalculation.h') diff --git a/Project/ElectricCalculation.h b/Project/ElectricCalculation.h index 2b449a1..e4e4ef7 100644 --- a/Project/ElectricCalculation.h +++ b/Project/ElectricCalculation.h @@ -47,6 +47,16 @@ class ElectricCalculation std::vector reactiveLimit, double systemPowerBase); + const std::vector GetBusList() const { return m_busList; } + const std::vector GetCapacitorList() const { return m_capacitorList; } + const std::vector GetIndMotorList() const { return m_indMotorList; } + const std::vector GetInductorList() const { return m_inductorList; } + const std::vector GetLineList() const { return m_lineList; } + const std::vector GetLoadList() const { return m_loadList; } + const std::vector GetSyncGeneratorList() const { return m_syncGeneratorList; } + const std::vector GetSyncMotorList() const { return m_syncMotorList; } + const std::vector GetTransformerList() const { return m_transformerList; } + protected: std::vector m_busList; std::vector m_capacitorList; -- cgit