TrixiShallowWater.jl is a numerical simulation package focused on solving shallow water equations with the discontinuous Galerkin method and written in Julia. The package builds on the numerical simulation framework for conservation laws Trixi.jl and provides several specialized models and features specific for shallow water applications. Below is a short summary of the available features:
- 1D and 2D simulations on line/quad meshes
- Cartesian and curvilinear meshes
- Conforming and non-conforming meshes
- Hierarchical quadtree meshes with adaptive mesh refinement
- High-order accuracy in space and time
- Entropy-stable discontinuous Galerkin methods based on flux differencing
- Entropy-stable shock capturing
- Positivity-preserving limiting
- Compatible with the SciML ecosystem for ordinary differential equations
- CFL-based and error-based time step control
- Shallow water capabilities
- Wetting and drying
- Multi-layer flows
- Sediment transport via an Exner model
If you have not yet installed Julia, please follow the instructions for your operating system. TrixiShallowWater.jl works with Julia v1.10 and newer. We recommend using the latest stable release of Julia.
TrixiShallowWater.jl and its related tools are registered Julia packages. Hence, you can install TrixiShallowWater.jl, the numerical solver framework Trixi.jl, visualization tools Trixi2Vtk.jl, and Plots.jl as well as relevant time integration sub-packages of OrdinaryDiffEq.jl, by executing the following commands in the Julia REPL:
julia> using Pkg
julia> Pkg.add(["TrixiShallowWater", "Trixi", "Trixi2Vtk", "Plots",
"OrdinaryDiffEqLowStorageRK", "OrdinaryDiffEqSSPRK"])
You can copy and paste all commands to the REPL including the leading
julia>
prompts - they will automatically be stripped away by Julia.
The package OrdinaryDiffEq.jl
and its sub-packages provide time integration schemes used by TrixiShallowWater.jl,
while Plots.jl can be used to directly
visualize TrixiShallowWater.jl's results from the REPL.
If you plan on editing TrixiShallowWater.jl itself, you can download TrixiShallowWater.jl locally and use the code from the cloned directory:
git clone [email protected]:trixi-framework/TrixiShallowWater.jl.git
cd TrixiShallowWater.jl
mkdir run
cd run
julia --project=. -e 'using Pkg; Pkg.develop(PackageSpec(path=".."))' # Install local TrixiShallowWater.jl clone
julia --project=. -e 'using Pkg; Pkg.add(["Trixi", "OrdinaryDiffEqLowStorageRK", "OrdinaryDiffEqSSPRK", "Trixi2Vtk", "Plots"])' # Install additional packages
Note that the postprocessing tools Trixi2Vtk.jl and Plots.jl are optional and can be omitted.
If you installed TrixiShallowWater.jl this way, you always have to start Julia with the --project
flag set to your run
directory, e.g.,
julia --project=.
if already inside the run
directory.
Further details, of how to develop TrixiShallowWater.jl together with a local
clone Trixi.jl, can be found in the
Development section
of the documentation.
TrixiShallowWater.jl is maintained by the Trixi authors. Its principal developers are Andrew Winters (Linköping University, Sweden) and Patrick Ersing (Linköping University, Sweden). The full list of contributors can be found in AUTHORS.md.
TrixiShallowWater.jl is licensed under the MIT license (see LICENSE.md). Since TrixiShallowWater.jl is an open-source project, we are very happy to accept contributions from the community. To get in touch with the developers, join us on Slack or create an issue.
This project has benefited from funding from Vetenskapsrådet (VR, Swedish Research Council), Sweden through the VR Starting Grant "Shallow water flows including sediment transport and morphodynamics", VR grant agreement 2020-03642 VR.