View CDT Notebooks Skip to the content.

LIFD Machine Learning For Earth Sciences

LIFD logo

cemac logo

GitHub release GitHub top language GitHub issues GitHub last commit GitHub All Releases GitHub DOI

Twitter Follow

The Leeds Institute for Fluid Dynamics (LIFD) has teamed up with the Centre for Environmental Modelling and Computation (CEMAC) to create Jupyter notebook tutorials on the following topics.

  1. Physics Informed Neural Networks
  2. Image Segmentation
  3. Autoencoders
  4. Design Optimisation with Metamodels
  5. Gaussian Processes

These notebooks are accompanied by taught lectures, however they should also function as standalone tutorials.

How to Run

These notebooks can run with the resources provided and the Anaconda environment set up. If you are familiar with Anaconda, Jupyter notebooks and GitHub then simply clone this repository and run it within your Jupyter notebook setup. Otherwise, please read the how to run guide. These notebooks are designed to run on Leeds Linux GPU workstations, although they also work on colab or other GPU enabled platforms. Where run times on a single GPU are deemed unacceptable, links to pre-trained models are provided.

Physics-Informed Neural Networks

1D Heat Equation and Navier Stokes Equation

Recent developments in machine learning have gone hand in hand with a large growth in available data and computational resources. However, often when analysing complex physical systems, the cost of data acquisition can be prohibitively large. In this small data regime, the usual machine learning techniques lack robustness and do not guarantee convergence.

Fortunately, we do not need to rely exclusively on data when we have prior knowledge about the system at hand. For example, in a fluid flow system, we know that the observational measurements should obey the Navier-Stokes equations, and so we can use this knowledge to augment the limited data we have available. This is the principle behind physics-informed neural networks (PINNs).

These notebooks illustrate using PINNs to explore the 1D heat equation and Navier Stokes Equation.

In the Navier Stokes example notebook, sparse velocity data points (blue dots) are used to infer fluid flow patterns in the wake of a cylinder and unknown velocity and pressure fields are predicted using only a discrete set of measurements of a concentration field c(t,x,y).

These examples are based on work from the following two papers:

Image Segmentation

Identifying and Characterising Trapped Lee Waves

Image segmentation models are designed to tackle the problem of partitioning an image into meaningful segments or regions, each corresponding to different objects or parts of objects within the image. This process is crucial in various applications such as medical imaging, where it helps in identifying and isolating different anatomical structures (e.g. organs or tumours), or in autonomous driving, where it can aid in recognising and distinguishing between pedestrians, vehicles, and road signs. More recently, segmentation models are being applied to weather and climate forecasting applications, where their ability to identify structures in image data makes them ideally suited.

This Jupyter notebook demonstrates how artificial neural networks (ANNs) can be applied to image segmentation problems. We present a simple application to self-driving cars, where we train a U-Net segmentation model to identify important features in dashcam footage, as well as a more complicated example, based on the work of Coney et al. (2023), identifying and characterising trapped lee waves over the UK.

Figure from Coney et al. (2024)

References:

Autoencoders

Autoencoders

to be filled

Autoencoders are unsupervised learning technique that performs data encoding and decoding using feed forward neural networks made of two components:

References:

Design Optimisation with Metamodels

Optimal design of coronary artery bypass graft

Design optimisation in the context of fluid mechanics often involves optimising parameters within PDEs to achieve desired fluid behaviour. This process requires adjusting variables such as boundary conditions, initial conditions, and material properties to minimise or maximise specific performance criteria, like minimising drag or maximising flow efficiency.

Metamodels, also known as surrogate models, are simplified representations of complex systems used to approximate the behaviour of more detailed simulations. In design optimisation, metamodels can significantly reduce computational costs by providing quick evaluations of design alternatives without running full-scale simulations.

In this notebook, we solve a design optimisation problem in a PDE-constrained framework using metamodels. The motivation of this problem is the optimal design of coronary artery bypass graft.

References:

Gaussian Processes

comming soon

Licence information

Creative Commons License
LIFD_CDT_NOTEBOOKS by CEMAC is licensed under a Creative Commons Attribution 4.0 International License.

Acknowledgements

Leeds Institute of Fluid Dynamics, CEMAC, Peter Jimack, Phil Livermore, Jonathan Coney, Donald Cummins, Helen Burns, Andrew Ross, Toni Lassila, Calum Skene, Arash Rabbani