diff options
author | Thales Lima Oliveira <thaleslima.ufu@gmail.com> | 2017-01-10 16:12:44 -0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-10 16:12:44 -0200 |
commit | 76696ec9dca9d8b8f7eb01d03fb15b47cc6a8d5b (patch) | |
tree | 5b458c70a0cb301173d1b808374a0f367813dab5 /Project/Fault.h | |
parent | b44aa5ce9401889d948149cc100d1b2ef3611d04 (diff) | |
parent | 568d04c7f692e64bc29b2ca195c2de6af7fdd43a (diff) | |
download | PSP.git-76696ec9dca9d8b8f7eb01d03fb15b47cc6a8d5b.tar.gz PSP.git-76696ec9dca9d8b8f7eb01d03fb15b47cc6a8d5b.tar.xz PSP.git-76696ec9dca9d8b8f7eb01d03fb15b47cc6a8d5b.zip |
Merge pull request #22 from Thales1330/wip/fault
Wip fault
Diffstat (limited to 'Project/Fault.h')
-rw-r--r-- | Project/Fault.h | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/Project/Fault.h b/Project/Fault.h new file mode 100644 index 0000000..c3caef7 --- /dev/null +++ b/Project/Fault.h @@ -0,0 +1,70 @@ +#ifndef FAULT_H +#define FAULT_H + +#include "ElectricCalculation.h" +/** + * @class Fault + * @author Thales Lima Oliveira + * @date 10/01/2017 + * @file Fault.h + * @brief Calculate the fault of the system and update the elements data. + */ + +class Fault : public ElectricCalculation +{ +public: + /** + * @brief Contructor. + * @param elementList List of elements in workspace + */ + Fault(std::vector<Element*> elementList); + + /** + * @brief Default contructor. Use GetElementsFromList(std::vector<Element*> elementList). + */ + Fault(); + + /** + * @brief Destructor. + */ + ~Fault(); + + /** + * @brief Calculate the fault of the system. Return true if was possible the calculation. + * @param systemPowerBase System base of power. + */ + virtual bool RunFaultCalculation(double systemPowerBase); + + /** + * @brief Update the data of the elements. + * @param systemPowerBase System base of power. + */ + virtual void UpdateElementsFault(double systemPowerBase); + + /** + * @brief Get the error message generated in RunFaultCalculation(double systemPowerBase). + * @return Error message. + */ + virtual wxString GetErrorMessage() { return m_errorMsg; } + +protected: + wxString m_errorMsg = ""; + + std::vector<std::vector<std::complex<double> > > m_zBusPos; + std::vector<std::vector<std::complex<double> > > m_zBusNeg; + std::vector<std::vector<std::complex<double> > > m_zBusZero; + + std::vector<std::complex<double> > m_posFaultVoltagePos; + std::vector<std::complex<double> > m_posFaultVoltageNeg; + std::vector<std::complex<double> > m_posFaultVoltageZero; + + std::complex<double> m_fCurrentA; + std::complex<double> m_fCurrentB; + std::complex<double> m_fCurrentC; + + std::vector<std::complex<double> > m_posFaultVoltageA; + std::vector<std::complex<double> > m_posFaultVoltageB; + std::vector<std::complex<double> > m_posFaultVoltageC; +}; + +#endif // FAULT_H |