powfacpy

1 Introduction

powfacpy is a wrapper around the Python API of PowerFactory© (software for power system simulation by DIgSILENT). You can automate almost anything in PowerFactory© with the native API, but the syntax can be verbose. Therefore, powfacpy provides features and interface classes to make your life easier.

For example, setting attributes of an object in the PowerFactory© database requires several lines of code with the native API. With the API of powfacpy, this is only one line:

set_attr(r"Network Model\Network Data\Grid\Terminal MV",{"uknom":33,"outserv":0})

Here we have set two attributes (uknom, outserv) of the object specified under the path Network Mod….

Plotting also requires many lines with the native API (you need to add the variable to the monitored variables, create a plot page, add the curve,..). Using powfacpy the syntax is succinct and similar to matplotlib. Just activate a plot and then plot variables of an object:

set_active_plot("Active power","§ PV plant")
plot(r"Network Model\Network Data\Grid\PV", "m:Psum:bus1")

powfacpy will save you time and make your code more readable. Get started with the Tutorials.

2 Why use powfacpy?

There are a number of reasons why you should consider using powfacpy:

  • Increase productivity
  • Write more readable code
  • Avoid running into similar problems, errors and obscurities as other users of the python interface of PowerFactory did before you
  • Having a standard way of doing things in your organization (e.g. a standard format for simulation result export)
  • Steep learning curve for PowerFactory beginners (helpful tutorials)

3 Installation

Using pip:

pip install powfacpy

4 Contact

simon.eberlein@iee.fraunhofer.de or open an issue.

5 Contribute

Contributions (new features, bug reports, feature requests, etc.) are very welcome on Github. If you want to contribute to the code base, please have a look at How to contribute.

6 About

powfacpy is an open source package which is mainly developed at Fraunhofer IEE and not associated with DIgSILENT.

Back to top