57 bool RunStabilityCalculation();
58 wxString GetErrorMessage()
const {
return m_errorMsg; }
59 std::vector<double> GetTimeVector()
const {
return m_timeVector; }
62 std::vector<double> GetIterationVector()
const {
return m_iterationsNumVector; }
63 wxString GetDebugMessage()
const {
return m_debugMessage; }
66 void SetEventTimeList();
67 bool HasEvent(
double currentTime);
68 void SetEvent(
double currentTime);
69 inline bool EventTrigger(
double eventTime,
double currentTime);
73 void InsertSyncMachinesOnYBus();
74 bool InsertIndMachinesOnYBus();
75 bool CalculateIndMachinesTransientValues(
IndMotor* motor);
76 std::complex<double> GetSyncMachineAdmittance(
SyncGenerator* generator);
77 std::complex<double> GetIndMachineAdmittance(
IndMotor* motor);
78 bool InitializeDynamicElements();
79 bool CalculateInjectedCurrents();
80 void CalculateIntegrationConstants(
SyncGenerator* syncGenerator,
double id,
double iq,
double k = 1.0);
81 void CalculateIntegrationConstants(
IndMotor* indMotor,
double ir,
double im,
double k = 1.0);
83 void SetSyncMachinesModel();
92 double CalculateIntVariables(
IndMotor* indMotor,
double ir,
double im,
double te,
double k = 1.0);
100 bool CalculateNonIntVariables(
IndMotor* indMotor,
double& ir,
double& im,
double& te,
double k = 1.0);
101 void CalculateReferenceSpeed();
102 bool CalculateSyncMachineSaturation(
SyncGenerator* syncMachine,
107 bool updateCurrents =
true,
109 void CalculateBusesFrequency(
bool hasEvent);
112 void PreallocateVectors();
114 wxWindow* m_parent =
nullptr;
115 wxString m_errorMsg = _(
"Unknown error");
118 double m_systemFreq = 60.0;
119 double m_refSpeed = 2.0 * M_PI * 60.0;
120 bool m_useCOI =
false;
122 std::vector<std::vector<std::complex<double> > > m_yBus;
123 std::vector<std::vector<std::complex<double> > > m_yBusU;
124 std::vector<std::vector<std::complex<double> > > m_yBusL;
126 std::vector<std::complex<double> > m_vBus;
127 std::vector<std::complex<double> > m_iBus;
129 double m_powerSystemBase = 100e6;
130 double m_simTime = 10.0;
131 double m_currentTime = 0.0;
132 double m_plotTime = 1e-2;
133 double m_timeStep = 1e-2;
134 double m_ctrlTimeStepMultiplier = 0.1;
135 double m_tolerance = 1e-8;
136 int m_maxIterations = 100;
137 double m_saturationTolerance = 1e-8;
139 int m_currentPoint = 0;
141 std::vector<double> m_eventTimeList;
142 std::vector<bool> m_eventOccurrenceList;
144 std::vector<double> m_timeVector;
147 int m_iterationsNum = 0.0;
148 std::vector<double> m_iterationsNumVector;
149 wxString m_debugMessage =
"";