FIREDRAKE '19: THE FIREDRAKE USER AND DEVELOPER MEETING 2019
PROGRAM FOR THURSDAY, SEPTEMBER 26TH
Days:
next day
all days

View: session overviewtalk overview

11:00-11:15Coffee Break
13:00-14:00Lunch Break
14:00-15:00 Session 2: Optimisation & symbolic manipulations
14:00
A system for programming symbolic manipulations of UFL forms: FML
PRESENTER: David Ham

ABSTRACT. Firedrake provides an automated mechanism for solving a variational problem once the user has decided on spatial and temporal discretisations. But what happens if the user wants to change those choices, for example to switch timesteppers or to change between continuous and discontinuous formulations? Parametrising a variational problem over function space is straightforward in UFL, and UFL's symbolic manipulation features enable manipulations such as replacing the test function to implement SUPG. What is missing are the mechanisms required to programmatically reason about which transformations should be applied and to which terms in the forms.

Form Manipulation Labelling (FML) is a new Firedrake feature, currently being piloted in Gusto, which addresses this lacuna. FML enables terms in forms to be associated with key-value pairs which it calls labels. Reasoning about symbolic manipulations is performed by applying successive filter passes in which labels are added to, or removed from, terms on the basis of form features or the presence and value of other labels. Ultimately, symbolic transformations are also applied as form filters to, for example, drop all terms with a particular label, or perform a replacement on terms with another label.

This presentation will describe the design and features of FML, and present some examples, drawn from Gusto, of its capabilities.

14:20
New developments in Fireshape: a shape optimization library for Firedrake
PRESENTER: Alberto Paganini

ABSTRACT. Fireshape is a shape optimization library for Firedrake. The library can tackle optimization problems constrained by PDEs and offers the following features: decoupled discretization of control and state variables, automatic derivation of shape derivatives and adjoint equations, different metrics to define shape gradients, and numerous optimization algorithms. The shape optimization knowledge required to use this library is minimal.

14:40
Higher order partial differential equation constrained derivative calculations using Firedrake
PRESENTER: James Maddison

ABSTRACT. Previous work on high level algorithmic differentiation has allowed the rapid development of adjoint models associated with forward codes written using automated code generation systems [1, 2]. This approach uses the symbolic representation of the forward code, provided by the Unified Form Language, to derive a symbolic representation of the adjoint code, with each implemented as lower level code using the same code generation system.

Here the methodology is generalised for the calculation of partial differential equation constrained derivatives at arbitrary order, with an emphasis on the calculation of second order derivative information. The new algorithmic differentiation tool, tlm_adjoint, derives a representation of tangent-linear equations from forward equations, and can process its own output so as to perform tangent-linear and adjoint calculations at arbitrary order. tlm_adjoint is being applied for data assimilation in retinal blood flood flow, for the early detection of eyesight complications associated with diabetes. Details regarding the application of checkpointing strategies, and optimisation through high-level caching, will be discussed.

[1] P. E. Farrell, D. A. Ham, S. W. Funke, and M. E. Rognes, Automated derivation of the adjoint of high-level transient finite element programs, SIAM Journal on Scientific Computing (35), 2013 [2] J. R. Maddison and P. E. Farrell, Rapid development and adjoining of transient finite element models, Computer Methods in Applied Mechanics and Engineering (276), 2014

15:00-15:30Coffee Break
15:30-16:30 Session 3: Porous media
Chair:
15:30
Hybridizable finite element methods for porous media flows using Firedrake

ABSTRACT. In this talk, we present our experiences in developing hybridizable finite element methods for porous media flows problems using Firedrake. We propose novel hybrid mixed methods, in which stabilization mechanisms are employed to enhance convergence rate while providing a wider range of options of finite element spaces for pressure and velocity -- the primal and flux variables, respectively. Our implementations rely on Firedrake's static condensation as a preconditioner, resulting in condensed systems that present several desirable numerical characteristics, such as smaller bandwidth (when compared with mixed formulations) and symmetric positive structure, as well as a reduction in the number of unknowns to be solved. We extend the classical Darcy's porous media flow formulation to incorporate double porosity/permeability problems, proposing new mixed hybrid and discontinuous Galerkin formulations which take into account the multiscale porous medium as overlapping continua domains, where pressures and velocities are decomposed as macro and micro scales, resulting in problems that contain four unknown fields. We show that, given a proper choice of stabilizing parameters, the results exhibit optimal convergence rates in L2-norm for both pressure and velocity variables.

15:50
Reactive transport simulation in porous media using Firedrake and Reaktoro
PRESENTER: Allan Leal

ABSTRACT. Reactive transport modeling in porous media is a computationally challenging mathematical problem that considers several physical and chemical processes into the formulation. In most cases, many advection-diffusion-reaction equations need to be solved. These are required for modeling the transport of chemical species in one or more fluids that simultaneously react among themselves as well as with rock minerals. In this presentation, we show our recent positive experience in coupling Firedrake and Reaktoro, a C++/Python library for modeling chemically reactive systems (https://reaktoro.org), for simulating reactive transport in a porous medium considering an aqueous fluid composed of many species and a rock containing several minerals. For this investigation, we employ an operator splitting scheme that allows us to use Firedrake to solve the advection-diffusion equations (ADE), and Reaktoro for performing chemical equilibrium calculations, which mathematically translates into a numerical minimization calculation (Gibbs energy minimization) in every degree of freedom, at every time step. For solving the ADE problem, we formulate locally conservative mixed discontinuous Galerkin methods coupled with Darcy flow for the pressure and velocity variables. The Darcy flow is solved with a stabilized hybrid mixed FEM, providing a suitable velocity field for the ADE problems with optimal convergence rate in L2-norm.

16:10
Preconditioning for Thermal Reservoir Simulation in Firedrake
PRESENTER: Thomas Roy

ABSTRACT. In petroleum reservoir simulation, the industry-standard preconditioner, the constrained pressure residual method (CPR), is a two-stage process which involves solving a restricted pressure system (usually with an Algebraic Multigrid method (AMG)). Initially designed for isothermal models, this approach is often used in the thermal case. However, it does not incorporate heat diffusion or the effects of temperature changes on fluid flow. We are thus interested in preconditioners which consider the cross-coupling between pressure and temperature and treat heat diffusion properly. To study the effects of both pressure and temperature on fluid and heat flow, we first consider a model of non-isothermal single phase flow through porous media. For this model, we develop a block preconditioner with an efficient Schur complement approximation. Then, we extend this method for multiphase flow as a two-stage preconditioner which involves solving a restricted pressure-temperature system. We call this preconditioner the constrained pressure-temperature residual method (CPTR). To mimic commercial reservoir simulators, we implement a Finite Volume method as a piecewise constant Discontinuous Galerkin method (dG(0)) in Firedrake. We present a comparison of the algorithmic performance of the different preconditioning approaches under mesh refinement and parallelization.

17:00-18:30 Session 4: Poster session
17:00
Multigrid preconditioners for compatible finite element ocean models
PRESENTER: Thomas Gregory

ABSTRACT. The development of a global ocean model requires working in a physical domain which is of the order of thousands of kilometres wide, but only a few kilometres deep. Yet a major part of solving the equations of motion for the ocean requires solving a pressure update governed by the Poisson equation, which is ill-conditioned in a high aspect ratio domain. This makes an accurate pressure solve a time-consuming part of any ocean model, and can be difficult to solve when high resolution is desired in the vertical and horizontal co-ordinates.

We present in this poster a discussion of the emergence of the problem, and a demonstration of its effects on solving the Poisson equation. We also highlight a potential solution to the problem through utilising a preconditioner proposed by Gopalakrishnan and Tan, and show ongoing work on the implementation of this within the framework of Firedrake.

17:00
Fireshape: a shape optimization toolbox for Firedrake
PRESENTER: Alberto Paganini

ABSTRACT. Fireshape is a shape optimization library for Firedrake. The library can tackle optimization problems constrained by PDEs and offers the following features: decoupled discretization of control and state variables, automatic derivation of shape derivatives and adjoint equations, different metrics to define shape gradients, and numerous optimization algorithms. The shape optimization knowledge required to use this library is minimal.

17:00
FInAT: exploiting structure in code generation for high-order finite elements

ABSTRACT. In this poster, we describe features in the Firedrake finite element framework that allow the code generation pipeline to exploit structure inherent to some finite elements. This includes, in particular, sum factorisation on tensor product cells for the full family of Q−spaces.

This is achieved by providing a more expressive interface between the form compiler and the library providing the implementation of finite element tabulation. This is encapsulated in a finite element library, FInAT, that explicitly communicates the structure. Form compiler algorithms are introduced that exploit this structure.