From d4cfb82f287fd0892d8dfc121c1edb9157ed3e45 Mon Sep 17 00:00:00 2001 From: patrickersing Date: Thu, 28 Mar 2024 09:55:44 +0100 Subject: [PATCH] add comment for energy_total --- src/equations/shallow_water_multilayer_1d.jl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/equations/shallow_water_multilayer_1d.jl b/src/equations/shallow_water_multilayer_1d.jl index 69834f4..0dec78a 100644 --- a/src/equations/shallow_water_multilayer_1d.jl +++ b/src/equations/shallow_water_multilayer_1d.jl @@ -502,7 +502,9 @@ end energy_total(u, equations) end -# Calculate total energy for a conservative state `u` +# Calculate total energy for a conservative state `u`. +# The total energy is composed of the kinetic energy, the hydrostatic pressure and the potential +# energy from the bottom topography and the layer interfaces. @inline function Trixi.energy_total(u, equations::ShallowWaterMultiLayerEquations1D) h = waterheight(u, equations) v = velocity(u, equations)