summaryrefslogtreecommitdiffstats
path: root/Project/SyncGenerator.h
diff options
context:
space:
mode:
authorThales1330 <thaleslima.ufu@gmail.com>2016-12-06 13:26:46 -0200
committerThales1330 <thaleslima.ufu@gmail.com>2016-12-06 13:26:46 -0200
commite282ec268db0d17a1d53f813c5fff9473d25e797 (patch)
tree517e01b8685248f04548513091e7040a1b36ec0b /Project/SyncGenerator.h
parentd4efffcdedbb41596eecd0882a1cef76f6afc435 (diff)
parente266f5811403beea13c9cc5399c55db4a34fdd3c (diff)
downloadPSP.git-e282ec268db0d17a1d53f813c5fff9473d25e797.tar.gz
PSP.git-e282ec268db0d17a1d53f813c5fff9473d25e797.tar.xz
PSP.git-e282ec268db0d17a1d53f813c5fff9473d25e797.zip
Merge remote-tracking branch 'refs/remotes/origin/wip/currentState'
Diffstat (limited to 'Project/SyncGenerator.h')
-rw-r--r--Project/SyncGenerator.h80
1 files changed, 80 insertions, 0 deletions
diff --git a/Project/SyncGenerator.h b/Project/SyncGenerator.h
new file mode 100644
index 0000000..98c0ce1
--- /dev/null
+++ b/Project/SyncGenerator.h
@@ -0,0 +1,80 @@
+#ifndef SYNCGENERATOR_H
+#define SYNCGENERATOR_H
+
+#include "Machines.h"
+
+class SyncMachineForm;
+
+struct SyncGeneratorElectricalData
+{
+ // General
+ wxString name = "";
+ double nominalPower = 100.0;
+ ElectricalUnit nominalPowerUnit = UNIT_MVA;
+ double activePower = 100.0;
+ ElectricalUnit activePowerUnit = UNIT_MW;
+ double reactivePower = 0.0;
+ ElectricalUnit reactivePowerUnit = UNIT_MVAr;
+ bool haveMaxReactive = false;
+ double maxReactive = 9999.0;
+ ElectricalUnit maxReactiveUnit = UNIT_MVAr;
+ bool haveMinReactive = false;
+ double minReactive = -9999.0;
+ ElectricalUnit minReactiveUnit = UNIT_MVAr;
+ 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 Init();
+ virtual void DrawSymbol() const;
+ 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<wxPoint2DDouble> m_sinePts;
+
+ SyncGeneratorElectricalData m_electricalData;
+};
+
+#endif // SYNCGENERATOR_H