Power System Platform  2024w23a
Loading...
Searching...
No Matches
ElectricCalculation Class Reference

Base class of electric calculations, with general methods. More...

#include <ElectricCalculation.h>

Inheritance diagram for ElectricCalculation:

Public Member Functions

 ElectricCalculation ()
 Constructor.
 
 ~ElectricCalculation ()
 Destructor.
 
virtual void GetElementsFromList (std::vector< Element * > elementList)
 Separate the power elements from a generic list.
 
virtual bool GetYBus (std::vector< std::vector< std::complex< double > > > &yBus, double systemPowerBase, YBusSequence sequence=POSITIVE_SEQ, bool includeSyncMachines=false, bool allLoadsAsImpedances=false, bool usePowerFlowVoltagesOnImpedances=false)
 Get the admittance matrix from the list of elements (use GetElementsFromList first).
 
virtual bool InvertMatrix (std::vector< std::vector< std::complex< double > > > matrix, std::vector< std::vector< std::complex< double > > > &inverse)
 Invert a matrix.
 
virtual void UpdateElementsPowerFlow (std::vector< std::complex< double > > voltage, std::vector< std::complex< double > > power, std::vector< BusType > busType, std::vector< ReactiveLimits > reactiveLimit, double systemPowerBase)
 Update the elements after the power flow calculation.
 
void ABCtoDQ0 (std::complex< double > complexValue, double angle, double &dValue, double &qValue)
 
void DQ0toABC (double dValue, double qValue, double angle, std::complex< double > &complexValue)
 
std::vector< std::complex< double > > GaussianElimination (std::vector< std::vector< std::complex< double > > > matrix, std::vector< std::complex< double > > array)
 
std::vector< double > GaussianElimination (std::vector< std::vector< double > > matrix, std::vector< double > array)
 
Machines::SyncMachineModel GetMachineModel (SyncGenerator *generator)
 
std::vector< std::complex< double > > ComplexMatrixTimesVector (std::vector< std::vector< std::complex< double > > > matrix, std::vector< std::complex< double > > vector)
 
void GetLUDecomposition (std::vector< std::vector< std::complex< double > > > matrix, std::vector< std::vector< std::complex< double > > > &matrixL, std::vector< std::vector< std::complex< double > > > &matrixU)
 
std::vector< std::complex< double > > LUEvaluate (std::vector< std::vector< std::complex< double > > > u, std::vector< std::vector< std::complex< double > > > l, std::vector< std::complex< double > > b)
 
bool GetParentBus (Element *childElement, Bus *&parentBus)
 
bool GetParentBus (Element *childElement, Bus *&parentBus1, Bus *&parentBus2)
 
const std::vector< PowerElement * > GetPowerElementList () const
 Get the power elements of the system (use GetElementsFromList first).
 
const std::vector< Bus * > GetBusList () const
 Get the buses of the system (use GetElementsFromList first).
 
const std::vector< Capacitor * > GetCapacitorList () const
 Get the capacitors of the system (use GetElementsFromList first).
 
const std::vector< IndMotor * > GetIndMotorList () const
 Get the induction motors of the system (use GetElementsFromList first).
 
const std::vector< Inductor * > GetInductorList () const
 Get the inductors of the system (use GetElementsFromList first).
 
const std::vector< Line * > GetLineList () const
 Get the lines of the system (use GetElementsFromList first).
 
const std::vector< Load * > GetLoadList () const
 Get the loads of the system (use GetElementsFromList first).
 
const std::vector< SyncGenerator * > GetSyncGeneratorList () const
 Get the synchronous generators of the system (use GetElementsFromList first).
 
const std::vector< SyncMotor * > GetSyncMotorList () const
 Get the synchronous motors of the system (use GetElementsFromList first).
 
const std::vector< Transformer * > GetTransformerList () const
 Get the transformers of the system (use GetElementsFromList first).
 
const std::vector< HarmCurrent * > GetHarmCurrentList () const
 Get the harmonic current source of the system (use GetElementsFromList first).
 

Protected Member Functions

void GetNextConnection (const unsigned int &checkBusNumber, const std::vector< std::vector< std::complex< double > > > &yBus, std::vector< bool > &connToSlack)
 

Protected Attributes

std::vector< PowerElement * > m_powerElementList
 
std::vector< Bus * > m_busList
 
std::vector< Capacitor * > m_capacitorList
 
std::vector< IndMotor * > m_indMotorList
 
std::vector< Inductor * > m_inductorList
 
std::vector< Line * > m_lineList
 
std::vector< Load * > m_loadList
 
std::vector< SyncGenerator * > m_syncGeneratorList
 
std::vector< SyncMotor * > m_syncMotorList
 
std::vector< Transformer * > m_transformerList
 
std::vector< HarmCurrent * > m_harmCurrentList
 

Detailed Description

Base class of electric calculations, with general methods.

Author
Thales Lima Oliveira
Date
09/01/2017

Member Function Documentation

◆ GetBusList()

const std::vector< Bus * > ElectricCalculation::GetBusList ( ) const
inline

Get the buses of the system (use GetElementsFromList first).

Returns
A list of bus elements.

◆ GetCapacitorList()

const std::vector< Capacitor * > ElectricCalculation::GetCapacitorList ( ) const
inline

Get the capacitors of the system (use GetElementsFromList first).

Returns
A list of capacitor elements.

◆ GetElementsFromList()

void ElectricCalculation::GetElementsFromList ( std::vector< Element * > elementList)
virtual

Separate the power elements from a generic list.

Parameters
elementListList of generic elements.

◆ GetHarmCurrentList()

const std::vector< HarmCurrent * > ElectricCalculation::GetHarmCurrentList ( ) const
inline

Get the harmonic current source of the system (use GetElementsFromList first).

Returns
A list of harmonic current sources elements.

◆ GetIndMotorList()

const std::vector< IndMotor * > ElectricCalculation::GetIndMotorList ( ) const
inline

Get the induction motors of the system (use GetElementsFromList first).

Returns
A list of induction motor elements.

◆ GetInductorList()

const std::vector< Inductor * > ElectricCalculation::GetInductorList ( ) const
inline

Get the inductors of the system (use GetElementsFromList first).

Returns
A list of inductor elements.

◆ GetLineList()

const std::vector< Line * > ElectricCalculation::GetLineList ( ) const
inline

Get the lines of the system (use GetElementsFromList first).

Returns
A list of line elements.

◆ GetLoadList()

const std::vector< Load * > ElectricCalculation::GetLoadList ( ) const
inline

Get the loads of the system (use GetElementsFromList first).

Returns
A list of load elements.

◆ GetPowerElementList()

const std::vector< PowerElement * > ElectricCalculation::GetPowerElementList ( ) const
inline

Get the power elements of the system (use GetElementsFromList first).

Returns
A list of power elements.

◆ GetSyncGeneratorList()

const std::vector< SyncGenerator * > ElectricCalculation::GetSyncGeneratorList ( ) const
inline

Get the synchronous generators of the system (use GetElementsFromList first).

Returns
A list of synchronous generator elements.

◆ GetSyncMotorList()

const std::vector< SyncMotor * > ElectricCalculation::GetSyncMotorList ( ) const
inline

Get the synchronous motors of the system (use GetElementsFromList first).

Returns
A list of synchronous motor elements.

◆ GetTransformerList()

const std::vector< Transformer * > ElectricCalculation::GetTransformerList ( ) const
inline

Get the transformers of the system (use GetElementsFromList first).

Returns
A list of transformer elements.

◆ GetYBus()

bool ElectricCalculation::GetYBus ( std::vector< std::vector< std::complex< double > > > & yBus,
double systemPowerBase,
YBusSequence sequence = POSITIVE_SEQ,
bool includeSyncMachines = false,
bool allLoadsAsImpedances = false,
bool usePowerFlowVoltagesOnImpedances = false )
virtual

Get the admittance matrix from the list of elements (use GetElementsFromList first).

Parameters
yBusAdmittance matrix. The previous content will be erased.
systemPowerBaseBase power of the system.
sequenceSequence of admittance matrix (positive, negative and zero).
includeSyncMachinesInclude the synchronous machines on calculation.
Returns
Return true if was possible to build the admittance matrix.

◆ InvertMatrix()

bool ElectricCalculation::InvertMatrix ( std::vector< std::vector< std::complex< double > > > matrix,
std::vector< std::vector< std::complex< double > > > & inverse )
virtual

Invert a matrix.

Parameters
matrixMatrix to invert.
inverseInverted matrix. The previous content will be erased.
Returns
Return true if was possible to invert the matrix.

◆ UpdateElementsPowerFlow()

void ElectricCalculation::UpdateElementsPowerFlow ( std::vector< std::complex< double > > voltage,
std::vector< std::complex< double > > power,
std::vector< BusType > busType,
std::vector< ReactiveLimits > reactiveLimit,
double systemPowerBase )
virtual

Update the elements after the power flow calculation.

Parameters
voltageArray with the buses voltages.
powerArray with the buses injected power.
busTypeArray with the buses type.
reactiveLimitArray with the reactive limit data.
systemPowerBaseBase power of the system.

The documentation for this class was generated from the following files: