Coder Social home page Coder Social logo

incompressibleeulerhdg's Introduction

Hybridisable DG discretisations of the incompressible Euler equations

Implementation for several advanced discretisation methods and timestepping methods for the incompressible Euler equations.

Overview

The goal of this work is to implement higher order hybridisable DG discretisations in space and time for the incompressible Euler equations similar to what has been done in Ueckermann and Lermusiaux (2016) for the incompressible Navier Stokes equations. This is achieved by extending the methods in Guzmán, Shu, Sequeira (2017).

Mathematical details

The incompressible Euler equations that are to be solved here are given by

$$ \begin{aligned} \frac{dQ}{dt} + \nabla p + (Q\cdot \nabla) Q &= f\\ \nabla\cdot Q &= 0 \end{aligned} $$

The code implements a range of numerical schemes:

  1. The fully implicit method based on a conforming $\text{RT}_0\times \text{DG}_0$ discretisation described in Guzmán, Shu, Sequeira (2017), see conforming_implicit.py.
  2. The fully implicit method based on a $[\text{DG}_{k+1}]^2\times \text{DG}_k$ DG discretisation also described in Guzmán, Shu, Sequeira (2017), see dg_implicit.py
  3. A fully implicit hybridisable DG variant of the fully implicit DG discretisation, see hdg_implicit.py
  4. A hybridisable DG variant of the DG discretisation which uses Chorin's projection method to split the implicit update into the computation of a tentative velocity followed by a pressure correction that enforces the divergence-free constraint on the velocity, see hdg_implicit.py.
  5. A generalisation of the hybridisable DG variant to IMEX timesteppers. The computation of the update at each stage can be done either fully implicitly or with a Richardson iteration that is preconditioned with a projection method, hdg_imex.py.

A stationary exact solution of the incompressible Euler equations in the domain $\Omega = [0,1]\times [0,1]$ is given by $f = 0$ and

$$ \begin{aligned} Q_s(x,y) &= \left(-C(x) S(y),S(x) C(y)\right)^\top\\ p_s(x,y) &= p_0 - C(x) C(y) \end{aligned} $$

where $S(z) = \sin\left(\frac{2z-1}{2}\pi\right)$ and $C(z) = \cos\left(\frac{2z-1}{2}\pi\right)$.

From this a divergence free time-dependent solution can be constructed as

$$ \begin{aligned} Q(x,y,t) &= \Psi(t) Q_s(x,y)\\ p(x,y,t) &= \Psi(t)^2 p_s(x,y) \end{aligned} $$

and $f = \frac{d\Psi}{dt} Q_s(x,y)$.

For further details on the used discretisation and timestepping methods see here.

Installation

To install this package run python -m pip install . as usual after installing the dependencies (see below).

If you want to edit the code, you might prefer to install in editable mode with python -m pip install --editable .

Running the code

The main script is driver.py in the src directory. Run

python driver.py --help

to see a list of command line options.

Dependencies

Firedrake

See here for Firedrake installation instructions.

incompressibleeulerhdg's People

Contributors

eikehmueller avatar em459 avatar

Stargazers

youkown avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.