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/PowerFlow.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 Project/PowerFlow.h (limited to 'Project/PowerFlow.h') diff --git a/Project/PowerFlow.h b/Project/PowerFlow.h new file mode 100644 index 0000000..76b17e4 --- /dev/null +++ b/Project/PowerFlow.h @@ -0,0 +1,20 @@ +#ifndef POWERFLOW_H +#define POWERFLOW_H + +#include "ElectricCalculation.h" + +#include //temp +#include //temp + +class PowerFlow : public ElectricCalculation +{ + public: + PowerFlow(std::vector elementList); + ~PowerFlow(); + virtual bool RunGaussSeidel(); + + protected: + std::vector > > m_yBus; +}; + +#endif // POWERFLOW_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/PowerFlow.h | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'Project/PowerFlow.h') diff --git a/Project/PowerFlow.h b/Project/PowerFlow.h index 76b17e4..b30b82f 100644 --- a/Project/PowerFlow.h +++ b/Project/PowerFlow.h @@ -3,18 +3,29 @@ #include "ElectricCalculation.h" -#include //temp +#include +#include //_() #include //temp +enum BusType +{ + BUS_SLACK = 0, + BUS_PV, + BUS_PQ +}; + class PowerFlow : public ElectricCalculation { public: PowerFlow(std::vector elementList); ~PowerFlow(); - virtual bool RunGaussSeidel(); + virtual bool RunGaussSeidel(double systemPowerBase = 100e6, int maxIteration = 5000, double error = 1e-6, double initAngle = 0.0, double accFactor = 1.0); + + virtual wxString GetErrorMessage() { return m_errorMsg; } protected: std::vector > > m_yBus; + wxString m_errorMsg = ""; }; #endif // POWERFLOW_H -- 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/PowerFlow.h | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) (limited to 'Project/PowerFlow.h') diff --git a/Project/PowerFlow.h b/Project/PowerFlow.h index b30b82f..ac27c7e 100644 --- a/Project/PowerFlow.h +++ b/Project/PowerFlow.h @@ -4,28 +4,26 @@ #include "ElectricCalculation.h" #include -#include //_() -#include //temp +#include //_() +#include //temp -enum BusType -{ - BUS_SLACK = 0, - BUS_PV, - BUS_PQ -}; +enum BusType { BUS_SLACK = 0, BUS_PV, BUS_PQ }; class PowerFlow : public ElectricCalculation { public: PowerFlow(std::vector elementList); ~PowerFlow(); - virtual bool RunGaussSeidel(double systemPowerBase = 100e6, int maxIteration = 5000, double error = 1e-6, double initAngle = 0.0, double accFactor = 1.0); - - virtual wxString GetErrorMessage() { return m_errorMsg; } + virtual bool RunGaussSeidel(double systemPowerBase = 100e6, + int maxIteration = 5000, + double error = 1e-6, + double initAngle = 0.0, + double accFactor = 1.0); + virtual wxString GetErrorMessage() { return m_errorMsg; } protected: std::vector > > m_yBus; - wxString m_errorMsg = ""; + wxString m_errorMsg = ""; }; #endif // POWERFLOW_H -- 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/PowerFlow.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'Project/PowerFlow.h') diff --git a/Project/PowerFlow.h b/Project/PowerFlow.h index ac27c7e..1e5c621 100644 --- a/Project/PowerFlow.h +++ b/Project/PowerFlow.h @@ -7,8 +7,6 @@ #include //_() #include //temp -enum BusType { BUS_SLACK = 0, BUS_PV, BUS_PQ }; - class PowerFlow : public ElectricCalculation { public: -- 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/PowerFlow.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'Project/PowerFlow.h') diff --git a/Project/PowerFlow.h b/Project/PowerFlow.h index 1e5c621..0ead448 100644 --- a/Project/PowerFlow.h +++ b/Project/PowerFlow.h @@ -7,6 +7,19 @@ #include //_() #include //temp +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. +}; + +struct ReactiveLimits { + double maxLimit = 0.0; + double minLimit = 0.0; + ReactiveLimitsType maxLimitType = RL_UNLIMITED; + ReactiveLimitsType minLimitType = RL_UNLIMITED; +}; + class PowerFlow : public ElectricCalculation { public: -- 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/PowerFlow.h | 13 ------------- 1 file changed, 13 deletions(-) (limited to 'Project/PowerFlow.h') diff --git a/Project/PowerFlow.h b/Project/PowerFlow.h index 0ead448..1e5c621 100644 --- a/Project/PowerFlow.h +++ b/Project/PowerFlow.h @@ -7,19 +7,6 @@ #include //_() #include //temp -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. -}; - -struct ReactiveLimits { - double maxLimit = 0.0; - double minLimit = 0.0; - ReactiveLimitsType maxLimitType = RL_UNLIMITED; - ReactiveLimitsType minLimitType = RL_UNLIMITED; -}; - class PowerFlow : public ElectricCalculation { public: -- cgit