Skip to content

Commit 8c180a8

Browse files
committed
add warning for eta0 == 0.0 in BBM equation
1 parent fa7ae38 commit 8c180a8

File tree

3 files changed

+2
-2
lines changed

3 files changed

+2
-2
lines changed

docs/src/dispersion.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ anim = @animate for step in eachindex(sol.u)
117117
index = argmin(abs.(DispersiveShallowWater.grid(semi) .- x_t_sk))
118118
scatter([x_t_euler], [initial_condition_traveling_wave(x_t_euler, t, euler, mesh)],
119119
color = :blue, label = nothing)
120-
eta, _ = sol.u[step].x
120+
eta, = sol.u[step].x
121121
scatter!([x_t_sk], [eta[index]],
122122
color = :green, label = nothing)
123123
plot!(semi => sol, plot_initial = true, plot_bathymetry = false,

src/dispersion_relation.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ function (disp_rel::LinearDispersionRelation)(equations::EulerEquations1D, k)
6969
return sqrt(g * k * tanh(h0 * k))
7070
end
7171

72-
# TODO: Factor of 5/2 in front?
7372
function (disp_rel::LinearDispersionRelation)(equations::BBMEquation1D, k)
7473
h0 = disp_rel.ref_height
7574
g = gravity_constant(equations)

src/equations/bbm_1d.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ struct BBMEquation1D{RealT <: Real} <: AbstractBBMEquation{1, 1}
4949
end
5050

5151
function BBMEquation1D(; gravity_constant, D = 1.0, eta0 = 0.0, split_form = true)
52+
eta0 == 0.0 || @warn "The still-water surface needs to be 0 for the BBM equations"
5253
BBMEquation1D(gravity_constant, D, eta0, split_form)
5354
end
5455

0 commit comments

Comments
 (0)