  This article presents a detailed introduction to density-based topology
optimisation of fluid flow problems. The goal is to allow new students and
researchers to quickly get started in the research area and to skip many of the
initial steps, often consuming unnecessarily long time from the scientific
advancement of the field. This is achieved by providing a step-by-step guide to
the components necessary to understand and implement the theory, as well as
extending the supplied MATLAB code. The continuous design representation used
and how it is connected to the Brinkman penalty approach, for simulating an
immersed solid in a fluid domain, is illustrated. The different interpretations
of the Brinkman penalty term and how to chose the penalty parameters are
explained. The accuracy of the Brinkman penalty approach is analysed through
parametric simulations of a reference geometry. The chosen finite element
formulation and the solution method is explained. The minimum dissipated energy
optimisation problem is defined and how to solve it using an optimality
criteria solver and a continuation scheme is discussed. The included MATLAB
implementation is documented, with details on the mesh, pre-processing,
optimisation and post-processing. The code has two benchmark examples
implemented and the application of the code to these is reviewed. Subsequently,
several modifications to the code for more complicated examples are presented
through provided code modifications and explanations. Lastly, the computational
performance of the code is examined through studies of the computational time
and memory usage, along with recommendations to decrease computational time
through approximations.
