Authors: Sergio A. Dorado-Rojas ([email protected]), Giuseppe Laera, Marcelo de Castro Fernandes, Dr. Tetiana Bogodorova, and Dr. Luigi Vanfretti ([email protected])
This work was accepted and presented at The 14th International Modelica Conference. Please cite it if you find it useful.
Dorado-Rojas, S. A., Laera, G., de Castro Fernandes, M., Bogodorova, T., & Vanfretti, L. (2021). Power Flow Record Structures to Initialize OpenIPSL Phasor Time-Domain Simulations with Python.
This repo contains an implementation of the Single Machine Infinite Bus (SMIB) system developed with the Open Instance Power System Library (OpenIPSL). The Python code to generate the power flow records for the models can be found in pf2rec. Also available are the SMIB models on the 1.5.0 release and the 2.0.0 version of the library
Accompanying Material:
- Introductory slides of the YouTube tutorial
- A detailed step-by-step guideline for setting up the Single Machine Infinite Bus (SMIB) model
- To install GridCal alongside Miniconda, please follow the steps here
- PSSE files for the SMIB system
The full playlist of the tutorial we prepared as part of this repository can be found in the link below
The tutorial consists of six parts:
- Part 1: GridCal Installation
- Part 2: SMIB Assembly with OpenIPSL (version 2.0.0)
- Part 3: Power Flow Records Integration
- Part 4.1: Power Flow Generation using GridCal (single power flow)
- Part 4.2: Power Flow Record Integration
- Part 4.3: Time-Series Power Flow Computation using GridCal and Integration to the OpenIPSL Model
The Python scripts shown in the tutorial are listed here:
- Creating the power flow record structure for an existing Modelica model
- Generating a single power flow result using GridCal
- Running a time-series power flow and writing the corresponding power flow records
You may reuse the code here right out-of-the-box to populate power flow records for an existing OpenIPSL model provided the power flow network model in PSSE format (.raw
file). To generate the power flow structure, place your model inside the models
subdirectory in the folders _new
(for OpenIPSL 2.0.0) or _old
(for OpenIPSL 1.5.0). Then, run:
python create_records.py --model <<model_name>> --version <<version_name>>
For instance, to generate a base case power flow for the SMIB model developed with the 1.5.0 release of the library, the command
python create_records.py --model SMIB --version 1.5.0
creates the record structure for the SMIB model with OpenIPSL 1.5.0.
To run a power flow computation and write the corresponding record, do:
python run_pf.py --model <<model_name>> --version <<version_name>>
For example, to populate a base case power flow for the SMIB model built on OpenIPSL 2.0.0, do:
python run_pf.py --model SMIB --version 2.0.0