Skip to content

2D hydrodynamics on Cartesian and Voronoi meshes using finite volume and discontinuous Galerkin methods. Includes second-order FV MUSCL solver for shallow water and Euler equations and discontinous Galerkin advection.

License

Notifications You must be signed in to change notification settings

nelson-group/hydro_bsc_project

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

63 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hydro_bsc_project

Project to do 2D hydrodynamics on Cartesian and static Voronoi meshes using finite volume and discontinuous Galerkin methods.

The project includes grid generation methods from the vmp mesh generation code as well as solvers for the advection equation, the shallow water equations and Euler equations. The advection equation is solved in one and two dimensions using a simple FV upwind scheme, while the shallow water and Euler equations are solved using a first-order Godunov-type scheme and a second-order MUSCL-Hancock scheme with slope-limiting as in (Springel 2010). To solve the Riemann problems a HLL approximate Riemann solver is used. For discontinous Galerkin methods a one and two dimensional Cartesian scalar upwind advection scheme is implemented using monomial basis functions and Legendre polynomials following (Schaal 2015). Finally there exist various plotting and analysis routines in a python visualization toolkit. Note, that the program requires the Eigen library to run.

This work was done as part of a bachelor thesis in physics at the Institute for theoretical Astrophysics in the Group of Dr. Dylan Nelson, supervised by him and Dr. Chris Byrohl. The thesis can be accessed here. Otherwise feel free to just scroll through some of the plots produced using code.

Tip

There exists a newer version of this code, which supports multithreading and has an installation guide.


Advection

A one and two dimensional upwind scheme for the advection equation. At low resolution there is a lot of numerical diffusion.

1 1


Mesh generation with custom internal boundaries

When generating a Voronoi mesh, we can place the seedpoints in specific ways to generate internal structures.

1 1


2D shallow water equations

The shallow water equations can be solved using similar methods as for the euler equations and describe wave propagation, if the wavelength is way longer than the water depth.

1 1 1


Euler equations

Sod's shock tube is a classical test where the code can be compared to an analytical solution. Shown here is the second order MUSCL-scheme with slope limiting.

1 1 1 1

The Kelvin-Helmholtz instability is one of the most important fluid instabilities. The initial perturbation here is given by Voronoi mesh noise only. The size of the smallest possible eddies strongly depends on mesh resolution and the accuracy of the scheme.

1 1 1 1

Another important fluid instability is the Rayleigh-Taylor instability shown here for two fluids under the influence of constant external gravity and a sinuodial perturbation.

1

Additionally we looked at a 2D Riemann problem proposed by (Kurganov and Tadmor, 2002).

1

and observed vortex shedding

1

and the flow around an airfoil

1


Discontinuous Galerkin scalar upwind advection

In DG we propagate functions on the cells instead of cell averages as in FV. Slope limiting near discontinuities is really important here.

1D:

1 1

2D:

1 1

A convergence analysis shows higher order spatial convergence as expected for DG, the time convergence however is first order because of the forward Euler time integration.

1 1

In future work one should implement a higher-order time integration... additionally extending DG to Euler equations and maybe Voronoi would be really exiting.

About

2D hydrodynamics on Cartesian and Voronoi meshes using finite volume and discontinuous Galerkin methods. Includes second-order FV MUSCL solver for shallow water and Euler equations and discontinous Galerkin advection.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 76.8%
  • Python 22.8%
  • CMake 0.4%