StableSpectralElements.jl
StableSpectralElements.jl is a Julia framework for the numerical solution of partial differential equations of the form
\[\partial_t \underline{U}(\bm{x},t) + \bm{\nabla}_{\bm{x}} \cdot \underline{\bm{F}}(\underline{U}(\bm{x},t), \bm{\nabla}_{\bm{x}}\underline{U}(\bm{x},t)) = \underline{0},\]
for $t \in (0,T)$ with $T \in \mathbb{R}^+ $ and $\bm{x} \in \Omega \subset \mathbb{R}^d$, subject to appropriate initial and boundary conditions, where $\underline{U}(\bm{x},t)$ is the vector of solution variables and $\underline{\bm{F}}(\underline{U}(\bm{x},t),\bm{\nabla}_{\bm{x}}\underline{U}(\bm{x},t))$ is the flux tensor containing advective and/or diffusive contributions. These equations are spatially discretized on curvilinear unstructured grids using energy-stable and entropy-stable discontinuous spectral element methods in order to generate ODEProblem
objects suitable for time integration using OrdinaryDiffEq.jl within the SciML ecosystem. StableSpectralElements.jl also includes postprocessing tools employing WriteVTK.jl for generating .vtu
files, allowing for visualization of high-order numerical solutions on unstructured grids using ParaView or other software. Shared-memory parallelization is supported through multithreading.
The functionality provided by StartUpDG.jl for the handling of mesh data structures, polynomial basis functions, and quadrature nodes is employed throughout this package. Moreover, StableSpectralElements.jl implements dispatched strategies for semi-discrete operator evaluation using LinearMaps.jl, allowing for the efficient matrix-free application of tensor-product operators.
Discretizations satisfying the summation-by-parts (SBP) property employing nodal as well as modal bases are implemented, with the latter allowing for efficient and low-storage inversion of the dense elemental mass matrices arising from curvilinear meshes through the use of weight-adjusted approximations. Tensor-product formulations supporting sum factorization are available on triangles and tetrahedra through the use of SBP operators in collapsed coordinates, as well as on quadrilaterals and hexahedra.
Theory
For a comprehensive overview of the numerical methods implemented in StableSpectralElements.jl, please refer to Tristan's PhD thesis, Provably Stable Discontinuous Spectral-Element Methods with the Summation-by-Parts Property: Unified Matrix Analysis and Efficient Tensor-Product Formulations on Curved Simplices.
Installation
StableSpectralElements.jl is a registered Julia package (compatible with Julia versions 1.10 and higher) and can be installed by entering the following commands within the Julia REPL (read-eval-print loop):
using Pkg; Pkg.add("StableSpectralElements")
Alternatively, you can clone the repository and run your local version as follows:
git clone https://github.com/tristanmontoya/StableSpectralElements.jl.git
cd StableSpectralElements.jl
julia --project=.
In either case, you can then start using the package by entering using StableSpectralElements
.
Examples
We recommend that users refer to the following Jupyter notebooks (included in the examples
directory) for examples of how to use StableSpectralElements.jl:
- Linear advection-diffusion equation in 1D
- Inviscid Burgers' equation in 1D with energy-conservative scheme
- Euler equations in 1D with entropy-conservative Gauss collocation methods
- Linear advection equation in 2D
- Isentropic Euler vortex in 2D with entropy-stable modal scheme on triangles
- Linear advection equation in 3D
- 3D Euler equations with entropy-stable modal scheme on tetrahedra
Citing
If you use StableSpectralElements.jl in your research, please cite the following publications:
@article{MontoyaZinggTensorProduct24,
title = {Efficient Tensor-Product Spectral-Element Operators with the Summation-by-Parts
Property on Curved Triangles and Tetrahedra},
author = {Montoya, Tristan and Zingg, David W},
journal = {{SIAM} Journal on Scientific Computing},
volume = {46},
number = {4},
pages = {A2270--A2297},
doi = {10.1137/23M1573963},
year = {2024}
}
@article{MontoyaZinggEntropyStable24,
title = {Efficient Entropy-Stable Discontinuous Spectral-Element Methods Using
Tensor-Product Summation-by-Parts Operators on Triangles and Tetrahedra},
author = {Montoya, Tristan and Zingg, David W},
journal = {Journal of Computational Physics},
volume = {516},
pages = {113360},
doi = {10.1016/j.jcp.2024.113360},
year = {2024}
}
The following repositories are associated with the above papers, and contain the code required to reproduce the results presented therein:
- https://github.com/tristanmontoya/ReproduceSBPSimplex
- https://github.com/tristanmontoya/ReproduceEntropyStableDSEM
License
This software is released under the GPLv3 license.