diff options
Diffstat (limited to 'Project/Electromechanical.h')
-rw-r--r-- | Project/Electromechanical.h | 33 |
1 files changed, 25 insertions, 8 deletions
diff --git a/Project/Electromechanical.h b/Project/Electromechanical.h index 1dadcce..21c747c 100644 --- a/Project/Electromechanical.h +++ b/Project/Electromechanical.h @@ -7,33 +7,50 @@ class ControlElementSolver; class Electromechanical : public ElectricCalculation { -public: + public: Electromechanical(wxWindow* parent, std::vector<Element*> elementList); ~Electromechanical(); - + bool RunStabilityCalculation(); wxString GetErrorMessage() const { return m_errorMsg; } -protected: + std::vector<double> GetTimeVector() const { return m_timeVector; } + + protected: void SetEventTimeList(); bool HasEvent(double currentTime); void SetEvent(double currentTime); inline bool EventTrigger(double eventTime, double currentTime); - + void InsertSyncMachinesOnYBus(); std::complex<double> GetSyncMachineAdmittance(SyncGenerator* generator); bool InitializeDynamicElements(); - + void CalculateMachinesCurrents(); + void CalculateIntegrationConstants(SyncGenerator* syncGenerator, double id, double iq); + bool SolveSynchronousMachines(); + wxWindow* m_parent = NULL; wxString m_errorMsg = _("Unknown error"); + double m_systemFreq = 60.0; + std::vector<std::vector<std::complex<double> > > m_yBus; - double m_powerSystemBase = 100e6; + std::vector<std::vector<std::complex<double> > > m_yBusU; + std::vector<std::vector<std::complex<double> > > m_yBusL; - double m_timeStep = 1e-3; + std::vector<std::complex<double> > m_vBus; + std::vector<std::complex<double> > m_iBus; + double m_powerSystemBase = 100e6; + + double m_timeStep = 1e-3; + double m_tolerance = 1e-3; + int m_maxIterations = 100; + std::vector<double> m_eventTimeList; std::vector<bool> m_eventOccurrenceList; + + std::vector<double> m_timeVector; }; -#endif // ELECTROMECHANICAL_H +#endif // ELECTROMECHANICAL_H |