Skip to content

Commit 7d9d620

Browse files
authored
state relative change of entropy
1 parent 1e7be11 commit 7d9d620

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

docs/src/callbacks.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,13 @@ More on different options for plotting the analysis callback can be found in the
124124
![analysis callback](analysis_callback.png)
125125

126126
The plot shows that linear invariants such as the total water mass and total velocity are conserved exactly. However, nonlinear invariants such as the entropy may exhibit small growth over time (compared to the growth one would obtain from a standard spatial discretization that does not conserve these invariants).
127+
For example, in this case, we obtain
128+
129+
```@example callback
130+
integrals(analysis_callback).entropy[begin]
131+
```
132+
133+
Thus, a change of `0.005` of the entropy (the total energy) corresponds to a relative change of roughly $$10^{-6}$$.
127134
This occurs because standard time integration methods do not necessarily preserve nonlinear invariants, even when the spatial discretization is conservative.
128135

129136
For a fully discrete entropy-conservative method, see also the following section about relaxation and the [`RelaxationCallback`](@ref).

0 commit comments

Comments
 (0)