A Python package to assist in the use of Python within PowerFactory
Project description
pfgadgets package
Description: This package is designed to assist in the use of python within the powerfactory environment
Classes List:
- CreateSet
- FrequencySweep
- GetData
- GetObject
- GetPlot
- HarmonicLoadFlow
- LoadFlow
- ShortCircuit
Class Description
pfgadgets.CreateSet
CreateSet(setName, *args, setType=5, studyCaseName=None)
Description: This class is designed to create a set
Parameters:
- setName - Name of set to create
- setType - Defines the type of set to create. Refer PF for types
- studyCaseName - Defines the name of the study case to create set in. If None then will create in active study case
Attributes:
- .set - Returns the created set object
pfgadgets.FrequencySweep
FrequencySweep(*args, method=0, init=0, start=50, stop=2500, results=None)
Description: This class is designed to perform a frequency sweep calaculation
Parameters:
- method - defines the frequency sweep method (0 - balanced, 1 - unbalanced)
- init - defines whether to initialise with load flow
- start - defines the starting frequency
- stop - defines the ending frequency
- results - defines which results variable to save results to
pfgadgets.GetData
GetData(setName, attributeList, *args, resultHeadings=None)
Description: This class is designed to collect data from a set and offers export to csv option
Parameters:
- setName - Name of the set to extract data from
- attributeList - List of attributes to get data from
- resultHeadings - List of strings for data frame headings
Attributes:
- .obj - Returns object/s that data was collected from
- .name - Returns name of object/s that data was collected from
- .attribute - Returns list of attributes that was collected
- .result - Returns the results data frame that holds the extracted data
pfgadgets.GetData.export
pfgadgets.GetData.export(fileName = 'results', filePath = None, replace=False)
Description: Exports the collected data to a csv
Parameters:
- fileName - Name of file that data will export to. Should not include file extension.
- filePath - Defines directory where csv will export to. If None then export to script directory
- replace - Defines whether to replace existing files or not. (False - do not replace existing, True - replace existing)
pfgadgets.GetObject
pfgadgets.GetObject(objectName)
Description: This class is deisnged to collect a given object
Parameters:
- objectName - Name of object to collect
Attributes:
- .obj - Returns the collected object
- .name - Returns the name of the collected object
pfgadgets.GetPlot
pfgadgets.GetPlot(plotName, pageType='SetVipage')
Description: This class is designed to collect a plot page and offers an export option
Parameters:
- plotName - Name of plot to be collected
- pageType - Defined the type of page to be collected
Attributes:
- .plot - Returns to plot objects that was collected
- .title - Returns the title object that may be included in a plot page
pfgadgets.GetPlot.export
pfgadgets.GetPlot.export(*args, fileType='wmf', filePath=None, frame = 0, fileName=None, replace=False)
Description: Exports the plot page to the desired type and location
Parameters:
- fileType - Defines the extension of the exported plot page file
- filePath - Defines directory where csv will export to. If None then export to script directory
- frame - Defines whether to include a page fram or not (0 - no frame, 1 - include frame)
- fileName - Name of file that data will export to. Should not include file extension.
- replace - Defines whether to replace existing files or not. (False - do not replace existing, True - replace existing)
pfgadgets.HarmonicLoadFlow
pfgadgets.HarmonicLoadFlow(*args, method=0)
Description: This class is designed to perform a harmonic load flow calcualtion
Parameters:
- method - defines the harmonic load flow method (0 - balanced, 1 - unbalanced)
pfgadgets.LoadFlow
pfgadgets.LoadFlow(method=0, autoTap=0, feederScaling=0, opScen=None)
Description: This class is designed to perform a load flow calculation
Parameters:
- method - defines the load flow method (0 - balanced, 1 - unbalanced)
- autoTap - defines whether to enable automatic tap changine (0 - off, 1 - on)
- feederScaling - defines whether to enable feeder load scaling (0 - off, 1 - on)
- opScen - defines the operation scenario to activate before calculation (if None then then no operation sceanrio will be activated)
pfgadgets.ShortCircuit
pfgadgets.ShortCircuit(objectName, faultType='3psc', calculate=0, setSelect=None, opScen=None)
Description: This class is designed to perform a short-circuit calculation
Parameters:
- objectName - Name of object to perform short-circuit calculation on. If setSelect!=None then a set can be passed instead of an object
- faultType - Defines the type of fault to use during short-circuit calculation
- calculate - Defines whether to use maximum or minimum fault calculation (0 - maximum, 1 - minimum)
- setSelect - Defines whether a set or single object is used for calculation (None - single object, != None - set)
Attributes:
- .obj - Returns object/s where short-circuit calculation was performed
- .name - Returns name/s of objects where short-circuit calculation was performed
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file pfgadgets-0.0.2.tar.gz
.
File metadata
- Download URL: pfgadgets-0.0.2.tar.gz
- Upload date:
- Size: 6.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 70a6fe16f0c86909dad64113f82df81cb5ae0f4d63902d64b926662135c95dd2 |
|
MD5 | 1a874d634d7e5be0960445c95a3b021a |
|
BLAKE2b-256 | 082b691e0f7a1a9c50349075c0ba8b2086d829ae0be9719d351b9ad35611043d |
File details
Details for the file pfgadgets-0.0.2-py3-none-any.whl
.
File metadata
- Download URL: pfgadgets-0.0.2-py3-none-any.whl
- Upload date:
- Size: 6.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ca1146464d051e5979868726f9187be5bb5c5bbf562cfcd7f69bf7291666fdbc |
|
MD5 | 0201bac6bf4bbe461d9b6cb3df3be895 |
|
BLAKE2b-256 | 9fe62dfddc039a35134ed567a462640a05c6440d5b1565fdaf02ed5c265d2d43 |