Loadflow Module
ERACS Loadflow engine interface. This module is crucial for many types of studies, as other calculations such as Fault, Harmonic Injection and Harmonic Impedance depend on steady-state results produced by Loadflow.
- class TEracsLoadflow
Low-level implementation of the Loadflow interface. All low-level methods in this class interact directly with the DLL procedures.
- Inherits
- property VersionNumber
Version number of the calculation module.
- Type
str.
- Writable
False.
- property ProgramNumber
Program number of the calculation.
- Type
int.
- Writable
False.
- Example
1 = Loadflow
- SetupCalculation(ASetupSimple)
The first method to call in the Loadflow DLL. It passes all required calculation parameters needed to run Loadflow.
- Parameters
ASetupSimple (TLFSetUpData) – The setup data object, passes the Loadflow setup parameters to Loadflow.
- Returns
True if successful.
- LoadBusbarData(ABusbarData)
Loads a busbar into the Loadflow engine.
- Parameters
ABusbarData (TLFBusData) – The busbar data.
- LoadLineData(ATransmissionLineData)
Loads a transmission line into the Loadflow engine.
- Parameters
ATransmissionLineData (TLFLineCableData) – The transmission line data.
- LoadCableData(ACableData)
Loads a cable into the Loadflow engine.
- Parameters
ACableData (TLFLineCableData) – The cable data.
- LoadSeriesElementData(ASeriesElementData)
Loads a series element into the Loadflow engine.
- Parameters
ASeriesElementData (TLFSeriesElementData) – The series element data.
- LoadTapData(ATapChangerData)
Loads a tap changer into the Loadflow engine.
- Parameters
ATapChangerData (TLFTapData) – The tap changer data.
- LoadTxData(ATransformerData)
Loads a transformer into the Loadflow engine.
- Parameters
ATransformerData (TLFTxData) – The transformer data.
- LoadIndMachineData(AInductionMachineData)
Loads an induction machine into the Loadflow engine.
- Parameters
AInductionMachineData (TLFIndMachData) – The induction machine data.
- LoadSyncMachineData(ASynchronousMachineData)
Loads a synchronous machine into the Loadflow engine.
- Parameters
ASynchronousMachineData (TLFSyncMachData) – The synchronous machine data.
- LoadInfiniteGeneratorData(AInfiniteGeneratorData)
Loads an infinite generator/grid infeed into the Loadflow engine.
- Parameters
AInfiniteGeneratorData (TLFInfGenData) – The infinite generator data.
- LoadShuntData(AShuntData)
Loads a shunt connected load into the Loadflow engine.
- Parameters
AShuntData (TLFShuntData) – The shunt data.
- LoadBusSectionData(ABusSectionData)
Loads a bus section into the Loadflow engine.
- Parameters
ABusSectionData (TLFBusSectionData) – The bus section data.
- GetTDFBlock(ATDFBlockObject)
The TDF block is generated from the Loadflow module, and is used to quickly and easily pass data onto other dependent calculation modules after running Loadflow. This method loads the TDF block from memory.
- Parameters
ATDFBlockObject (TEracsTdfBlock) – The TDF block to populate with data.
- DisposeTDFBlock()
Dispose the TDF block which was loaded up from memory.
- GetFileNames(AOutParameterList)
- Parameters
AOutParameterProperties (list) – This argument acts as an out parameter. An empty list should be passed in, and the various file names will be appended to the list [lstResults, cdResults, cdData].
- class TEracsLoadflowEasy
High-level implementation of the Loadflow interface. All methods interact with the low-level class and NOT the DLL procedures directly.
- Inherits
- property TdfBlock
The TDF block generated from Loadflow and needed for Fault, Harmonic Impedance and other Loadflow-dependent calculation modules.
- Type
- Writable
False.
- property SummaryResults
Summary results from the Loadflow study.
- Type
dict.
- Writable
False.
- property BusbarResults
Busbar results from the Loadflow study.
- Type
- Writable
False.
- property TransmissionLineResults
Transmission line results from the Loadflow study.
- Type
- Writable
False.
- property CableResults
Cable results from the Loadflow study.
- Type
- Writable
False.
- property SeriesElementResults
Series element results from the Loadflow study.
- Type
- Writable
False.
- property TapChangerResults
Tap changer results from the Loadflow study.
- Type
- Writable
False.
- property TransformerResults
Transformer results from the Loadflow study.
- Type
- Writable
False.
- property InductionMachineResults
Induction machine results from the Loadflow study.
- Type
- Writable
False.
- property SynchronousMachineResults
Synchronous machine results from the Loadflow study.
- Type
- Writable
False.
- property GridInfeedResults
Grid infeed results from the Loadflow study.
- Type
- Writable
False.
- property ShuntResults
Shunt results from the Loadflow study.
- Type
- Writable
False.
- property BusSectionResults
Bus section results from the Loadflow study.
- Type
- Writable
False.
- property CsvDataFileName
CSV data file path and name, generated from Loadflow.
- Type
str.
- Writable
False.
- property BusbarsOutOfVoltageRange
A list of all busbars which are outside of their voltage range in the Loadflow study. This will return an empty list if the Loadflow study has yet to be performed.
- Type
list.
- Writable
False.
- property OverloadedElements
A list of all elements which are overloaded in the Loadflow study. This will return a dictionary containing keys of the different element typecodes. The data for each key will be the list of elements of that type which were overloaded. If the Loadfow study is yet to be performed, each list in each key will be empty.
- Type
dict.
- Writable
False.
- property BaseMva
The base MVA Loadflow parameter to be passed in when setting up.
- Type
float.
- Writable
True.
- property BaseFrequency
The base frequency (Hz) Loadflow parameter to be passed in when setting up.
- Type
float.
- Writable
True.
- property ConvergenceTolerance
The convergence tolerance (pu) Loadflow parameter to be passed in when setting up.
- Type
float.
- Writable
True.
- property NumberOfIterations
The number of iterations Loadflow parameter to be passed in when setting up.
- Type
int.
- Writable
True.
- property OverloadThreshold
The overload threshold (pu) Loadflow parameter to be passed in when setting up.
- Type
float.
- Writable
True.
- property PMultiplier
The shunt real power multiplier Loadflow parameter to be passed in when setting up.
- Type
float.
- Writable
True.
- property QMultiplier
The shunt reactive power multiplier Loadflow parameter to be passed in when setting up.
- Type
float.
- Writable
True.
- property TapSelector
The tap selector Loadflow parameter to be passed in when setting up.
- Type
int.
- Writable
True.
- property BusLowVoltLimit
The bus lower voltage limit Loadflow parameter to be passed in when setting up.
- Type
float.
- Writable
True.
- property BusHighVoltLimit
The bus upper voltage limit Loadflow parameter to be passed in when setting up.
- Type
float.
- Writable
True.
- property InitialTapPosition
The initial tap position used during Loadflow.
- Type
int.
- Writable
True.
- ClearResults()
Clears all Loadflow results ready for the next Loadflow study. This clears the lists but keeps a reference to the (now) empty list.
- GetResultsFromTypecode(ATypecode)
Get the list of results from the typecode provided.
- Parameters
ATypecode – The typecode.
- SetData(AEracsDataObject)
This method overrides the setter method in TEracsEasy, calls the parent class method, and sets the values of the study properties if HeaderRecords and LoadflowRecords aren’t empty.
- Parameters
AEracsDataObject (TEracsData) – The data object to be assigned to the internal Data attribute.
- RunCalc()
The main method for running a Loadflow study. RunCalc will run a Loadflow study using the _Data object and the Loadflow object.
- ResultsInXml(AXmlObject)
Use this method as a callback function for the OpenInBrowserAsSvg method in TEracsData objects. This method will append all results for Loadflow to the given XML object.
- Required
LXML Python library.
- Parameters
AXmlObject – The XML object which should be a <results> element, so that <loadflow>…</> results may be appended.
- Returns
None, it is appending to the XML object.