-
Multi-agent reinforcement learning for the control of three-dimensional Rayleigh-Bénard convection
Authors:
Joel Vasanth,
Jean Rabault,
Francisco Alcántara-Ávila,
Mikael Mortensen,
Ricardo Vinuesa
Abstract:
Deep reinforcement learning (DRL) has found application in numerous use-cases pertaining to flow control. Multi-agent RL (MARL), a variant of DRL, has shown to be more effective than single-agent RL in controlling flows exhibiting locality and translational invariance. We present, for the first time, an implementation of MARL-based control of three-dimensional Rayleigh-Bénard convection (RBC). Con…
▽ More
Deep reinforcement learning (DRL) has found application in numerous use-cases pertaining to flow control. Multi-agent RL (MARL), a variant of DRL, has shown to be more effective than single-agent RL in controlling flows exhibiting locality and translational invariance. We present, for the first time, an implementation of MARL-based control of three-dimensional Rayleigh-Bénard convection (RBC). Control is executed by modifying the temperature distribution along the bottom wall divided into multiple control segments, each of which acts as an independent agent. Two regimes of RBC are considered at Rayleigh numbers $\mathrm{Ra}=500$ and $750$. Evaluation of the learned control policy reveals a reduction in convection intensity by $23.5\%$ and $8.7\%$ at $\mathrm{Ra}=500$ and $750$, respectively. The MARL controller converts irregularly shaped convective patterns to regular straight rolls with lower convection that resemble flow in a relatively more stable regime. We draw comparisons with proportional control at both $\mathrm{Ra}$ and show that MARL is able to outperform the proportional controller. The learned control strategy is complex, featuring different non-linear segment-wise actuator delays and actuation magnitudes. We also perform successful evaluations on a larger domain than used for training, demonstrating that the invariant property of MARL allows direct transfer of the learnt policy.
△ Less
Submitted 23 November, 2024; v1 submitted 31 July, 2024;
originally announced July 2024.
-
Effective control of two-dimensional Rayleigh--Bénard convection: invariant multi-agent reinforcement learning is all you need
Authors:
Colin Vignon,
Jean Rabault,
Joel Vasanth,
Francisco Alcántara-Ávila,
Mikael Mortensen,
Ricardo Vinuesa
Abstract:
Rayleigh-Bénard convection (RBC) is a recurrent phenomenon in several industrial and geoscience flows and a well-studied system from a fundamental fluid-mechanics viewpoint. However, controlling RBC, for example by modulating the spatial distribution of the bottom-plate heating in the canonical RBC configuration, remains a challenging topic for classical control-theory methods. In the present work…
▽ More
Rayleigh-Bénard convection (RBC) is a recurrent phenomenon in several industrial and geoscience flows and a well-studied system from a fundamental fluid-mechanics viewpoint. However, controlling RBC, for example by modulating the spatial distribution of the bottom-plate heating in the canonical RBC configuration, remains a challenging topic for classical control-theory methods. In the present work, we apply deep reinforcement learning (DRL) for controlling RBC. We show that effective RBC control can be obtained by leveraging invariant multi-agent reinforcement learning (MARL), which takes advantage of the locality and translational invariance inherent to RBC flows inside wide channels. The MARL framework applied to RBC allows for an increase in the number of control segments without encountering the curse of dimensionality that would result from a naive increase in the DRL action-size dimension. This is made possible by the MARL ability for re-using the knowledge generated in different parts of the RBC domain. We show in a case study that MARL DRL is able to discover an advanced control strategy that destabilizes the spontaneous RBC double-cell pattern, changes the topology of RBC by coalescing adjacent convection cells, and actively controls the resulting coalesced cell to bring it to a new stable configuration. This modified flow configuration results in reduced convective heat transfer, which is beneficial in several industrial processes. Therefore, our work both shows the potential of MARL DRL for controlling large RBC systems, as well as demonstrates the possibility for DRL to discover strategies that move the RBC configuration between different topological configurations, yielding desirable heat-transfer characteristics. These results are useful for both gaining further understanding of the intrinsic properties of RBC, as well as for developing industrial applications.
△ Less
Submitted 13 June, 2023; v1 submitted 5 April, 2023;
originally announced April 2023.
-
Two-phase flow simulations at 0-4 degrees inclination in an eccentric annulus
Authors:
C. Friedemann,
M. Mortensen,
J. Nossen
Abstract:
Multiphase flow simulations were run in an eccentric annulus. The dimensions of the annulus were 0.1 and 0.05 m for the outer and inner cylinders, respectively, and the mixture velocities were between 1.2 and 4.2 m/s. The simulations were compared with fully eccentric and completely concentric experiments conducted at the Institute for Energy Technology. The purpose of this paper is to explore the…
▽ More
Multiphase flow simulations were run in an eccentric annulus. The dimensions of the annulus were 0.1 and 0.05 m for the outer and inner cylinders, respectively, and the mixture velocities were between 1.2 and 4.2 m/s. The simulations were compared with fully eccentric and completely concentric experiments conducted at the Institute for Energy Technology. The purpose of this paper is to explore the effect of the holdup fraction and interior pipe's position on the pressure gradient and flow regime. The comparisons indicate that moving the pipe from an entirely eccentric to a partially eccentric configuration has a drastic impact on the pressure gradient. In all cases where the inner pipe was changed from a completely eccentric geometry to a less eccentric configuration, we notice an increase of 48-303 \% of the mean pressure gradient. Comparatively, cases, where the pipe was moved from a concentric to a more eccentric configuration, result in less drastic pressure gradient changes. 2 cases were within 22 \% of the experimental results for mean, max, and min pressure gradient, while the last two cases exceeded the minimum and mean pressure gradients by 25-250 %, respectively. We rarely observed a change of flow regime as an effect of moving the inner pipe; 2 out of the 8 horizontal cases indicate transition from wavy flow to slug flow or significantly larger waves. The most prominent and frequent discrepancies identified were altered slug and wave frequencies. Through the simulations, we notice that there is an increased pressure gradient accompanying an increased holdup fraction when the phase-averaged velocities were the same. Corresponding to a fractional holdup increase of 0.177, 0.244, 0.063, and 0.073, the increase in simulated pressure gradient for each case of the same mixture flow rate and mesh density was 80, 300, 614 and 367 Pa/m respectively or 116, 244, 61.5 and 25 %.
△ Less
Submitted 10 January, 2020;
originally announced January 2020.
-
Ocellaris: a discontinuous Galerkin finite element solver for two-phase flows with high density differences
Authors:
Tormod Landet,
Mikael Mortensen
Abstract:
In free-surface flows, such as breaking ocean waves, the momentum field will have a discontinuity at the interface between the two immiscible fluids, air and water, but still be smooth in most of the domain. Using a higher-order numerical method is more efficient than increasing the number of low-order computational cells in areas where the solution is smooth, but higher-order approximations cause…
▽ More
In free-surface flows, such as breaking ocean waves, the momentum field will have a discontinuity at the interface between the two immiscible fluids, air and water, but still be smooth in most of the domain. Using a higher-order numerical method is more efficient than increasing the number of low-order computational cells in areas where the solution is smooth, but higher-order approximations cause convective instabilities at discontinuities. In Ocellaris we use slope limiting of discontinuous Galerkin solutions to stabilise finite element simulations of flows with large density jumps, which would otherwise blow up due to Gibbs oscillations resulting from approximating a factor 1000 sharp jump (air to water) by higher-order shape functions.
We have previously shown a slope-limiting procedure for velocity fields that is able to stabilise 2D free-surface simulations running on a single CPU. In this paper our solver is extended to 3D and coupled to an algebraic pressure-correction scheme that retains the exact incompressibility of the direct solution used in the 2D simulations. We have tested the method on a common 3D dam-breaking test case and compared the free-surface evolution and impact pressures to experimental results. We also show how a forcing-zone approach can be used to simulate a surface-piercing vertical cylinder in an infinite wave field. In both cases the free-surface elevation and the forces and pressures compare well with published experiments. The Ocellaris solver is available as an open-source and well-documented program along with the input files needed to replicate the included results (www.ocellaris.org).
△ Less
Submitted 30 March, 2019;
originally announced April 2019.
-
On exactly incompressible DG FEM pressure splitting schemes for the Navier-Stokes equation
Authors:
Tormod Landet,
Mikael Mortensen
Abstract:
We compare three iterative pressure correction schemes for solving the Navier-Stokes equations with a focus on exactly divergence free solution with higher order discontinuous Galerkin discretisations. The investigated schemes are the incremental pressure correction scheme on the standard differential form (IPCS-D), the same scheme on algebraic form (IPCS-A), and the semi-implicit method for press…
▽ More
We compare three iterative pressure correction schemes for solving the Navier-Stokes equations with a focus on exactly divergence free solution with higher order discontinuous Galerkin discretisations. The investigated schemes are the incremental pressure correction scheme on the standard differential form (IPCS-D), the same scheme on algebraic form (IPCS-A), and the semi-implicit method for pressure linked equations (SIMPLE). We show algebraically and through numerical examples that the IPCS-A and SIMPLE schemes are exactly mass conserving due to the algebraic pressure correction, while the IPCS-D scheme cannot be exactly divergence free due to the stabilisation terms required in the pressure Poisson equation. The SIMPLE scheme requires a significantly higher number of pressure correction iterations to obtain converged results than the IPCS-A scheme, so for efficient and mass conserving simulation the IPCS-A method is the best option among the three evaluated schemes.
△ Less
Submitted 20 March, 2019;
originally announced March 2019.
-
More efficient time integration for Fourier pseudo-spectral DNS of incompressible turbulence
Authors:
David I. Ketcheson,
Mikael Mortensen,
Matteo Parsani,
Nathanael Schilling
Abstract:
Time integration of Fourier pseudo-spectral DNS is usually performed using the classical fourth-order accurate Runge--Kutta method, or other methods of second or third order, with a fixed step size. We investigate the use of higher-order Runge-Kutta pairs and automatic step size control based on local error estimation. We find that the fifth-order accurate Runge--Kutta pair of Bogacki \& Shampine…
▽ More
Time integration of Fourier pseudo-spectral DNS is usually performed using the classical fourth-order accurate Runge--Kutta method, or other methods of second or third order, with a fixed step size. We investigate the use of higher-order Runge-Kutta pairs and automatic step size control based on local error estimation. We find that the fifth-order accurate Runge--Kutta pair of Bogacki \& Shampine gives much greater accuracy at a significantly reduced computational cost. Specifically, we demonstrate speedups of 2x-10x for the same accuracy. Numerical tests (including the Taylor-Green vortex, Rayleigh-Taylor instability, and homogeneous isotropic turbulence) confirm the reliability and efficiency of the method. We also show that adaptive time stepping provides a significant computational advantage for some problems (like the development of a Rayleigh-Taylor instability) without compromising accuracy.
△ Less
Submitted 7 November, 2019; v1 submitted 24 October, 2018;
originally announced October 2018.
-
Slope limiting the velocity field in a discontinuous Galerkin divergence free two-phase flow solver
Authors:
Tormod Landet,
Kent-Andre Mardal,
Mikael Mortensen
Abstract:
Solving the Navier-Stokes equations when the density field contains a large sharp discontinuity---such as a water/air free surface---is numerically challenging. Convective instabilities cause Gibbs oscillations which quickly destroy the solution. We investigate the use of slope limiters for the velocity field to overcome this problem in a way that does not compromise on the mass conservation prope…
▽ More
Solving the Navier-Stokes equations when the density field contains a large sharp discontinuity---such as a water/air free surface---is numerically challenging. Convective instabilities cause Gibbs oscillations which quickly destroy the solution. We investigate the use of slope limiters for the velocity field to overcome this problem in a way that does not compromise on the mass conservation properties. The equations are discretised using the interior penalty discontinuous Galerkin finite element method that is divergence free to machine precision.
A slope limiter made specifically for exactly divergence free (solenoidal) fields is presented and used to illustrated the difficulties in obtaining convectively stable fields that are also exactly solenoidal. The lessons learned from this are applied in constructing a simpler method based on the use of an existing scalar slope limiter applied to each velocity component.
We show by numerical examples how both presented slope limiting methods are vastly superior to the naive non-limited method. The methods can solve difficult two-phase problems with high density ratios and high Reynolds numbers---typical for marine and offshore water/air simulations---in a way that conserves mass and stops unbounded energy growth caused by the Gibbs phenomenon.
△ Less
Submitted 19 March, 2018;
originally announced March 2018.
-
Shenfun -- automating the spectral Galerkin method
Authors:
Mikael Mortensen
Abstract:
With the shenfun Python module (github.com/spectralDNS/shenfun) an effort is made towards automating the implementation of the spectral Galerkin method for simple tensor product domains, consisting of (currently) one non-periodic and any number of periodic directions. The user interface to shenfun is intentionally made very similar to FEniCS (fenicsproject.org). Partial Differential Equations are…
▽ More
With the shenfun Python module (github.com/spectralDNS/shenfun) an effort is made towards automating the implementation of the spectral Galerkin method for simple tensor product domains, consisting of (currently) one non-periodic and any number of periodic directions. The user interface to shenfun is intentionally made very similar to FEniCS (fenicsproject.org). Partial Differential Equations are represented through weak variational forms and solved using efficient direct solvers where available. MPI decomposition is achieved through the {mpi4py-fft} module (bitbucket.org/mpi4py/mpi4py-fft), and all developed solver may, with no additional effort, be run on supercomputers using thousands of processors. Complete solvers are shown for the linear Poisson and biharmonic problems, as well as the nonlinear and time-dependent Ginzburg-Landau equation.
△ Less
Submitted 10 August, 2017;
originally announced August 2017.
-
A spectral-Galerkin turbulent channel flow solver for large-scale simulations
Authors:
Mikael Mortensen
Abstract:
A fully (pseudo-)spectral solver for direct numerical simulations of large-scale turbulent channel flows is described. The solver utilizes the Chebyshev base functions suggested by J. Shen [SIAM J. Sci. Comput., 16, 1, 1995], that lead to stable and robust numerical schemes, even at very large scale. New and fast algorithms for the direct solution of the linear systems are devised, and algorithms…
▽ More
A fully (pseudo-)spectral solver for direct numerical simulations of large-scale turbulent channel flows is described. The solver utilizes the Chebyshev base functions suggested by J. Shen [SIAM J. Sci. Comput., 16, 1, 1995], that lead to stable and robust numerical schemes, even at very large scale. New and fast algorithms for the direct solution of the linear systems are devised, and algorithms and matrices for all required scalar products and transforms are provided. We validate the solver for very high Reynolds numbers. Specifically, the solver is shown to reproduce the first order statistics of Hoyas and Jiménez [Phys. Fluids, 18(1), 2006], for a channel flow at $Re_τ=2000$. The solver is available through the open source project spectralDNS [https://github.com/spectralDNS].
△ Less
Submitted 13 January, 2017;
originally announced January 2017.
-
A FEniCS-Based Programming Framework for Modeling Turbulent Flow by the Reynolds-Averaged Navier-Stokes Equations
Authors:
Mikael Mortensen,
Hans Petter Langtangen,
Garth N. Wells
Abstract:
Finding an appropriate turbulence model for a given flow case usually calls for extensive experimentation with both models and numerical solution methods. This work presents the design and implementation of a flexible, programmable software framework for assisting with numerical experiments in computational turbulence. The framework targets Reynolds-averaged Navier-Stokes models, discretized by fi…
▽ More
Finding an appropriate turbulence model for a given flow case usually calls for extensive experimentation with both models and numerical solution methods. This work presents the design and implementation of a flexible, programmable software framework for assisting with numerical experiments in computational turbulence. The framework targets Reynolds-averaged Navier-Stokes models, discretized by finite element methods. The novel implementation makes use of Python and the FEniCS package, the combination of which leads to compact and reusable code, where model- and solver-specific code resemble closely the mathematical formulation of equations and algorithms. The presented ideas and programming techniques are also applicable to other fields that involve systems of nonlinear partial differential equations. We demonstrate the framework in two applications and investigate the impact of various linearizations on the convergence properties of nonlinear solvers for a Reynolds-averaged Navier-Stokes model.
△ Less
Submitted 31 March, 2011; v1 submitted 14 February, 2011;
originally announced February 2011.