Scientific Programming for Wind Energy
Overall Course Objectives
Writing code to solve complex scientific and engineering problems has become an essential skill for scientists and engineers. This course helps students to develop this skill through: learning core principles and best practices for programming; practicing usage of fundamental software development tools and techniques such as version control, packaging and architecture design; leveraging scientific computation tools commonly used in scientific Python, like numpy, matplotlib and scipy; developing, evaluating and communicating Python libraries for wind-energy applications through hands-on group projects, peer code reviews and code presentations. Through this course, a student’s material, cognitive, and social computational literacy will be largely improved, together with the ability to formulate computational problems in wind energy and solve them with programming.
See course description in Danish
Learning Objectives
- Utilize Python packages common to wind energy, such as numpy, matplotlib, scipy, PyWake, TOPFARM, xarray, pandas, etc.
- Manipulate data stored in the most common wind-energy formats, demonstrating skills such as loading from/saving to file, performing computations, and visualizing results.
- Design and publish a Python package for a wind-energy application with tests and documentation.
- Collaborate with a team on a code base hosted on GitLab, demonstrating basic git skills such as adding, committing, pushing, and branching.
- Develop, debug, and lint code using VS Code and related extensions.
- Communicate code orally and also in writing, via diagrams, comments, commit messages, and documentation.
- Critically analyze code for good coding practices such as modularity, maintainability, adherence to stylistic conventions, etc.
- Write tests for scientific code.
- Execute code on a computing cluster.
Course Content
The content of this course is tailored to students who have average to little previous experience in programming and want to take other courses at DTU Wind. The course uses the Python programming language. During the course, students work in small groups on in-class exercises, weekly assignments, and two projects. Students must pass the first project to submit the second project. The final grade is evaluated based on the second project. Consistent practice in communication about scientific code is ensured by weekly group-to-group presentations of their solutions to the week’s assignment.
In the first part of the course, students learn how to collaborate in groups on code using the version-control software git/GitHub, which is used throughout the semester. After that, students use the foundational packages for scientific Python programming (numpy, matplotlib, scipy) to practice basic skills such as numeric array manipulation, loading/saving/visualizing data, and writing/importing functions. These skills are cemented in the first project, in which groups calculate the time-marching response of a simple wind turbine model for different turbulent wind conditions and visualize the resulting statistics.
After the first project is handed in, more advanced topics are presented. This includes more abstract concepts from general programming—such as object-oriented practices, designing package architectures, and linting—as well as more wind-specific topics—e.g., packages and data formats that are commonly used in wind energy. The course ends with the final project, in which students work individually or in groups to publish a Python package for wind energy, complete with tests and documentation. A list of pre-defined final projects is provided, but students may submit a request for a different project if they have an idea they would like to pursue.
Possible start times
- 6 – 20 (Thurs 8-12)
Teaching Method
Lectures and group work on assignments (2-3 students per group)




