|
1 | 1 | # DispersiveShallowWater.jl |
2 | 2 |
|
3 | | -[](https://trixi-framework.github.io/DispersiveShallowWater.jl/stable/) |
4 | | -[](https://trixi-framework.github.io/DispersiveShallowWater.jl/dev/) |
| 3 | +[](https://JoshuaLampert.github.io/DispersiveShallowWater.jl/stable/) |
| 4 | +[](https://JoshuaLampert.github.io/DispersiveShallowWater.jl/dev/) |
5 | 5 | [](https://github.com/JoshuaLampert/DispersiveShallowWater.jl/actions/workflows/CI.yml?query=branch%3Amain) |
| 6 | +[](https://github.com/JuliaTesting/Aqua.jl) |
| 7 | +[](https://opensource.org/licenses/MIT) |
6 | 8 |
|
7 | | -[**DispersiveShallowWater.jl**](https://github.com/JoshuaLampert/DispersiveShallowWater.jl) is a numerical simulation framework for dispersive shallow water models. The main objective lies in structure-preserving numerical methods. |
8 | | -This is the reproducibality repository for the master thesis "Structure-preserving Numerical Methods for Dispersive Shallow Water Models" by Joshua Lampert (2023). |
| 9 | +[**DispersiveShallowWater.jl**](https://github.com/JoshuaLampert/DispersiveShallowWater.jl) is a [Julia](https://julialang.org/) package that implements structure-preserving numerical methods for dispersive shallow water models. To date, it provides provably conservative, entropy-conserving and well-balanced numerical schemes of the [BBM-BBM equations with varying bottom topography](https://iopscience.iop.org/article/10.1088/1361-6544/ac3c29), and the [dispersive shallow water model proposed by Magnus Svärd and Henrik Kalisch](https://arxiv.org/abs/2302.09924). The semidiscretizations are based on summation by parts (SBP) operators, which are implemented in [SummationByPartsOperators.jl](https://github.com/ranocha/SummationByPartsOperators.jl/). In order to obtain fully discrete schemes, the time integration methods from [OrdinaryDiffEq.jl](https://github.com/SciML/OrdinaryDiffEq.jl) are used to solve the resulting ordinary differential equations. Fully discrete entropy-conservative methods can be obtained by using the [relaxation method](https://epubs.siam.org/doi/10.1137/19M1263662) provided by DispersiveShallowWater.jl. |
9 | 10 |
|
| 11 | +# Installation |
| 12 | + |
| 13 | +If you have not yet installed Julia, you first need to [download Julia](https://julialang.org/downloads/). Please [follow the instructions for your operating system](https://julialang.org/downloads/platform/). DispersiveShallowWater.jl works with Julia v1.8 and newer. You can install DispersiveShallowWater.jl by executing the following commands from the Julia REPL |
| 14 | +```julia |
| 15 | +julia> using Pkg |
| 16 | + |
| 17 | +julia> Pkg.add(url="https://github.com/JoshuaLampert/DispersiveShallowWater.jl") |
| 18 | + |
| 19 | +julia> Pkg.add(["OrdinaryDiffEq", "Plots"]) |
| 20 | +``` |
| 21 | +The last command installs also the package "OrdinaryDiffEq.jl" used for time-integration and "Plots.jl" to visualize the results. If you want to use other SBP operators than the default operators that DispersiveShallowWater.jl uses, you also need SummationByPartsOperators.jl, which can be installed running |
| 22 | +```julia |
| 23 | +julia> Pkg.add("SummationByPartsOperators") |
| 24 | +``` |
| 25 | + |
| 26 | +# Usage |
| 27 | + |
| 28 | +In the Julia REPL, first load the package DispersiveShallowWater.jl |
| 29 | +```julia |
| 30 | +julia> using DispersiveShallowWater |
| 31 | +``` |
| 32 | + |
| 33 | +You can run a basic simulation that solves the BBM-BBM equations by executing |
| 34 | +```julia |
| 35 | +julia> include(default_example()); |
| 36 | +``` |
| 37 | +The result can be visualized by using the package Plots.jl |
| 38 | +```julia |
| 39 | +julia> using Plots |
| 40 | +julia> plot(semi => sol) |
| 41 | +``` |
| 42 | +The command `plot` expects a `Pair` consisting of a [`Semidiscretization`](@ref) and an `ODESolution`. The visualization can also be customized, see the [documentation](@ref visualize_results) for more details. Other examples can be found in the subdirectory [examples/](https://github.com/JoshuaLampert/DispersiveShallowWater.jl/tree/main/examples). A list of all examples is returned by running [`get_examples()`](@ref). You can pass the filename of one of the examples or your own simulation file to `include` in order to run it, e.g., `include(joinpath(examples_dir(), "svaerd_kalisch_1d", "svaerd_kalisch_1d_dingemans_relaxation.jl"))`. |
| 43 | + |
| 44 | +# Authors |
| 45 | + |
| 46 | +The package is developed and maintained by Joshua Lampert and was initiated as part of the master thesis "Structure-preserving Numerical Methods for Dispersive Shallow Water Models" (2023). Some parts of this repository are based on parts of [Dispersive-wave-schemes-notebooks. A Broad Class of Conservative Numerical Methods for Dispersive Wave Equations](https://github.com/ranocha/Dispersive-wave-schemes-notebooks) by Hendrik Ranocha, Dimitrios Mitsotakis and David Ketcheson. The code structure is inspired by [Trixi.jl](https://github.com/trixi-framework/Trixi.jl/). |
| 47 | + |
| 48 | +# License and contributing |
| 49 | + |
| 50 | +DispersiveShallowWater.jl is published under the MIT license (see [License](https://github.com/JoshuaLampert/DispersiveShallowWater.jl/blob/main/LICENSE)). We are pleased to accept contributions from everyone, preferably in the form of a PR. |
0 commit comments