From 077270f0294d236c6047d850703c5d011cb4b711 Mon Sep 17 00:00:00 2001 From: Thales Lima Oliveira Date: Sat, 3 Sep 2016 01:10:18 -0300 Subject: Motor implementation done, elements classes reorganized --- Project/SyncGenerator.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 Project/SyncGenerator.h (limited to 'Project/SyncGenerator.h') diff --git a/Project/SyncGenerator.h b/Project/SyncGenerator.h new file mode 100644 index 0000000..9b037fc --- /dev/null +++ b/Project/SyncGenerator.h @@ -0,0 +1,18 @@ +#ifndef SYNCGENERATOR_H +#define SYNCGENERATOR_H + +#include "Machines.h" + +class SyncGenerator : public Machines +{ + public: + SyncGenerator(); + ~SyncGenerator(); + virtual void DrawSymbol() const; + virtual bool GetContextMenu(wxMenu& menu); + + private: + std::vector m_sinePts; +}; + +#endif // SYNCGENERATOR_H -- cgit From a9dd78afddeb706df6652eb91f229a74fd073846 Mon Sep 17 00:00:00 2001 From: Thales1330 Date: Fri, 23 Sep 2016 17:46:10 -0300 Subject: Generator form implemented --- Project/SyncGenerator.h | 68 ++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 64 insertions(+), 4 deletions(-) (limited to 'Project/SyncGenerator.h') diff --git a/Project/SyncGenerator.h b/Project/SyncGenerator.h index 9b037fc..1ada9eb 100644 --- a/Project/SyncGenerator.h +++ b/Project/SyncGenerator.h @@ -1,18 +1,78 @@ #ifndef SYNCGENERATOR_H #define SYNCGENERATOR_H +#include "GeneratorForm.h" #include "Machines.h" +struct SyncGeneratorElectricalData +{ + // General + wxString name = ""; + double nominalPower = 100.0; + ElectricalUnit nominalPowerUnit = UNIT_MVA; + double activePower = 100.0; + ElectricalUnit activePowerUnit = UNIT_MVA; + double reactivePower = 0.0; + ElectricalUnit reactivePowerUnit = UNIT_MVA; + bool haveMaxReactive = false; + double maxReactive = 9999.0; + ElectricalUnit maxReactiveUnit = UNIT_MVA; + bool haveMinReactive = false; + double minReactive = -9999.0; + ElectricalUnit minReactiveUnit = UNIT_MVA; + bool useMachineBase = false; + + // Fault + double positiveResistance = 0.0; + double positiveReactance = 1.0; + double negativeResistance = 0.0; + double negativeReactance = 1.0; + double zeroResistance = 0.0; + double zeroReactance = 1.0; + double groundResistance = 0.0; + double groundReactance = 0.0; + bool groundNeutral = true; + + // Stability + bool plotSyncMachine = false; + double inertia = 0.0; + double damping = 0.0; + bool useAVR = false; + bool useSpeedGovernor = false; + + double armResistance = 0.0; + double potierReactance = 0.0; + double satFactor = 0.0; + + double syncXd = 0.0; + double syncXq = 0.0; + double transXd = 1.0; + double transXq = 0.0; + double transTd0 = 0.0; + double transTq0 = 0.0; + double subXd = 0.0; + double subXq = 0.0; + double subTd0 = 0.0; + double subTq0 = 0.0; +}; + class SyncGenerator : public Machines { public: SyncGenerator(); + SyncGenerator(wxString name); ~SyncGenerator(); - virtual void DrawSymbol() const; - virtual bool GetContextMenu(wxMenu& menu); - - private: + + virtual void Init(); + virtual void DrawSymbol() const; + virtual bool GetContextMenu(wxMenu& menu); + virtual bool ShowForm(wxWindow* parent, Element* element); + virtual SyncGeneratorElectricalData GetElectricalData() { return m_electricalData; } + virtual void SetElectricalData(SyncGeneratorElectricalData electricalData) { m_electricalData = electricalData; } + protected: std::vector m_sinePts; + + SyncGeneratorElectricalData m_electricalData; }; #endif // SYNCGENERATOR_H -- cgit From 02c5a1d22a078c132aca40ea14b95800dd8257e9 Mon Sep 17 00:00:00 2001 From: Thales1330 Date: Thu, 27 Oct 2016 17:26:24 -0200 Subject: All elements forms implemented --- Project/SyncGenerator.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Project/SyncGenerator.h') diff --git a/Project/SyncGenerator.h b/Project/SyncGenerator.h index 1ada9eb..cf1fda9 100644 --- a/Project/SyncGenerator.h +++ b/Project/SyncGenerator.h @@ -1,9 +1,10 @@ #ifndef SYNCGENERATOR_H #define SYNCGENERATOR_H -#include "GeneratorForm.h" #include "Machines.h" +class SyncMachineForm; + struct SyncGeneratorElectricalData { // General -- 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/SyncGenerator.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'Project/SyncGenerator.h') diff --git a/Project/SyncGenerator.h b/Project/SyncGenerator.h index cf1fda9..98c0ce1 100644 --- a/Project/SyncGenerator.h +++ b/Project/SyncGenerator.h @@ -12,15 +12,15 @@ struct SyncGeneratorElectricalData double nominalPower = 100.0; ElectricalUnit nominalPowerUnit = UNIT_MVA; double activePower = 100.0; - ElectricalUnit activePowerUnit = UNIT_MVA; + ElectricalUnit activePowerUnit = UNIT_MW; double reactivePower = 0.0; - ElectricalUnit reactivePowerUnit = UNIT_MVA; + ElectricalUnit reactivePowerUnit = UNIT_MVAr; bool haveMaxReactive = false; double maxReactive = 9999.0; - ElectricalUnit maxReactiveUnit = UNIT_MVA; + ElectricalUnit maxReactiveUnit = UNIT_MVAr; bool haveMinReactive = false; double minReactive = -9999.0; - ElectricalUnit minReactiveUnit = UNIT_MVA; + ElectricalUnit minReactiveUnit = UNIT_MVAr; bool useMachineBase = false; // Fault @@ -69,6 +69,7 @@ class SyncGenerator : public Machines virtual bool GetContextMenu(wxMenu& menu); virtual bool ShowForm(wxWindow* parent, Element* element); virtual SyncGeneratorElectricalData GetElectricalData() { return m_electricalData; } + virtual SyncGeneratorElectricalData GetPUElectricalData(double systemPowerBase); virtual void SetElectricalData(SyncGeneratorElectricalData electricalData) { m_electricalData = electricalData; } protected: std::vector m_sinePts; -- cgit