Solves the two-dimensional advection equation in a Cartesian domain.
where
You need Julia -- consider juliaup for installing.
Install dependencies by running julia
in the repository root and entering the
following code in the REPL:
import Pkg; Pkg.add("CairoMakie")
It'll take a few minutes to download and precompile packages.
For CUDA:
import Pkg; Pkg.add("CUDA")
This code is intended to develop positivity preserving advection schemes.
Therefore the data structure resembles what we have normally in a spectral element code. The simulation domain is divided in a number of macro conforming quadrilateral elements. Inside each element you have a number of degrees of freedom. For two-dimensional quadrilaterals a tensor product ansatz of one dimensional Lagrange function is used defined on the
interval
Tri numerical methods are implemented on the same number of degree of freedoms, a pure finite volume method, a pure continuous spectral element method and combined method. Since the first two methods can be written in the same flux form they can be combined by a convex combination of both fluxes. The be+lending factor is computed locally for each flux and is determined from the smoothness of the tracer profile,
To run the code the user can choose the domain size (Lx,Ly), the number of grid boxes (Nx,Ny) in the x and y direction and the order n of the element function. Furthermore you have to choose a time dtau step and the number of time steps nIter. All this has to be done at the moment in one of the tri main programs beginning with Test.... The size of the time step is constrained by the CFL number which depends on the maximum size of the given velocity field, the grid size of the macro cell and the order of the polynomial.