From 726686c9b378f3a727ded52226b13a760cba1e6c Mon Sep 17 00:00:00 2001 From: Thales1330 Date: Sat, 3 Sep 2016 17:09:24 -0300 Subject: Inductor under implementation Ind motor, sync condenser and load implemented --- Project/SyncMotor.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 Project/SyncMotor.h (limited to 'Project/SyncMotor.h') diff --git a/Project/SyncMotor.h b/Project/SyncMotor.h new file mode 100644 index 0000000..ab7a1ac --- /dev/null +++ b/Project/SyncMotor.h @@ -0,0 +1,17 @@ +#ifndef SYNCMOTOR_H +#define SYNCMOTOR_H + +#include "Machines.h" + +class SyncMotor : public Machines +{ +public: + SyncMotor(); + ~SyncMotor(); + + virtual void DrawSymbol() const; + virtual bool GetContextMenu(wxMenu& menu); + +}; + +#endif // SYNCMOTOR_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/SyncMotor.h | 73 ++++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 66 insertions(+), 7 deletions(-) (limited to 'Project/SyncMotor.h') diff --git a/Project/SyncMotor.h b/Project/SyncMotor.h index ab7a1ac..e199808 100644 --- a/Project/SyncMotor.h +++ b/Project/SyncMotor.h @@ -3,15 +3,74 @@ #include "Machines.h" +class SyncMachineForm; + +struct SyncMotorElectricalData { + // 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 SyncMotor : public Machines { -public: - SyncMotor(); - ~SyncMotor(); - - virtual void DrawSymbol() const; - virtual bool GetContextMenu(wxMenu& menu); + public: + SyncMotor(); + SyncMotor(wxString name); + ~SyncMotor(); + + virtual void DrawSymbol() const; + virtual bool GetContextMenu(wxMenu& menu); + virtual SyncMotorElectricalData GetElectricalData() { return m_electricalData; } + virtual void SetElectricalData(SyncMotorElectricalData electricalData) { m_electricalData = electricalData; } + virtual bool ShowForm(wxWindow* parent, Element* element); + protected: + SyncMotorElectricalData m_electricalData; }; -#endif // SYNCMOTOR_H +#endif // SYNCMOTOR_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/SyncMotor.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'Project/SyncMotor.h') diff --git a/Project/SyncMotor.h b/Project/SyncMotor.h index e199808..1f65386 100644 --- a/Project/SyncMotor.h +++ b/Project/SyncMotor.h @@ -11,15 +11,15 @@ struct SyncMotorElectricalData { 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 @@ -66,6 +66,7 @@ class SyncMotor : public Machines virtual void DrawSymbol() const; virtual bool GetContextMenu(wxMenu& menu); virtual SyncMotorElectricalData GetElectricalData() { return m_electricalData; } + virtual SyncMotorElectricalData GetPUElectricalData(double systemPowerBase); virtual void SetElectricalData(SyncMotorElectricalData electricalData) { m_electricalData = electricalData; } virtual bool ShowForm(wxWindow* parent, Element* element); -- cgit