Impedance Module¶
Impedance calculation module for interfacing with the ERACS Harmonic Impedance engine and running studies. Note that only single point impedance studies are supported in the Python Interface, trying to set the study type to an impedance survey will produce an error. Impedance surveys can be mimicked in Python by simply running repeated studies across each bar.
-
class
TEracsImpedance
¶ The low-level ERACS Impedance calculation module. Use this to run Harmonic Impedance studies, or use the TEracsImpedanceEasy class for a simplified approach.
- Inherits
Calculations.TEracsModuleLoadflowDependent
- This module is dependent on Loadflow.
-
NumberOfPoints
¶ Number of points in the Harmonic Impedance study.
- Type
Integer.
- Writable
False.
-
HarmonicValues
¶ Harmonic values as a list.
- Type
List.
- Writable
False.
-
SetupCalculation
(ASetupSimple: Eracs.ImpedanceRecords.THZSetUpData)¶ The second method to call in the Impedance DLL after PassTDFBlock. It passes all required calculation parameters needed to run Harmonic Impedance.
- Parameters
ASetupSimple (THZSetUpData) – Object which contains a record structure holding all of the setup information and is passed to Impedance DLL.
- Raises
TEracsDataError – If the injection bus is not set first.
-
LoadImpedanceProfileData
(AData)¶ Pass in the impedance profile for a grid/shunt element.
- Parameters
AData (TImpedanceProfileData) – The data object to pass into the DLL procedure.
- Returns
None, nothing is returned.
-
GetFileNames
(AOutParameterList: list)¶ - Parameters
AOutParameterProperties – 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].
-
GetResult
(AResultTypeCode, AResultDictionary)¶ Get the next Harmonic Impedance result for a particular element specified by the result typecode.
- Parameters
AResultTypeCode (str) – The typecode of the results, for example: ‘busbar’ or ‘summary’.
AResultDictionary (dict) – This dictionary is populated with the results from the study for the next item.
- Returns
True if the dictionary contains a result (there were more results available).
-
class
TEracsImpedanceEasy
¶ The easy way of running Harmonic Impedance studies. This class contains an instance of TEracsImpedance which it uses to pass in data and extract results. The results can be accessed via properties.
- Inherits
EasyLoadflowDependent.TEracsEasyLoadflowDependent
- All Loadflow-dependent easy calculation modules should inherit from this class.
-
SummaryResults
¶ The summary results for the Harmonic Impedance study.
- Type
Dictionary.
- Writable
False.
-
BusbarHarmonicImpedance
¶ The busbar harmonic results for the study.
- Type
- Writable
False.
-
BusbarTransferCoefficient
¶ The busbar transfer coefficient results for the study.
- Type
- Writable
False.
-
InjectionBus
¶ Injection busbar, one of the Harmonic Impedance setup parameters.
- Type
String.
- Writable
True.
-
HarmOff
¶ Harmonic offset, one of the Harmonic Impedance setup parameters.
- Type
Integer.
- Writable
True.
-
HarmMin
¶ Minimum harmonic, one of the Harmonic Impedance setup parameters.
- Type
Integer.
- Writable
True.
-
HarmMax
¶ Maximum harmonic, one of the Harmonic Impedance setup parameters.
- Type
Integer.
- Writable
True.
-
HarmInt
¶ Harmonic intervals, one of the Harmonic Impedance setup parameters.
- Type
Integer.
- Writable
True.
-
NumberOfPoints
¶ Total number of points in the summary results.
- Type
Integer.
- Writable
False.
-
HarmonicValues
¶ List of all harmonic values in the summary results.
- Type
List.
- Writable
False.
-
OutputUnits
¶ The output units used for the harmonic values (1 = pu, 2 = Ohms).
- Type
Integer.
- Writable
True.
-
StudyType
¶ Harmonic Impedance study type, survey’s are not supported and must be a single point study.
- Type
Integer.
- Writable
True.
-
ClearResults
()¶ Clears all Harmonic Impedance results (usually called in the parent class RunCalc method to clear all previous results to prevent polluting the new results with the old ones).