summaryrefslogtreecommitdiffstats
path: root/Project/IndMotor.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/IndMotor.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/IndMotor.h')
-rw-r--r--Project/IndMotor.h66
1 files changed, 66 insertions, 0 deletions
diff --git a/Project/IndMotor.h b/Project/IndMotor.h
index c210279..760a65a 100644
--- a/Project/IndMotor.h
+++ b/Project/IndMotor.h
@@ -24,10 +24,74 @@ class IndMotorForm;
struct IndMotorElectricalData {
wxString name;
+ double ratedPower = 100.0;
+ ElectricalUnit ratedPowerUnit = UNIT_MVA;
double activePower = 100.0;
ElectricalUnit activePowerUnit = UNIT_MW;
double reactivePower = 0.0;
ElectricalUnit reactivePowerUnit = UNIT_MVAr;
+
+ bool useMachinePowerAsBase = true;
+
+ // Stability
+ bool plotIndMachine = false;
+ double inertia = 1.0; // Motor and load inertia
+ double s0; // Initial slip
+ double q0; // Initial reactive power
+ double r1 = 0.0; // Stator resistence data
+ double x1 = 1.0; // Stator reactance data
+ double r2 = 1.0; // Rotor resistence data
+ double x2 = 0.0; // Rotor reactance data
+ double xm = 100.0; // Magnetizing reactance data
+ double kf = 0.0; // Cage factor
+ bool useKf = false;
+
+ // Transient values
+ double xt = 1.0; // Transient reactance
+ double x0 = 1.0; // Open-circuit reactance
+ double r1t = 0.0; // Stator resistence in system power base
+ double x1t = 1.0; // Stator reactance in system power base
+ double r2t = 1.0; // Rotor resistence in system power base
+ double x2t = 0.0; // Rotor reactance in system power base
+ double xmt = 100.0; // Magnetizing reactance in system power base
+
+ double t0 = 1.0; // Open-circuit time constant
+
+ double aw = 1.0; // Velocity constant torque
+ double bw = 0.0; // Velocity linear dependent torque
+ double cw = 0.0; // Velocity quadratic dependent torque
+ double as = 0.0; // Slip constant torque
+ double bs = 0.0; // Slip linear dependent torque
+ double cs = 0.0; // Slip quadratic dependent torque
+
+ // Internal machine variables
+ double tranEr = 0.0;
+ double tranEm = 0.0;
+ double ir = 0.0;
+ double im = 0.0;
+
+ // Variables to extrapolate
+ double oldIr = 0.0;
+ double oldIm = 0.0;
+ double oldTe = 0.0;
+
+ // Integration constants
+ IntegrationConstant icSlip;
+ IntegrationConstant icTranEr;
+ IntegrationConstant icTranEm;
+
+ // Machine state variables
+ std::complex<double> terminalVoltage;
+ std::vector<double> terminalVoltageVector;
+ double slip = 1.0; // Machine slip
+ std::vector<double> slipVector;
+ double te;
+ std::vector<double> electricalTorqueVector;
+ std::vector<double> mechanicalTorqueVector;
+ std::vector<double> velocityVector;
+ std::vector<double> currentVector;
+ std::vector<double> activePowerVector;
+ std::vector<double> reactivePowerVector;
};
/**
@@ -53,6 +117,8 @@ class IndMotor : public Machines
virtual IndMotorElectricalData GetPUElectricalData(double systemPowerBase);
virtual void SetElectricalData(IndMotorElectricalData electricalData) { m_electricalData = electricalData; }
+ virtual bool GetPlotData(ElementPlotData& plotData, PlotStudy study = STABILITY);
+
virtual rapidxml::xml_node<>* SaveElement(rapidxml::xml_document<>& doc, rapidxml::xml_node<>* elementListNode);
virtual bool OpenElement(rapidxml::xml_node<>* elementNode, std::vector<Element*> parentList);