diff --git a/docs/src/overview.md b/docs/src/overview.md index b81cd0c0..2966d83a 100644 --- a/docs/src/overview.md +++ b/docs/src/overview.md @@ -33,6 +33,18 @@ Several equation systems in [DispersiveShallowWater.jl](https://github.com/Numer The common interface provides shared functionality like [`waterheight`](@ref), [`velocity`](@ref), [`energy_total`](@ref), and [`entropy`](@ref). This enables consistent analysis and visualization across different dispersive models while maintaining the underlying shallow water physics. +!!! warning "Entropy vs. Energy" + [DispersiveShallowWater.jl](https://github.com/NumericalMathematics/DispersiveShallowWater.jl) + is written by mathematicians with a background in numerical methods for + hyperbolic balance laws. Therefore, the term *entropy* is often used + in the sense of a mathematical entropy function, i.e., typically a + convex function that is conserved by smooth solutions and whose dissipation + provides useful bounds and estimates. For the classical shallow water + equations, the mathematical entropy is the same as the physical energy + (see [`energy_total`](@ref) and [`entropy`](@ref)). However, some dispersive + models like the [`SerreGreenNaghdiEquations1D`](@ref) do not conserve + the [`energy_total`](@ref) but a modified form [`energy_total_modified`](@ref). + ## Hyperbolic Approximations Some equations are hyperbolic approximations of other systems (e.g., [`HyperbolicSerreGreenNaghdiEquations1D`](@ref) approximates [`SerreGreenNaghdiEquations1D`](@ref)). These systems support two approaches for initial conditions: diff --git a/src/equations/equations.jl b/src/equations/equations.jl index 82b85e58..cebe699f 100644 --- a/src/equations/equations.jl +++ b/src/equations/equations.jl @@ -294,7 +294,7 @@ varnames(::typeof(energy_total), equations) = ("e_total",) """ entropy(q, equations) -Return the entropy ``U`` of the primitive variables `q` for a given set of +Return the mathematical entropy ``U`` of the primitive variables `q` for a given set of `equations`. For all [`AbstractShallowWaterEquations`](@ref), the `entropy` is just the [`energy_total`](@ref). diff --git a/src/equations/kdv_1d.jl b/src/equations/kdv_1d.jl index 301fd9f4..bb9e6ca3 100644 --- a/src/equations/kdv_1d.jl +++ b/src/equations/kdv_1d.jl @@ -299,7 +299,7 @@ end """ entropy(q, equations::KdVEquation1D) -Return the entropy ``U`` of the primitive variables `q` for the [`KdVEquation1D`](@ref). +Return the mathematical entropy ``U`` of the primitive variables `q` for the [`KdVEquation1D`](@ref). For the KdV equation, the `entropy` is the same as the [`energy_total`](@ref). `q` is a vector of the primitive variables at a single node, i.e., a vector