From ec20e2ac95f8a5013f2293a7a2a96016fb805581 Mon Sep 17 00:00:00 2001 From: Thales Lima Oliveira Date: Thu, 11 Jul 2019 18:06:08 -0300 Subject: Induction motor DAE implemented Need some testing Check inertia --- Project/Electromechanical.h | 41 ++++++++++++++++++++++------------------- 1 file changed, 22 insertions(+), 19 deletions(-) (limited to 'Project/Electromechanical.h') diff --git a/Project/Electromechanical.h b/Project/Electromechanical.h index 90d3ebd..a9888af 100644 --- a/Project/Electromechanical.h +++ b/Project/Electromechanical.h @@ -20,8 +20,8 @@ #include "ElectricCalculation.h" -#include #include +#include class ControlElementSolver; @@ -57,7 +57,7 @@ class Electromechanical : public ElectricCalculation bool RunStabilityCalculation(); wxString GetErrorMessage() const { return m_errorMsg; } std::vector GetTimeVector() const { return m_timeVector; } - + // For tests std::vector GetIterationVector() const { return m_iterationsNumVector; } @@ -77,23 +77,26 @@ class Electromechanical : public ElectricCalculation bool InitializeDynamicElements(); bool CalculateInjectedCurrents(); void CalculateIntegrationConstants(SyncGenerator* syncGenerator, double id, double iq, double k = 1.0); - bool SolveSynchronousMachines(); + void CalculateIntegrationConstants(IndMotor* indMotor, double ir, double im, double k = 1.0); + bool SolveMachines(); void SetSyncMachinesModel(); SyncMachineModelData GetSyncMachineModelData(SyncGenerator* syncMachine); - double CalculateSyncMachineIntVariables(SyncGenerator* syncGenerator, - double id, - double iq, - double sd, - double sq, - double pe, - double k = 1.0); - bool CalculateSyncMachineNonIntVariables(SyncGenerator* syncGenerator, - double& id, - double& iq, - double& sd, - double& sq, - double& pe, - double k = 1.0); + double CalculateIntVariables(SyncGenerator* syncGenerator, + double id, + double iq, + double sd, + double sq, + double pe, + double k = 1.0); + double CalculateIntVariables(IndMotor* indMotor, double ir, double im, double te, double k = 1.0); + bool CalculateNonIntVariables(SyncGenerator* syncGenerator, + double& id, + double& iq, + double& sd, + double& sq, + double& pe, + double k = 1.0); + bool CalculateNonIntVariables(IndMotor* indMotor, double& ir, double& im, double& te, double k = 1.0); void CalculateReferenceSpeed(); bool CalculateSyncMachineSaturation(SyncGenerator* syncMachine, double& id, @@ -129,14 +132,14 @@ class Electromechanical : public ElectricCalculation double m_tolerance = 1e-8; int m_maxIterations = 100; double m_saturationTolerance = 1e-8; - + int m_currentPoint = 0; std::vector m_eventTimeList; std::vector m_eventOccurrenceList; std::vector m_timeVector; - + // For tests int m_iterationsNum = 0.0; std::vector m_iterationsNumVector; -- cgit