summaryrefslogtreecommitdiffstats
path: root/Project/Electromechanical.h
diff options
context:
space:
mode:
authorThales Lima Oliveira <thaleslima.ufu@gmail.com>2019-07-18 09:22:27 -0300
committerGitHub <noreply@github.com>2019-07-18 09:22:27 -0300
commit8357c081eb75147bb8f94d8b6e367d88ea3898ed (patch)
tree9d9726fdcefb917475d6b33344d2b832d4e78ef8 /Project/Electromechanical.h
parent295b775ad53eb1e128b705e6028f9690dc6fa640 (diff)
parent7f46d390b8cc1d5f37560f52b222198dbc5e1225 (diff)
downloadPSP.git-8357c081eb75147bb8f94d8b6e367d88ea3898ed.tar.gz
PSP.git-8357c081eb75147bb8f94d8b6e367d88ea3898ed.tar.xz
PSP.git-8357c081eb75147bb8f94d8b6e367d88ea3898ed.zip
Merge pull request #50 from Thales1330/wip/induction-motor
Wip/induction motor
Diffstat (limited to 'Project/Electromechanical.h')
-rw-r--r--Project/Electromechanical.h44
1 files changed, 26 insertions, 18 deletions
diff --git a/Project/Electromechanical.h b/Project/Electromechanical.h
index 573c0c2..a9888af 100644
--- a/Project/Electromechanical.h
+++ b/Project/Electromechanical.h
@@ -20,8 +20,8 @@
#include "ElectricCalculation.h"
-#include <wx/progdlg.h>
#include <wx/log.h>
+#include <wx/progdlg.h>
class ControlElementSolver;
@@ -57,7 +57,7 @@ class Electromechanical : public ElectricCalculation
bool RunStabilityCalculation();
wxString GetErrorMessage() const { return m_errorMsg; }
std::vector<double> GetTimeVector() const { return m_timeVector; }
-
+
// For tests
std::vector<double> GetIterationVector() const { return m_iterationsNumVector; }
@@ -70,27 +70,33 @@ class Electromechanical : public ElectricCalculation
// double GetPowerValue(double value, ElectricalUnit unit);
void InsertSyncMachinesOnYBus();
+ bool InsertIndMachinesOnYBus();
+ bool CalculateIndMachinesTransientValues(IndMotor* motor);
std::complex<double> GetSyncMachineAdmittance(SyncGenerator* generator);
+ std::complex<double> GetIndMachineAdmittance(IndMotor* motor);
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,
@@ -127,11 +133,13 @@ class Electromechanical : public ElectricCalculation
int m_maxIterations = 100;
double m_saturationTolerance = 1e-8;
+ int m_currentPoint = 0;
+
std::vector<double> m_eventTimeList;
std::vector<bool> m_eventOccurrenceList;
std::vector<double> m_timeVector;
-
+
// For tests
int m_iterationsNum = 0.0;
std::vector<double> m_iterationsNumVector;