Skip to content

Commit

Permalink
a bit more clarifying comments about energy_total_modified
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaLampert committed Sep 11, 2024
1 parent e34aa54 commit 931072a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/equations/bbm_1d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ The BBM equation is first described in Benjamin, Bona, and Mahony (1972).
The semidiscretization implemented here is developed in Ranocha, Mitsotakis, and Ketcheson (2020).
It conserves
- the total water mass (integral of ``h``) as a linear invariant
- the total modified energy
- a quadratic invariant (integral of ``\eta^2 + \eta_x^2``), which is called here [`energy_total_modified`](@ref)
(and [`entropy_modified`](@ref)) because it contains derivatives of the solution
for periodic boundary conditions.
Expand Down
6 changes: 5 additions & 1 deletion src/equations/equations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,11 @@ contain additional terms compared to the usual [`energy_total`](@ref).
For example, for the [`SvaerdKalischEquations1D`](@ref) and the
[`SerreGreenNaghdiEquations1D`](@ref), it contains additional terms
depending on the derivative of the velocity ``v_x`` modeling non-hydrostatic
contributions.
contributions. For equations, which are not `AbstractShallowWaterEquations`,
the modified total energy does not have to be an extension of the usual
[`energy_total`](@ref) and does not have to be related to a physical energy.
However, it is still a conserved quantity and contains derivatives of the
solution.
`q_global` is a vector of the primitive variables at ALL nodes.
`cache` needs to hold the SBP operators used by the `solver` if non-hydrostatic
Expand Down

0 comments on commit 931072a

Please sign in to comment.