summaryrefslogtreecommitdiffstats
path: root/Project/PowerFlow.h
diff options
context:
space:
mode:
authorThales Lima Oliveira <thaleslima.ufu@gmail.com>2019-07-25 01:11:17 -0300
committerThales Lima Oliveira <thaleslima.ufu@gmail.com>2019-07-25 01:11:17 -0300
commitc7ef9a883031c68506357f9ef1b1a0b79c79f4da (patch)
tree06646fb4511030daa7fb6426dfab9dc2413a7253 /Project/PowerFlow.h
parent4f434e4a1cccce69e4b680e4734df52244d3a30b (diff)
downloadPSP.git-c7ef9a883031c68506357f9ef1b1a0b79c79f4da.tar.gz
PSP.git-c7ef9a883031c68506357f9ef1b1a0b79c79f4da.tar.xz
PSP.git-c7ef9a883031c68506357f9ef1b1a0b79c79f4da.zip
Motor integration with PF
Newton bug fixed Newton inertia implemented Gauss-Newton implemented
Diffstat (limited to 'Project/PowerFlow.h')
-rw-r--r--Project/PowerFlow.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/Project/PowerFlow.h b/Project/PowerFlow.h
index 2f3419a..e8945c8 100644
--- a/Project/PowerFlow.h
+++ b/Project/PowerFlow.h
@@ -51,15 +51,18 @@ class PowerFlow : public ElectricCalculation
virtual bool RunNewtonRaphson(double systemPowerBase = 100e6,
int maxIteration = 5000,
double error = 1e-6,
- double initAngle = 0.0);
+ double initAngle = 0.0,
+ double inertia = 1.0);
virtual bool RunGaussNewton(double systemPowerBase = 100e6,
int maxIteration = 5000,
double error = 1e-6,
double initAngle = 0.0,
double accFactor = 1.0,
- double gaussTol = 10);
+ double gaussTol = 1e-2,
+ double inertia = 1.0);
virtual wxString GetErrorMessage() { return m_errorMsg; }
+ virtual int GetIterations() { return m_iterations; }
protected:
void GetNumPVPQ(std::vector<BusType> busType, int &numPQ, int &numPV);
@@ -82,11 +85,15 @@ class PowerFlow : public ElectricCalculation
std::vector<std::complex<double> > power,
int numPV,
int numPQ,
- std::vector<double> dPdQ);
+ std::vector<double> dPdQ,
+ double inertia);
+ bool CalculateMotorsReactivePower(std::vector<std::complex<double> > voltage,
+ std::vector<std::complex<double> > &power);
std::vector<std::vector<std::complex<double> > > m_yBus;
wxString m_errorMsg = "";
int m_numberOfBuses = 0;
+ int m_iterations = 0;
};
#endif // POWERFLOW_H