FIREDRAKE '17: THE FIREDRAKE USER AND DEVELOPER WORKSHOP
PROGRAM FOR TUESDAY, MARCH 28TH
Days:
previous day
all days

View: session overviewtalk overview

09:30-10:45 Session 5
09:30
Automating Hybridization via Composing Abstractions
SPEAKER: Thomas Gibson

ABSTRACT. Recently developed finite element discretizations maintain the exact force balances which are essential for accurate atmosphere and ocean simulations. However, efficient solution of the geophysical flow equations depends on transforming the mixed velocity-pressure (or velocity-pressure-buoyancy) system into an elliptic system for the pressure. Implementing this transformation in the finite element method requires the exploitation of “hybridization” techniques in which the discretized systems are algebraically manipulated during the equation assembly process to produce the desired elliptic problem. Using conventional model development techniques, hybridization of complex discretizations requires manual intervention in intricate numerical code, and this intervention must be repeated every time the model is modified, extended, or debugged.

In contrast, the Firedrake project at Imperial College takes the discretized equations in symbolic form as input, and automatically generates high performance parallel code from this mathematical specification. In this talk, we present a robust abstraction framework for specifying local operations on finite element tensors. By introducing these symbolic operations, and generating code from them, we successfully extend hybridized finite elements for automated simulation to this important class of problem.

09:55
Frontogenesis experiments on a vertical slice using a compatible finite element method

ABSTRACT. A vertical slice model is developed for the Euler-Boussinesq equations with a constant temperature gradient in the y-direction (the Eady-Boussinesq model). The model is a solution of the full three-dimenstional equations with no variation normal to the slice, which is an idealized problem used to study the formation and subsequent evolution of weather fronts. In this study, compatible FEM formulation with Charney-Phillips style temperature staggering is used. Mixed FEM discretizations on an extruded mesh are performed using Firedrake. I will discuss the details of the vertical slice model implementations, and will show the preliminary results obtained through nonlinear simulations developed to implement the modelling of fronts.

10:20
Parallelisable exponential integrators for the shallow water equations
SPEAKER: Jemma Shipton

ABSTRACT. Motivated by the need for highly parallelisable algorithms for numerical weather and climate prediction, we investigate exponential integrators for the shallow water equations. The use of near-optimal rational approximations for the exponential terms enables the construction of timestepping schemes that can be executed in parallel. Previous work on these timestepping schemes has been carried out using spectral methods. Here we will show how Firedrake can be used to enable us to investigate these schemes using a compatible finite element spatial discretisation.

10:45-11:30 Session 6: Posters and coffee
10:45
Applications of Thetis for tidal energy resource assessment and optimisation

ABSTRACT. The combined operation of tidal stream and range power schemes can exceed 12% of the UK’s energy demand. Pilot projects for tidal stream energy generation are in the advanced stages of planning and development within the UK. Similarly, tidal range energy proposals are gaining momentum with signs from the recent Hendry review that tidal lagoon technologies will be developed. We are currently at the crucial stage where high-fidelity models need to be developed to reliably assess and optimise the configuration of tidal energy schemes, hence reducing the impact and cost of the designs. The underlying firedrake framework to the coastal ocean model Thetis presents opportunities such as the capability to conduct massively parallel hydrodynamic simulations coupled with adjoint - based optimisation functionality. This work presents two engineering applications related to tidal energy proposals around the UK. In the first we consider the English Channel to investigate the optimisation of tidal stream turbine positioning through adjoint implementation within Alderney Race, located off the West coast of Normandy, France where flow velocities exceed 5 m/s. The latter focuses on an application of Thetis to simulate the operation of a tidal lagoon proposal in the Bristol channel, UK where processes such as intertidal area wetting and drying and algorithms for the regulation of the scheme hydraulic structures need to be in place. Results from these studies will inform regulators and developers on the most suitable overall development and operation strategy, where array-array and lagoon interaction effects will inevitably become important.

10:45
Implementation strategies for nonlinear potential-flow waves driven by a piston wave-maker

ABSTRACT. Firedrake is used to solve the nonlinear potential-flow equations in a deep-water domain with seabed topography. Waves are generated by a piston wavemaker on the left-hand side of a basin and reflected on a vertical wall on the right-hand side of the basin. Spatial discretisation strategies are derived to deal with moving boundaries at the wavemaker and at the free surface, as well as to update the vertical structure of the velocity potential. First-order (symplectic-Euler) and second-order (Störmer-Verlet) time schemes are applied to the discrete weak formulations to compute the temporal evolution of the water depth and velocity potential. The computed numerical simulations are validated against experimental measurements conducted in the wave tank of the Maritime Research Institute Netherlands (MARIN). The comparison shows good agreement between the numerical and measured wave elevations at various distances from the wave-maker. The model is then coupled to a model of breaking waves at shallow-water beaches to dampen the waves and limit their reflection.

10:45
Validation of a 1D non-linear shallow-water model under a Hele-Shaw geometry by applying a finite volume and a finite element discretisation

ABSTRACT. One-dimensional non-linear shallow-water equations have been used to model the waves observed in an experimental setup consisting of a vertical Hele-Shaw tank consisting of two thin glass plates, which are 2 placed mm apart. These waves are generated from a set of aquarium pumps, which work underwater whilst operated by a motor controller and programmed by a laptop. The influx as well as the effect of momentum damping due to the close proximity of the glass plates have been added in the model, so as to appropriately describe the dominant physical effects that take place in the experiment. The modified shallow-water equations have been solved initially in Matlab by discretising in space using a finite volume scheme and a Forward Euler time discretisation. The same system of equations has also been solved in Firedrake, using the finite element method and the Stormer-Verlet scheme in time. The Firedrake implementation also included the generation of a uniform one-dimensional mesh by splitting the computational domain into N elements, and approximation of the solutions by linear Lagrange polynomials in each element. The Firedrake code, which was originally developed in Kalogirou et al., has been modified so as to include experimental data. In both numerical investigations, experimental data has been used as an input so as to validate the models whilst comparing their performance. The inserted experimental data concern the depth at the left wall and the influx and have been acquired by applying image and data processing techniques to snapshots originating from the experiment. Future work includes extending the model to include dispersive effects via a potential-flow water-wave model and adding bottom topography.

References

Kalogirou A. , Moulopoulou E.E. and Bokhove O. (2016). Variational finite element methods for waves in a Hele-Shaw tank. Applied Mathematical Modelling. Volume 40(17-18), pp. 7493–7503

10:45
Variational modelling of wave-structure interactions with an offshore wind-turbine mast
SPEAKER: Tomasz Salwa

ABSTRACT. We consider the development of a mathematical model of water waves interacting with the mast of an offshore wind turbine. A variational approach is used for which the starting point is an action functional describing a dual system comprising a potential-flow fluid, a solid structure modelled with nonlinear elasticity, and the coupling between them. We develop a linearized model of the fluid-structure or wave-mast coupling, which is a linearization of the variational principle for the fully coupled nonlinear model. Our numerical results in Firedrake for the linear case indicate that our variational approach yields a stable numerical discretization of a fully coupled model of water waves and an elastic beam. The energy exchange between the subsystems is seen to be in balance, yielding a total energy that shows only small and bounded oscillations whose amplitude tends to zero with 2nd-order convergence as the timestep goes to zero. Similar 2nd-order convergence is observed for spatial mesh refinement. The linearised model so far developed is intended to be extended into a nonlinear regime.

10:45
Using firedrake efficiently on large computers
SPEAKER: Nick Johnson

ABSTRACT. Firedrake runs well on supercomputers and clusters but, as with all Python-based programs, gets hit hard by serialisation of IO during module import and when using Cython to compile to network file systems. As the number of nodes grows, this problem escalates and simply importing firedrake on 24000 cores can take ~45 minutes.

In this poster I describe two changes to firedrake that can be made to improve this. The first is to make the virtualenv relocatable, allowing it to be moved on disk to a location which doesn't experience bad IO serialisation, using the above example, this gives around a 10x speedup on import time; the second is to change compilation to happen close to the compute cores, without touching potentially bottleneck file-systems.

10:45
Validation and benchmarking of a wetting-drying shallow water solver, with application to storm surge modelling
SPEAKER: Simon Warder

ABSTRACT. The simulation of coastal inundation processes due to storm surge and tsunami impact is required by government agencies for accurate forecasting and mitigation strategy design, and by the insurance industry for the purposes of catastrophe loss modelling. Fast and efficient algorithms are necessary for the enhancement of real-time forecasting and flood warnings, and to facilitate the use of ensemble methods for evaluating forecast uncertainty.

A finite element shallow water solver implementing a fully implicit wetting-drying scheme, developed within the Thetis coastal ocean model, is validated using a variety of analytic test cases and comparisons with the industry standard shallow water model TELEMAC-2D. Performance benchmarking is undertaken, with preliminary results indicating that, in a wetting-drying test case, the Thetis solver achieves similar performance to TELEMAC-2D in computation time – L2 error space. Idealised test cases motivated by storm surge applications are also presented.

11:30-12:45 Session 7
11:30
Regularized topology optimization in Firedrake

ABSTRACT. Topological optimization finds a material density distribution minimizing a functional of the solution of a partial differential equation (PDE), subject to a set of constraints (typically, a bound on the volume or mass of the material). Using a finite elements discretization (FEM) of the PDE and functional we obtain an integer programming problem. Due to approximation error of FEM discretization, optimization problem becomes mesh-depended and possess false, physically inadequate optimums, while functional value heavily depends on fineness of discretization scheme used to compute it. To alleviate this problem, we propose regularization of given functional by error estimate of FEM discretization. This regularization provides robustness of solutions and improves obtained functional values as well.

While the idea is broadly applicable, in this talk we demonstrate our method to the heat conduction optimization. This type of problems are of practical importance in design of heat conduction channels, heat sinks and other types of heat guides. All experiments as well error estimators are implemented in FireDrake.

11:55
Higher-order discretization of diffeomorphisms for PDE-constrained shape optimization

ABSTRACT. PDE-constrained shape optimization problems are characterized by target functionals that depend both on the shape of a domain (the control) and on the solution of a boundary value problem formulated on that domain (the state). In industrial applications, such optimization problems are formulated to improve the performance (expressed in terms of the target functional) of an initial domain.

PDE-constrained shape optimization problems can be solved numerically by meshing the initial domain and updating iteratively the coordinates of the nodes of this mesh. Steepest descent updates can be computed with approximate shape derivatives based on finite element approximations of the state.

In this work, we present a mathematical framework that generalizes standard moving mesh methods to higher-order discretizations of both computational domains and domain updates. We parametrize shapes by applying (discretized) deformation diffeomorphisms to the initial guess, and incorporate domain deformations into the PDE solver via isoparametric finite elements.

This approach allows for arbitrarily smooth representations of shapes, reduces approximation errors, and is compatible with standard finite element software.

12:20
The FADE framework: Firedrake and Assimilating Data using Ensembles.

ABSTRACT. This talk will demonstrate work undertaken to build a data assimilation framework for Firedrake, specifically using the novel Ensemble Transform Particle Filter (ETPF) proposed in Reich (2011). The language of Firedrake allows for a natural extension of functions to random fields, namely solutions to Partial Differential Equations with random initial conditions or random forcing. Assimilating partial observations into an ensemble forecast of the random field, is done in this framework via the ETPF, which uses Optimal Transportation to transform the ensemble forecast to represent the observed distribution more accurately. This transformation can be carried out in Firedrake by looping kernels, that implement the transportation algorithm, over each node on a mesh. This data assimilation framework also contains ensemble forecast verification techniques that can be used with ease alongside Firedrake and ensembles of random fields. A numerical example of assimilating a randomly forced Quasi-Geostrophic system is presented. An extension to an efficient multilevel version of the ETPF, proposed in Gregory et al. (2016) is also briefly mentioned.

12:45-14:00Lunch Break
14:00-15:15 Session 8
14:00
Performance Portable Molecular Dynamics

ABSTRACT. In this talk we describe a new Domain Specific Language (DSL) for the development of Performance Portable Molecular Dynamics codes. In computational physics and chemistry researchers increasingly use larger and longer simulations to inform theory and experiment. In order to exploit modern hardware codes must be efficient and exploit all available parallelism. Though a variety of codes exist to provide highly parallel Molecular Dynamics, they are not performance portable and must be reimplemented for each new hardware architecture requiring substantial knowledge in both the physical domain and the computer science domain. A similar barrier is faced by members of the community who wish to perform customised simulations which go beyond the scope of existing codes or introduce computationally intensive analysis.

We present a novel technique to develop highly parallel codes for Molecular Dynamics simulation that does not require detailed knowledge of computing hardware from domain specialists. Following the successful approach of PyOP2 and Firedrake in the Partial Differential Equation world we implement an abstraction which separates the concerns of the domain specialist from those of the computer scientist. The result is a Python framework where a high level language is used to describe computational work in the science domain that is interpreted to generate efficient and parallel code for a target architecture.

14:25
Trajectory planning for the Stokes equations
SPEAKER: Julian Andrej

ABSTRACT. Many industrial applications benefit from analysis and control of fluid dynamics. These cover indirect consideration of fluid flow, where the dynamics have an impact on the examined object, for example shape optimization in aviation or actuator line modeling of wind turbine wakes. Direct methods are covering examples which actuate the fluid directly e.g. a mixing process in chemical engineering, where one or more fluids have to be blended in a certain time frame. All approaches need to satisfy some form of the Navier-Stokes or Stokes equations (in case of viscous fluids) in order to integrate proper fluid dynamics into the model.

In this talk, the main subject is the trajectory planning for the three dimensional Stokes equations using a flat or basic output. Several other attempts at the topic have been made using linear, nonlinear or optimal control methods to achieve a feasible motion planning or enhancement of mixing processes. A unique characteristic to the approach used in this presentation is the combination of the finite element method, that allows the usage of complex geometric domains, with flatness based trajectory planning, that describes a straightforward method to compute and plan the transition between velocity profiles. The spectral properties of the system operator are used to obtain a flat output which provides a differential parametrization of the system state and inputs. For transitions between stationary velocity profiles in desired time intervals, this approach leads to divergent solutions, dependent on the input configurations. Therefore a re-summation approach is shown which provides the possibility to recover a convergent input trajectory. Concluding, all techniques provided are used to simulate different state transition scenarios.

14:50
Anisotropic mesh adaptation in Firedrake

ABSTRACT. Anisotropic mesh adaptation consists in generating a new unstructured mesh in which the mesh element location, size and orientation are set to minimizes some error model, so that solving the equations at stake on the new mesh is both more accurate and cheaper.

In this talk, we will present the latest updates on the implementation of unstructured mesh adaptation in Firedrake. The chosen approach is to use the anisotropic remeshing library Pragmatic, and interface it with Firedrake through PETSc DMPlex. A whole adaptation loop for time-dependent problems was implemented using Firedrake, and the current implementation of these steps will be presented: computation of the error, interface with DMPlex, mesh gradation... Ongoing and future works will also be discussed: parallelization of the interface, mesh gradation with PyOp2 and coupling with r-adaptation.

15:15-15:45Coffee Break
15:45-17:00 Session 9
15:45
Composable block preconditioning for multiphysics problems

ABSTRACT. Many scalable approaches for preconditioning systems of multiple variables rely on block factorisations and approximate block inverses of the monolithic operator. Some of these can be performed purely algebraically (through manipulation of the assembled operator), however, many cannot. Instead, they rely on the creation of auxiliary, discretisation-dependent, operators.

In this talk, I will discuss the support Firedrake has for the fast prototyping and development of scalable block preconditioners, based on a composition of PDE-level and solver-level data. This includes the ability to build matrix-free methods, with complex custom preconditioners in only a few lines of code.

16:10
A performance spectrum for parallel computational frameworks for solving PDEs
SPEAKER: Justin Chang

ABSTRACT. Important computational physics problems are often large-scale in nature, and it is highly desirable to have robust and high performing parallel computational frameworks that can quickly address these problems. However, it is no trivial task to determine whether a computational framework is performing optimally or is scalable. Herein, we propose a performance spectrum that can enhance one's understanding of critical performance metrics such as arithmetic intensity and algorithmic scalability. As proof of concept, we examine various benchmark problems with both the Firedrake project and utilize the performance spectrum to justify the performance and scalability (or lack thereof) of various finite element discretizations and multi-grid solvers. It is shown that the proposed performance spectrum is a highly versatile performance model that can systematically identify key performance issues for relevant subsurface flow and transport applications and can easily be extended to large-scale simulations on state-of-the-art high performance computing systems. Potential application and future extension of this work is discussed thoroughly.

16:35
Optimally-transported meshes for weather prediction
SPEAKER: Andrew McRae

ABSTRACT. We discuss our use of Firedrake to implement a moving mesh method applied to geophysical PDEs in the context of numerical weather prediction. We firstly use Firedrake to generate meshes which are adapted to a prescribed scalar monitor function. This is done through equidistribution, so that the volume of a cell is inversely proportional to the monitor function. We augment equidistribution with an optimal transport condition, resulting in a nonlinear equation of Monge-Ampère type that we discretise and solve.

We secondly use Firedrake to implement the physical PDEs on this moving mesh. This is based on a compatible finite element method approach to solving these equations. In all, this work uses multiple pieces of specialist functionality within Firedrake, including manifolds, quadrilaterals, automatic differentiation of forms, higher-order coordinate fields, custom solver callbacks, and the parloop escape hatch.