FM3217 – Hydro Power Systems
https://fm3217.dwe.no

Table of Contents

USN logo

Autumn 2025

Schedule

(see also TimeEdit for FM3217)

Week [Tue 08:15-10:00] Lectures (A-191)   [Thu 13:15-17:00] Tutorials (A-280)
34 [2025-08-19 Tue] L0 Introduction   [2025-08-21 Thu] T0 Version Control Systems
35 [2025-08-26 Tue] L1 Overview of Components (online only)   [2025-08-28 Thu] T1 Modelica Overview and Basics
36 [2025-09-02 Tue] L2 Energy Conversion   [2025-09-04 Thu] T2 Graphical modelling (online only)
37 [2025-09-09 Tue] L3 Turbine Damages and Classification   [2025-09-11 Thu] T3 Parameter dialogues
38 [2025-09-16 Tue] L4 Fluid Dynamics - Basics   [2025-09-18 Thu] T4 Electric kettle
39 [2025-09-23 Tue] L5 Fluid Dynamics - Conservation Laws & Media Density (online only)   [2025-09-25 Thu] T5 Introducing the Hydro Power Library
40 [2025-09-30 Tue] L6 Fluid Dynamics - Turbine Modelling   [2025-10-02 Thu] T6 Water-way with reservoirs
41 [2025-10-07 Tue] L7 Electrical Generator   [2025-10-09 Thu] T7 Water-way with turbine
42 [2025-10-14 Tue] L8 Power System Control I (online only)   [2025-10-16 Thu] T8 Power System Simulations (online only)
43 [2025-10-21 Tue] L9 Power System Control II (online only)   [2025-10-23 Thu] T9 Simulation of production changes
44 [2025-10-28 Tue] L10 TF-based modelling   [2025-10-30 Thu] T10 Simulating droop and load changes
45 [2025-11-04 Tue] Excursion ???   [2025-11-06 Thu] Free Modelica tools/T11 Transfer-function based model &
46 [2025-11-11 Tue] Summary   [2025-11-16 Sun] @23:55 hours deadline for Assignment hand-in
47   ---      
48   ---     ---
49 ??? 9-12 Exam      
50   ---     ---

Overview

Organisation
  • Teacher: Dietmar Winkler
  • When and where?

    • Tuesdays 08:15 to 10:00 hours in A-191
    • Thursdays 13:15 to 17:00 hours in A-280

    See also Schedule for details

Evaluation

Based on a simulation assignment (counts 30%) and individual examination (counts 70%), see below

  • Assignment
    Counts
    30%
    Details
    see Assignment
  • Final exam
    Counts
    70%
    Date
    tba
    Duration
    3 hours
    Location
    tba
    Notes
    Multiple choice, no helping aids allowed.

Literature

Mandatory

Kjølle(2001)

"Hydropower in Norway – Mechanical Equipment" by Arne Kjølle

(This textbook gives a pretty good overview of all the different parts of a Hydropower System.)

Modelon(2012)

"Hydro Power Library – Model Theory" by Modelon AB

(Explanation of the modelling theory of the Hydro Power Library)

Tiller(2014)

"Modelica by Example" Tiller, Michael M. (2014), free online book

Additional

Hydro power (general)
  • My link collection of images and videos of hydro power parts and systems.
  • "Guide on How to Develop a Small Hydropower Plant" by European Small Hydropower Association(ESHA) - Interesting summary of all different parts of a small hydropower plant.
Fluid mechanics
Electrical Power Systems
Modelica
Version Control Systems

Lectures

Videos
Each of the topics below contains direct links to the single videos.

In addition I've created a YouTube playlist with all lecture videos which will appear as soon as they are published.

L0 Introduction

Topics:
  • Course info
  • History of Hydro Power in Norway
  • Dangers of Hydro Power

L1 Overview of Components

Topics:
  • Kjølle(2001) Chapter 1 & 11
    • dams
    • intake (gates and valves)
    • tunnels and conduits
    • pressure shafts aka penstocks
    • valves

L3 Turbine Damages and Classification

Topics:
  • Turbine Damages
  • Turbine Classification, Kjølle(2001) Chapter 3
    • Introduction of reduced quantities
    • Deriving the speed number from reduced quantities
    • Meaning and usage of speed number
    • Performance diagram

L4 Fluid Dynamics - Basics

Topics:
  • Example design calculations for pelton turbines
  • Vector Mathematics
  • introduction of a "Control Volume"
  • in- and extensive properties
  • general formulation of change of properties
  • lumped parameter model

L5 Fluid Dynamics - Conservation Laws & Media Density

Topics:
  • Mass conservation
  • Energy conservation
  • Momentum conservation
  • Media density

L6 Fluid Dynamics - Turbine Modelling

Topics:
  • Mass flow calculations
    • Flow through volumes
    • Conservation of momentum
    • Flow through orifices and valves
    • Flow through open channels and reservoirs
  • Turbine modelling
    • tables based
    • component based
Clarification:

It is sometimes confusing when the factor \(C_v\) is calculated. The challenge is that one can express the dependency of \(C_v\) from either \(Q\) or \(\dot{m}\).

Since \(Q = \frac{\dot{m}}{\rho}\) we can either have:

\(C_v = \frac{Q}{A\cdot\sqrt{2(p_\text{in}-p_\text{out})\color{red}{/}\rho}}\)

or

\(C_v = \frac{\dot{m}}{A\cdot\sqrt{2(p_\text{in}-p_\text{out})\color{red}{\cdot}\rho}}\)

See also equation (19.a) in Modelon(2012).

L7 Electrical Generator

Topics:
  • Asynchronous and Synchronous Generators
  • Active and reactive power control

L8 Power System Control I

Topics:
  • Active and reactive power control on the grid
  • Introducing primary, secondary and tertiary control
  • Primary control aka droop control
  • Secondary control aka load frequency control (LFC) and automatic generation control (AGC)

L9 Power System Control II

Topics:
  • Continuation of the previous lecture:
    • Tertiary control: Area Control Error
    • Typical control structure from a turbine governor: HydrotrolSchematic.png

L10 TF-based modelling

Topics:
  • Transfer-function based modelling
Notes

Summary

Topics:
  • Summary of the course

Tutorials

Course files

The Modelica file I'm creating during the course are published in the CourseFiles repository on GitHub.

You need to make sure to sign up for a free account on https://github.com/ and send me your username.

I will then give you access rights so that you can clone the repository with your git tool from this url:

  • https://github.com/usn-modelling/FM3217

This should also automatically appear in GitKraken Desktop.

Videos

Each of the topics below contains direct links to the single videos. In addition I've created a YouTube playlist where all tutorial videos will be published.

T0 Version Control Systems

Tasks
  1. Get yourself a GitHub account (free plan) and email me your user name so I can in turn give you access to the course files repository.
  2. Follow the following GitKraken Desktop installation instructions and use your existing GitHub account to sign in. There is no need to create an additional GitKraken Desktop account.
  3. Watch the video tutorial Git Github Gitkraken: Version Control without Command Line
  4. Play with Learn Git Branching - an interactive online tutorial
Topics
The Git Parable
Links

T1 Modelica Overview and Basics

Task
  1. Install Dymola
Topics
  • introduction to Modelica
  • simple code based examples

T2 Graphical modelling

Topics
  • DC motor-drive
    • create a model using components from the MSL
    • create a component of your own
    • reuse of that component in a complete simulation model

T3 Parameter dialogues

Topics
  • DC motor-drive
    • first look at how to create parameter dialogues
    • creating documentation for your models
    • more advanced parameter dialogues by usage of "groups", "tabs" and Modelica.Units.SI
  • simple hydro system
    • create variants of one component using inheritance

T4 Electric kettle

Topics
  • A multi-domain modelling example of an electric kettle
  • A coffee and milk experiment

T5 Introducing the Hydro Power Library

Topics
  • Single conduit between water source and sink with
    • pressure difference
    • height difference
  • Single penstock with valve
    • effects of the closing time
  • Hydro Power System with source, conduit, penstock and sink
    • only with a closed volume as connection point
    • introducing a surge shaft

T6 Water-way with reservoirs

Topics
  • Adding a upstream and downstream reservoir
  • investigating the different parameter sets
  • investigating the wave propagation
    • normal flow
    • changing the flow with help of a valve
  • Building a model of Sundsbarm hydro power station (w/o turbine at first)
Parameters for Sundsbarm Powerstation
SundsbarmParameters.pdf

T7 Water-way with turbine

Topics
  • Looking at an original example (HydroPower.Examples.PlantConnectAndDisconnectToGrid)
  • Integrating a real turbine model into the Sundsbarm model

T8 Power System Simulations

Topics
  • Understanding the active power flow with the help of equivalent inertia models
  • Understanding the reactive power flow with single and three-phase equivalent circuits

T9 Simulation of production changes

Topics
  • Defining load changes use the ResistiveLoad model
  • First glance at the influence of droop within the DroopSimulations model

T10 Simulating droop and load changes

Topics
  • Continue to look at the DroopSimulations model from the previous tutorial
  • Look at the influence of load changes using the LoadChanges model
  • Look at the influence of random load changes in the RandomLoad model

T11 Transfer-function based model

Topics
  • Compare a hydro power system modelled using transfer functions vs. interconnected components
  • OpenModelica intro

Assignment

The submission in time AND passing the assignment is a prerequisite for the final exam!

More details will be provided later in the semester.

Exam

The exam will be exectuted on campus as "FLOWmulti" in the FLOWlock browser. Basically this means it is a multiple choice exam on your computer with no access to any files on your computer and neither the internet. For more information see also: How do I get my computer ready for digital written examinations (FLOWlock or FLOWmulti)?

Previous exams with solutions (try to practice without the solution first):

2022

This is the only previous exam paper available, since exams before that where always executed as oral exams. I will explain more in detail what is to be expected in the Summary lecture/video.

Software

GitKraken Desktop

GitKraken Desktop lets you use a free of charge version for private use which allows you to use GitKraken Desktop without limitations with all your local repositories on your PC and also with any open-source project hosted GitHub or similar Git providing platforms.

However there are some restrictions in the free personal version that you won't be able to access private repositories (i.e., hidden from public). Students can get access to the "pro" features for free for one year by simply applying for the:

  • Get your Free Student Pack
  • When applying for the pack make sure that you add your USN student address for verification which makes the verification quicker.
  • The activation for the student pack is done automatically when you sign into GitKraken Desktop using the "Sign up with GitHub" option. This will connect to your GitHub.com account and detect the student pack so you will have the "Professional"-status.
  • Attention: The automatic student pack detection will only work if you:
    1. Either have signed up for GitHub with your USN student email address
    2. or you add your USN student email to the list of associated email address in your GitHub account. See also https://github.com/settings/emails.
  • make sure that you have registered a GitHub account (free plan) before you proceed.
  • Download GitKraken Desktop from https://www.gitkraken.com/download
  • Install GitKraken Desktop and on the "Welcome screen" select "Sign in with GitHub" and follow the instructions.

Modelica

First have a look at the Modelica section of the additional literature page.

Installation

Dymola
Installation instructions for Windows

(In case you want to use Dymola on Linux then please contact me)

The following instructions are also summarised in the video T1-ModelicaIntro3InstallationOfDymola.

  1. Dymola will need an installed C(++)-compiler. Dymola supports different compilers. Recent experience has shown, that the most hazzle free installation that also supports all solvers that we will need, is the "Microsoft Build Tools 2017". It will require about 5 GB of space.
    1. Download the Microsoft Build Tools 2017 installer
    2. Start the installation and:
      • In the "Workloads" tab select "Visual C++ build tools" as shown below DymolaCompilerInstall.png
      • Complete the installation
  2. Download the Dymola version 2020 installer.
  3. Run the install.exe
    • Note: In case you already have an older Version of Dymola installed then you can install the new version in parallel with older one but I would recommend removing the old one first anyway.
  4. The installation dialogue will ask you which library option should be installed. Here you can simply confirm "next" *without selecting any library.
  5. Once installed Dymola will run in Demo mode. In order to use our student version you must agree with the conditions as stated in SHaPE.pdf and do the following:

    • Download the student licence file to your computer by doing right-click and "save link as".
    • Go to "Help \(\rightarrow\) License…" and then the "Setup" tab. Here click on the "Browse…" button and navigate to the student licence file you have just downloaded. See also the example below:

    DymolaLicenceSetup.png

  6. From now on you will be able to use the student version of Dymola.
  7. Now proceed to the next section "Install the additional libraries"!
Install the additional libraries
  1. Download the ExtraLibs.zip file.
  2. Go into your library installation directory of Dymola 2020. Under Windows this is typically

    "C:\Program Files\Dymola 2020\Modelica\Library\"

    (This path might differ if you happen to have Dymola installed in a different location.)

  3. In that directory you will find a file called "Complex.mo". Delete this file.
  4. Extract the content of ExtraLibs.zip into "C:\Program Files\Dymola 2020\Modelica\Library\" which means you should end up with:
    • four additional directories
      • C:\Program Files\Dymola 2020\Modelica\Library\
        • Modelica 4.0.0
        • ModelicaServices 4.0.0
        • Modelon 4.5
        • HydroPower 2.19
    • and three new files:
      • C:\Program Files\Dymola 2020\Modelica\Library\
        • Complex 3.2.3.mo
        • Complex 4.0.0.mo
        • ObsoleteModelica4.mo
  5. Follow the instructions as given in this video in order to enable Modelica Standard Library version 4.0.0: https://youtu.be/VLQSPX-ICXU
  6. Start Dymola and try opening "File → Libraries → HydroPower 2.19"

Extras

Post processing of plots using Inkscape

For later use in publications and reports it serves well to store your generated plots in a editable format. The scalable vector graphics format (SVG) is such a format that both Dymola and OpenModelica support as export format when saving plots. The generated SVG files can then be edited with any graphics program that supports SVG. One that I can recommend is the free:

As a side note this method works also for plots generated in MATLAB. Inkscape allows you to import PDFs and converting them to SVG and there are dedicated PDF to SVG converters available.

StateGraph2 student project

Here is the link to the description of the StateGraph2 student project modelling a traffic light crossing:

Free Modelica tools

Currently the most promising projects are:

Open Modelica
https://openmodelica.org which also includes a graphical editor OMEdit For installation I recommend that you use the "nightly build" as it often contains new bug fixes and new features that outweigh the possible danger of newly introduced bugs really.
Installation
Slides
Additional links

About

Author: Dietmar Winkler

Email: dietmar.winkler@usn.no

Created: 2025-09-26 Fri 07:15

Emacs 29.3 (Org mode 9.7.32)

Validate