Hybrid Machine-Learning and Computational Fluid Dynamics Methods in the Energy Industry

Lead Research Organisation: Imperial College London
Department Name: Chemical Engineering

Abstract

Improving the modelling and simulation of turbulent and multiphase flows is a key issue within the energy industry due to their relevance and impact within the field. Three-phase flows involving air, oil and water are particularly common but are poorly understood due to their complexity. Gaining a better understanding of these flows is crucial in order to accurately predict the occurrence of specific multiphase flow regimes and increase efficiency in practical applications.
Most analysis relies on Computational Fluid Dynamics (CFD) modelling, however the large computational costs associated with this can often be impractical for industrial uses involving large number of hyperparameters. Consequently, there is a need for hybrid models which combine physics based CFD models with statistical methods in order to reduce computational costs and account for uncertainty. This can be achieved through the use of Machine Learning (ML) algorithms. This project focuses on both the development of hybrid methods coupling CFD and ML, and their implementation on relevant industrial applications.

CFD will be carried out with Fluidity, which is an open source multi-phase CFD code capable of numerically solving the Navier-Stokes and field equations. Fluidity uses a moving Finite Element/Control Volume method which enables anisotropic mesh adaptivity on unstructured meshes for time dependant problems (AMCG, 2015). To modify the mesh, Fluidity uses hr-adaptivity, which is a combination of h-adaptivity and r-adaptivity, with the former changing the connectivity of the mesh and the latter relocating its vertices. In practice, this mean that the resolution can be increased or decreased in certain areas depending on the field of interest, e.g. pressure or velocity. For example, in a multiphase flow with a moving interface, a high resolution can be obtained near the interface as it moves and a lower resolution further away from it. In the case of flow past a body, this method can maintain a high mesh resolution in turbulent areas in the wake while retaining a coarse mesh in the far field. This results in improved computational and storage savings compared to fixed mesh methods.

In recent years, ML has been applied to a range of CFD applications. A major field of interest is applying ML to turbulence closure models. Beck et al. (2019) used Deep Neural Networks (DNN) to develop subgrid-scale (SGS) models by training them on DNS data, as opposed to physics based SGS models. While it was found that purely data-based SGS models were not applicable to practical applications, they confirmed that "data-informed" closure models have potential and suggest further work in that area.
Another particularly relevant application with multiphase flows is through the use of ML classification algorithms. Guillén-Rondon et al. (2018) used support vector machines (SVM) to predict flow patterns in two-phase gas-liquid flow, using
experimental training data.

The project will be entirely computational and will aim to relate ML and CFD for multiphase flow problems. This will be achieved through the simulation of multiphase flows using Fluidity, the implementation of ML algorithms with scikit-learn, and the development of codes coupling the two together.

Publications

10 25 50

Studentship Projects

Project Reference Relationship Related To Start End Student Name
EP/T517690/1 01/10/2019 30/09/2025
2367735 Studentship EP/T517690/1 29/10/2019 28/10/2023 Morgan Kerhouant
 
Description The focus of the project changed to green hydrogen production in 2021 Q2 due to bp's shift from oil and gas into low carbon energy, including green hydrogen. Alkaline water electrolysers (AWE) are commonly used for the industrial-scale production of green hydrogen. Operating at high current densities leads to enhanced hydrogen production but reduced cell efficiency, partly due to ohmic losses from the gas-liquid flow. Gas blockage of the electrode surface and reduced effective electrolyte conductivity from increased void fraction are key contributors to these losses. An improved understanding of the flow within AWE is key to improving electrolyser efficiency, however, most numerical studies on AWEs have focused on coarse, steady-state simulations and neglected electrochemistry. We perform three-dimensional and two-dimensional high resolution transient numerical simulations of an electrochemical cell under galvanostatic conditions, modelling the multiphase flow, electrochemistry and heat transfer with OpenFOAM. We use a multi-fluid Eulerian model to simulate the bubbly flow and implement electrochemical reactions and electrical potential within the Open-FOAM solver. The current distribution in the electrolyte is coupled to the Butler-Volmer equation at the electrode surfaces and governs the local gas generation rate through Faraday's law. We validate our model with experimental data for free convection cases without a separator and forced convection cases with a separator. Liquid velocity profiles for the free convection cases and gas distributions for the forced convection cases are in line with experimental results. This allows us to investigate the effects of flow rate, current density, separators and electrolyser geometry on cell efficiency and hydrogen production rate. We then explore the impact of bubble size, distribution and inter-phase coupling terms on the flow in the cell, and observe the formation of waves along the electrode surface.

Two areas of interest within AWE modelling are identified as suitable for the application of data-driven methods: uncertainty in model parameters, and simulation acceleration. Various model parameters, such as bubble size, bubble distribution and Tafel parameters (charge transfer coefficient and exchange current density) are obtained through experimental methods. However, significant uncertainties exist, with bubble diameters encountered in the literature ranging from 50µm to 200µm, and unknown coalescence rates for electrolytic solutions. Bayesian optimisation was employed to tune uncertain model parameters, uncovering optimal bubble diameters and coalescence rates. The current density distribution at the electrode surface is necessary to calculate the gas flow rate, which requires the full potential field to be solved multiple times each time step with a linear solver. A PINN was trained to solve the potential field, allowing for the current density to be evaluated directly at the electrode surface during simulations using the TensorFlow C API in OpenFOAM. Through the same framework, the PINN was trained to accelerate the pressure solver, resulting in up to 30% reduction in linear solver iterations.
Exploitation Route - Improved design and operation of alkaline water electrolyser through modelling for increased efficiency
- Accelerated modelling through application of data-driven techniques developed
Sectors Energy

 
Title Multi-physics flow solver for alkaline water electrolyser 
Description We develop a multi-physics model of an alkaline water electrolyser and perform three- dimensional transient numerical simulations of hydrogen production. Our model considers the multiphase flow, electrochemistry, and heat transfer using the OpenFOAM libraries and employs a multifluid Eulerian model to simulate the bubbly flow, with oxygen and hydrogen as the dispersed phases and the electrolyte solution as the continuous phase. The current distribution in the electrolyte is coupled to the Butler-Volmer equation at the electrode surfaces and governs the local gas generation rate through Faraday's law. 
Type Of Material Computer model/algorithm 
Year Produced 2023 
Provided To Others? No  
Impact - Improved modelling of flow alkaline water electrolysers - Uncovered unknown bubble diameter and coalescence rate 
 
Title Physics informed neural networks for Poisson equations 
Description Poisson equations are a class of partial differential equations (PDEs) encountered in several areas of physics, from fluid mechanics to electrostatics. Iterative solvers, such as multigrid and conjugate gradient algorithms, are commonly employed to solve Poisson equations but become computationally expensive and require an increasing number of iterations for large problems. In this work, we focus on the pressure equation encountered within the pressure-velocity coupling for incompressible flows, which ensures a divergence-free velocity field. We train physics-informed neural networks (PINNs) to solve the pressure equation, taking spatial coordinates and source terms as model inputs. Our model is easily parallelised and agnostic to mesh resolution, allowing us to train on data from coarse grids and predict on resolved cases in parallel. 
Type Of Material Computer model/algorithm 
Year Produced 2023 
Provided To Others? No  
Impact We deploy the trained Tensorflow model within the pimpleFoam solver in OpenFOAM and observe a reduction in pressure solver iterations when using the neural network predictions as an initial guess for the linear solver compared to using the previous pressure field. We then study the performance impact of using PINNs as a first guess and investigate optimal conditions for their use with linear solvers.