Power System Platform  2026w10a-beta
Loading...
Searching...
No Matches
Fault.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 FAULT_H
19#define FAULT_H
20
21#include "ElectricCalculation.h"
31{
32 public:
37 Fault(std::vector<Element*> elementList);
38
42 Fault();
43
47 ~Fault();
48
53 virtual bool RunFaultCalculation(double systemPowerBase);
54
59 virtual bool RunSCPowerCalcutation(double systemPowerBase);
60
65 virtual void UpdateElementsFault(double systemPowerBase);
66
71 virtual wxString GetErrorMessage() { return m_errorMsg; }
72 protected:
73 wxString m_errorMsg = "";
74
75 double m_systemPowerBase;
76
77 std::vector<std::vector<std::complex<double> > > m_zBusPos;
78 std::vector<std::vector<std::complex<double> > > m_zBusNeg;
79 std::vector<std::vector<std::complex<double> > > m_zBusZero;
80
81 std::vector<std::complex<double> > m_posFaultVoltagePos;
82 std::vector<std::complex<double> > m_posFaultVoltageNeg;
83 std::vector<std::complex<double> > m_posFaultVoltageZero;
84
85 std::complex<double> m_fCurrentA;
86 std::complex<double> m_fCurrentB;
87 std::complex<double> m_fCurrentC;
88
89 std::vector<std::complex<double> > m_posFaultVoltageA;
90 std::vector<std::complex<double> > m_posFaultVoltageB;
91 std::vector<std::complex<double> > m_posFaultVoltageC;
92};
93
94#endif // FAULT_H
Base class for electrical calculations providing general utility methods.
Calculate the fault of the system and update the elements data.
Definition Fault.h:31
virtual wxString GetErrorMessage()
Get the error message generated in RunFaultCalculation(double systemPowerBase).
Definition Fault.h:71
virtual bool RunFaultCalculation(double systemPowerBase)
Calculate the fault of the system. Return true if was possible the calculation.
Definition Fault.cpp:26
~Fault()
Destructor.
Definition Fault.cpp:25
Fault()
Default contructor. Use GetElementsFromList(std::vector<Element*> elementList).
Definition Fault.cpp:23
virtual bool RunSCPowerCalcutation(double systemPowerBase)
Calculate the short-circuit power of the system. Return true if was possible the calculation.
Definition Fault.cpp:422
virtual void UpdateElementsFault(double systemPowerBase)
Update the data of the elements.
Definition Fault.cpp:214