Getting Started

Installing pandapower

For the installation of pandapipes it is necessary to install pandapower first. For the installation please follow the detailed instructions which can be found on the pandapower website.

Installing pandapipes

Through pip

The easiest way to install pandapipes is through pip:

  1. Open a command prompt (e.g. start –> cmd on windows systems)

  2. Install pandapipes by running:

     pip install pandapipes

Without pip

If you don’t have internet access on your system or don’t want to use pip for some other reason, pandapipes can also be installed without using pip:

  1. Download and unzip the current pandapipes distribution from PyPi under “Download files”.
  2. Open a command prompt (e.g. start –> cmd on windows systems) and navigate to the folder that contains the file with the command cd <folder> :

    cd %path_to_pandapipes%\pandapipes-x.x.x\
  3. Install pandapipes by running :

    python install

Development Version

To install the latest development version of pandapipes from github, simply follow these steps:

  1. Download and install git.

  2. Open a git shell and navigate to the directory where you want to keep your pandapipes files.

  3. Run the following git command:

     git clone
  4. Navigate inside the repository and check out the develop branch:

     cd pandapipes
     git checkout develop
  5. Open a command prompt (cmd or anaconda command prompt) and navigate to the folder where the pandapipes files are located. Run:

     pip install -e .

    This registers your local pandapipes installation with pip.

Test your installation

A first basic way to test your installation is to import all pandapower submodules to see if all dependencies are available:

import pandapipes
import pandapipes.plotting
import pandapipes.timeseries
import pandapipes.networks
import pandapipes.control
import pandapipes.component_models

If you want to be really sure that everything works fine, run the pandapower test suite:

  1. Install pytest if it is not yet installed on your system:

    pip install pytest
  2. Run the pandapower test suite:

     import pandapipes.test

If everything is installed correctly, all tests should pass or xfail (expected to fail).

A short introduction

A network in pandapipes is represented in a pandapipesNet object, which is a collection of pandas Dataframes. Each dataframe in a pandapipesNet contains the information about one pandapipes element, such as pipe, junction, sink, etc.

We consider the following simple example network as a minimal example:

Creating a network

The above network can be created in pandapipes as follows:

import pandapipes as pp
#create empty net
net = pp.create_empty_network(fluid="lgas")

#create junctions
j1 = pp.create_junction(net, pn_bar=1.05, tfluid_k=293.15, name="Junction 1")
j2 = pp.create_junction(net, pn_bar=1.05, tfluid_k=293.15, name="Junction 2")
j3 = pp.create_junction(net, pn_bar=1.05, tfluid_k=293.15, name="Junction 3")

#create junction elements
ext_grid = pp.create_ext_grid(net, junction=j1, p_bar=1.1, t_k=293.15, name="Grid Connection")
sink = pp.create_sink(net, junction=j3, mdot_kg_per_s=0.045, name="Sink")

#create branch elements
pipe = pp.create_pipe_from_parameters(net, from_junction=j1, to_junction=j2, length_km=0.1, diameter_m=0.05, name="Pipe")
valve = pp.create_valve(net, from_junction=j2, to_junction=j3, diameter_m=0.05, opened=True, name="Valve")

The pandapipes representation now looks like this:

Running a Pipe Flow

A pipeflow can be carried out with the pipeflow function:


When a pipeflow is run, pandapipes combines the information of all element tables and calculates the current state of the network. Afterwards, results are written into the result tables.

This minimal example is also available as a jupyter notebook.

Interactive Tutorials

There are jupyter notebook tutorials on different functionalities of pandapipes. They can be viewed as static tutorials on github or as interactive tutorials via Binder. Interactive tutorials take a moment to load.

Basic introduction:

More tutorials will be added soon.