FM3217 – Hydro Power Systems
https://fm3217.dwe.no
Table of Contents
- Schedule
- Overview
- Literature
- Lectures
-
- L0 Introduction
- L1 Overview of Components
- L2 Energy Conversion
- L3 Turbine Damages and Classification
- L4 Fluid Dynamics - Basics
- L5 Fluid Dynamics - Conservation Laws & Media Density
- L6 Fluid Dynamics - Turbine Modelling
- L7 Electrical Generator
- L8 Power System Control I
- L9 Power System Control II
- L10 TF-based modelling
- Summary
-
- Tutorials
-
- T0 Version Control Systems
- T1 Modelica Overview and Basics
- T2 Graphical modelling
- T3 Parameter dialogues
- T4 Electric kettle
- T5 Introducing the Hydro Power Library
- T6 Water-way with reservoirs
- T7 Water-way with turbine
- T8 Power System Simulations
- T9 Simulation of production changes
- T10 Simulating droop and load changes
- T11 Transfer-function based model
-
- Assignment
- Exam
- Software
- About
Autumn 2025
Schedule
(see also TimeEdit for FM3217)
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
- "Fluid mechanics, thermodynamics of turbomachinery" by Sydney Lawrence Dixon (Chapter 9 especially)
- "Fluid mechanics" by John F. Douglas, John A. Swaffield (also available in the library)
- Electrical Power Systems
- "Electrical Power Systems Essentials" by Pieter Schavemaker and Lou van der Sluis (Chapter 5 especially)
- "Electric Power Systems: A First Course" by Ned Mohan (Chapter 10, 11, 12 especially)
- Modelica
- "Hydro Power Library – User's Guide" by Modelon AB
- Introduction to how to use the HydroPower library in combination with Dymola.
- Talk about on Modelica as given at StrangeLoop 2016 Conference (introducing Modelica to non-Modelica people).
- Free online book: Modelica by Example by Michael Tiller
- Modelica Web Reference: https://webref.modelica.university/ (see also the blog entry about its creation)
- Introduction to Modelica using Dymola as tool (screen cast by Michael Tiller)
- Example of a coffee cup getting refilled (screen cast by Michael Tiller)
- Modelica source file used for the coffee cup example
- Slides, videos, and examples from the "Workshop on Mathematical Aspects of Object-Oriented Modeling and Simulation" (created by Bernhard Bachmann)
- "Hydro Power Library – User's Guide" by Modelon AB
- Version Control Systems
- Blog: Will there be a whiteboard? with nice engineering related modelling topics (Michael Tiller)
- Git Parable
- Wikipedia on Version Control
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
- Kjølle(2001) Chapter 1 & 11
L2 Energy Conversion
- Topics:
- Kjølle(2001) Chapter 2
- General theory
- Turbine types
- Energy equations for the different turbine types
- Operation areas
- Kjølle(2001) Chapter 2
- Handout: FM3217-02-EnergyConversionhandout.pdf
- Videos:
- Lecture recordings
- 1 Intro and Turbomachinery
- Turbo Machinery(SCE)
- 2 Turbine Types
- Turbine Types(SCE)
- 3 Pelton Turbine
- Pelton Turbine(SCE)
- 4 Pelton Vector calculations
- 5 Pelton Vector calulations (cont.) and Francis
- Francis Turbine(SCE)
- 6 Francis Vector calulations and Kaplan
- Kaplan Turbines(SCE)
- 7 Kaplan Vecotr calulations, Main Turbine Equations, Pump Storage
- Lecture recordings
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
- Handout: FM3217-03-TurbineDamagesAndClassificationhandout.pdf
- Videos:
- Lecture recordings
- Part 1a of the lecture (Damages)
- Part 1b of lecture (Cavitation)
- Part 2 of lecture (Reduced quantities and speed number)
- Lecture recordings
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
- Handout:
- FM3217-04-FluidDynamicsBasicshandout.pdf
- Modelon(2012) Chapter 1 to 2.3 (incl)
- Videos:
- Lecture recordings
L5 Fluid Dynamics - Conservation Laws & Media Density
- Topics:
- Mass conservation
- Energy conservation
- Momentum conservation
- Media density
- Handout:
- Modelon(2012) Chapter 2.4 to 2.6 (incl)
- Videos:
- Lecture recordings
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
- Mass flow calculations
- 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
- Continuation of the previous lecture:
L10 TF-based modelling
- Topics:
- Transfer-function based modelling
- Notes
- TF-basedModelling.pdf
- See also Tutorial 11
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
- 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.
- 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.
- Watch the video tutorial Git Github Gitkraken: Version Control without Command Line
- Play with Learn Git Branching - an interactive online tutorial
- Topics
- The Git Parable
- Blog article by Tom Preston-Werner (an article that tries to explain creation of a Git-like system)
- Visualizing Git website (used to demonstrate the Git graph)
- SHA1 generator website (used to demonstrate SHA1 hash creation)
- Links
- What Engineers Need to Know About Version Control
- Wikipedia on Version Control
- Wikipedia article on Git as an example of distributed revision control system
- Interesting/funny Google tech talk: Linus Torvalds on Git
- Video Introduction to Git by Randel Schwarz (updated 2012 version)
- Videos:
Make sure to read The Git Parable blog post in order to be able to follow the video content. There is also a presentation video given by Johan Herland.
- T0-VCS1-Snapshots
- T0-VCS2-Branches
- T0-VCS3-Hashing
- T0-VCS4-Tags
- T0-VCS5-GitKraken
- T0-VCS6-Clone (Note that GitHub by now also offers private repositories for free. That was not the case at the time of the recording).
T1 Modelica Overview and Basics
- Task
- Topics
- introduction to Modelica
- simple code based examples
- Handout:
- Videos:
Note: We are using Modelica Standard Version 4.0.0, which means that some minor changes were done to the placement of the "units". The package
Modelica.SIunits
(in 3.2.3) has been moved toModelica.Units.SI
(in 4.0.0). So keep this in mind when following the videos and trying to implement it yourself. The files uploaded to the course repository on GitHub contain the correct updated locations.
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
- DC motor-drive
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
- DC motor-drive
- Handout:
none
- Videos:
Note: In this semester we are using Modelica Standard Version 4.0.0, which means that some minor changes were done to the placement of the "units". The package
Modelica.SIunits
(in 3.2.3) has been moved toModelica.Units.SI
(in 4.0.0). So keep this in mind when following the videos and trying to implement it yourself. The files uploaded to the course repository on GitHub contain the correct updated locations.
T4 Electric kettle
- Topics
- A multi-domain modelling example of an electric kettle
- A coffee and milk experiment
- Handout:
- Videos:
- T4-ElectricKettle
- T4-CoffeeAndMilk
- Example of a coffee cup getting refilled (screen cast by Michael Tiller)
- I've added the library to the FM3217 package in the course file repository.
- Run the
CupOfCoffeAnimation
model to get the animation as shown in the video.
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
- Single conduit between water source and sink with
- Videos:
- T5-HydroPowerLibrary1Tour
- T5-HydroPowerLibrary2ConnectingPipesBuild
- T5-HydroPowerLibrary3ConnectingPipesParameters
- T5-HydroPowerLibrary4ConnectingPipesSimulation
- T5-HydroPowerLibrary5PipeWithValve (Attention the parameter for the flowrate in the valve needs to be multiplied by 1000!)
- T5-HydroPowerLibrary6SimpleWaterWay
- T5-HydroPowerLibrary7SimpleWaterWaySimulation
- T5-HydroPowerLibrary8SurgeTankSimulation
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
- Looking at an original example (
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
- Defining load changes use the
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
- Continue to look at the
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:
- Either have signed up for GitHub with your USN student email address
- 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.
- 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.
- Download the Microsoft Build Tools 2017 installer
- Start the installation and:
- In the "Workloads" tab select "Visual C++ build tools" as shown below
- Complete the installation
- In the "Workloads" tab select "Visual C++ build tools" as shown below
- Download the Dymola version 2020 installer.
- 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.
- The installation dialogue will ask you which library option should be installed. Here you can simply confirm "next" *without selecting any library.
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:
- From now on you will be able to use the student version of Dymola.
- Now proceed to the next section "Install the additional libraries"!
- 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.
Install the additional libraries
- Download the
ExtraLibs.zip
file. 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.)
- In that directory you will find a file called "
Complex.mo
". Delete this file. - 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
- four additional directories
- Follow the instructions as given in this video in order to enable Modelica Standard Library version 4.0.0: https://youtu.be/VLQSPX-ICXU
- 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
- Nightly builds for Windows (download and launch the
OpenModelica-latest.exe
file) - for MacOS
- for Linux
- Nightly builds for Windows (download and launch the
- Slides
- Additional links
- YouTube video on an electrical circuit example from HanserModelica: https://www.youtube.com/watch?v=esGAcZ_ViRU
- Free Modelica libraries (bundeled with OpenModelica): https://www.modelica.org/libraries