Skip to content

trixi-framework/TrixiBottomTopography.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TrixiBottomTopography.jl

Docs-dev Build Status Coverage Status License: MIT

TrixiBottomTopography.jl is a supplementary package to the numerical solver Trixi.jl, which enables to use real world geographical data for the bottom topography function of the shallow water equations.

The shallow water equations in one dimension

$$\begin{aligned} \begin{pmatrix} h \\ hv \end{pmatrix}_t + \begin{pmatrix} hv \\ hv^2 + \frac{1}{2}gh^2 \end{pmatrix}_x = \begin{pmatrix} 0\\ -ghb_x \end{pmatrix} \end{aligned}$$

and two dimensions

$$\begin{aligned} \begin{pmatrix} h \\ hv_1 \\ hv_2 \end{pmatrix}_t + \begin{pmatrix} hv_1 \\ hv_1^2 + \frac{1}{2}gh^2 \\ hv_1v_2 \end{pmatrix}_x + \begin{pmatrix} hv_2 \\ hv_1v_2 \\ hv_2^2 + \frac{1}{2}gh^2 \end{pmatrix}_y = \begin{pmatrix} 0\\ -ghb_x \\ -ghb_y \end{pmatrix} \end{aligned}$$

require a (piecewise) differentiable function $b$, which describes the bottom topography.

Geographical data is almost always given as scattered data points on a coordinate system with the corresponding elevation. So to incorporate geographical data into the shallow water equations, we need to define a function that remodels the topography from the data.

TrixiBottomTopography.jl does this by B-spline interpolation of the underlying data.

Functionalities

This package contains the following three main functionalities:

  • Converting geographical data given in form of .xyz files from the DGM data set provided by Geobasis NRW to make it readable for TrixiBottomTopography.jl
  • Setting up a B-spline interpolation structure in one and two dimensions which contains all the relevant information to define a B-spline interpolation function with additional specifications
  • Using the B-spline structure to set up a B-spline interpolation function

A detailed description of the functionalities can be found in the documentation to this package.

Installation

If you have not yet installed Julia, please follow the instructions for your operating system. TrixiBottomTopography works with Julia v1.7.

As TrixiBottomTopography is not a registered Julia package, you have to download it locally

git clone https://github.com/trixi-framework/TrixiBottomTopography.jl.git

and run it from within the cloned directory

julia --project=@.

to make use of the implemented functionalities.

Examples

To see a first example of TrixiBottomTopography.jl a default example has been implemented. First, load the package

julia> using TrixiBottomTopography

Then call the TrixiBottomTopograpy default example

julia> TBT_default_example()

If the implementation was successful, the following window appears:

image

Further examples can be found in the examples folder of this repository.

Authors

TrixiBottomTopography.jl was developed by Maximilian Dominique Bertrand (University of Cologne, Germany) with the help of Andrew Winters (Linköping University, Sweden) and Michael Schlottke-Lakemper (RWTH Aachen University, Germany).

License and contributing

TrixiBottomTopography.jl is published under the MIT license (see License). We are pleased to accept contributions from everyone, preferably in the form of a PR.