Power System Platform  2026w23a-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
24#include "wx/language.h"
25#include <wx/colour.h>
26#include <wx/filename.h>
27#include <wx/math.h>
28
29#include "CommomTypes.h"
30
32 // General simulation data
33 double basePower = 100.0;
34 ElectricalUnit basePowerUnit = ElectricalUnit::UNIT_MVA;
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-3;
51 double stabilitySimulationTime = 10.0;
52 double stabilityTolerance = 1e-6;
53 int stabilityMaxIterations = 100;
54 int controlTimeStepRatio = 1;
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 GUIColour* GetGUIColour() { return &m_guiColour; }
109 void SetGUIColourTheme();
110 SimulationData GetSimulationPropertiesData() const { return m_simulData; }
111 void SetSimulationPropertiesData(SimulationData simulationData) { m_simulData = simulationData; }
112 GeneralData GetGeneralPropertiesData() const { return m_genData; }
113 void SetGeneralPropertiesData(GeneralData generalData) { m_genData = generalData; }
114
115 void SetFreqRespData(const FreqResponseData& freqRespData) { this->m_freqRespData = freqRespData; }
116 const FreqResponseData& GetFreqRespData() const { return m_freqRespData; }
117
118protected:
119 GUIColour m_guiColour;
120 SimulationData m_simulData;
121 GeneralData m_genData;
122 FreqResponseData m_freqRespData;
123};
124
125#endif // PROPERTIESDATA_H
General and simulation data manager.