Power System Platform  2026w10a-beta
Loading...
Searching...
No Matches
PropertiesData.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <https://www.gnu.org/licenses/>.
16 */
17
18#ifndef PROPERTIESDATA_H
19#define PROPERTIESDATA_H
20
21#include "../elements/Element.h"
22#include "../elements/powerElement/PowerElement.h"
23#include "wx/language.h"
24
25enum PowerFlowMethod { NEWTON_RAPHSON = 0, GAUSS_SEIDEL, GAUSS_NEWTON };
26enum GUITheme { THEME_LIGHT = 0, THEME_DARK };
27enum class HarmLoadConnection { PARALLEL = 0, SERIES, DISCONNECTED };
28enum class PlotLib { wxMATH_PLOT = 0, wxCHART_DIR = 1 };
29enum class BusFreqEstimation { ANGLE_DERIVATION = 0, WASHOUT_FILTER = 1};
30
32 // General simulation data
33 double basePower = 100.0;
35 bool faultAfterPowerFlow = false;
36 bool scPowerAfterPowerFlow = false;
37 bool harmDistortionAfterPowerFlow = false;
38
39 // Power flow
40 PowerFlowMethod powerFlowMethod = GAUSS_SEIDEL;
41 double accFator = 1.0;
42 double powerFlowTolerance = 1e-7;
43 int powerFlowMaxIterations = 5000;
44 double initAngle = 0.0;
45 double newtonInertia = 1.0;
46 double gaussTolerance = 1e-2;
47
48 // Stability
49 double stabilityFrequency = 60.0;
50 double timeStep = 1e-2;
51 double stabilitySimulationTime = 10.0;
52 double stabilityTolerance = 1e-8;
53 int stabilityMaxIterations = 100;
54 int controlTimeStepRatio = 10;
55 double plotTime = 1e-2;
56 bool useCOI = true;
57 BusFreqEstimation busFreqEstimation = BusFreqEstimation::ANGLE_DERIVATION;
58 bool ignoreBusFreqEventStep = true;
59 double tf = 0.05;
60 double tw = 3.0 / (2.0 * M_PI * 60.0);
61
62 // ZIP load
63 bool useCompLoads = false;
64 double constImpedanceActive = 100.0;
65 double constCurrentActive = 0.0;
66 double constPowerActive = 0.0;
67 double constImpedanceReactive = 100.0;
68 double constCurrentReactive = 0.0;
69 double constPowerReactive = 0.0;
70 double underVoltageConstCurrent = 70.0;
71 double underVoltageConstPower = 70.0;
72
73 // Hamonics
74 HarmLoadConnection harmLoadConnection = HarmLoadConnection::PARALLEL;
75};
76
78 wxLanguage language = wxLANGUAGE_ENGLISH;
79 GUITheme theme = THEME_LIGHT;
80 //bool useOpenGL = true;
81 PlotLib plotLib = PlotLib::wxCHART_DIR;
82 wxString labelFont = "CMU Serif";
83 int labelFontSize = 10;
84 wxFileName atpPath;
85 wxString atpWorkFolder = "";
86};
87
89 double initFreq = 0.0;
90 double finalFreq = 1500.0;
91 double stepFreq = 1.0;
92 int injBusNumber = -1;
93};
94
103{
104public:
107
108 SimulationData GetSimulationPropertiesData() const { return m_simulData; }
109 void SetSimulationPropertiesData(SimulationData simulationData) { m_simulData = simulationData; }
110 GeneralData GetGeneralPropertiesData() const { return m_genData; }
111 void SetGeneralPropertiesData(GeneralData generalData) { m_genData = generalData; }
112
113 void SetFreqRespData(const FreqResponseData& freqRespData) { this->m_freqRespData = freqRespData; }
114 const FreqResponseData& GetFreqRespData() const { return m_freqRespData; }
115
116protected:
117 SimulationData m_simulData;
118 GeneralData m_genData;
119 FreqResponseData m_freqRespData;
120};
121
122#endif // PROPERTIESDATA_H
ElectricalUnit
Electrical units.
General and simulation data manager.