Skip to content

Commit

Permalink
remove unnecessary error
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaLampert committed Nov 13, 2023
1 parent 0c544cb commit 6511399
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
8 changes: 3 additions & 5 deletions src/equations/bbm_bbm_variable_bathymetry_1d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ end
The initial condition that uses the dispersion relation of the Euler equations
to approximate waves generated by a wave maker as it is done by experiments of
Dingemans. The topography is a trapesoidal.
Dingemans. The topography is a trapezoidal.
References:
- Magnus Svärd, Henrik Kalisch (2023)
Expand All @@ -84,16 +84,14 @@ function initial_condition_dingemans(x, t, equations::BBMBBMVariableEquations1D,
h = A * cos(k * x)
end
v = sqrt(equations.gravity / k * tanh(k * eta0)) * h / eta0
if x < 11.01 || x >= 33.07
b = 0.0
elseif 11.01 <= x && x < 23.04
if 11.01 <= x && x < 23.04
b = 0.6 * (x - 11.01) / (23.04 - 11.01)
elseif 23.04 <= x && x < 27.04
b = 0.6
elseif 27.04 <= x && x < 33.07
b = 0.6 * (33.07 - x) / (33.07 - 27.04)
else
error("should not happen")
b = 0.0
end
eta = h + eta0
D = -b
Expand Down
8 changes: 3 additions & 5 deletions src/equations/svaerd_kalisch_1d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ varnames(::typeof(prim2cons), ::SvaerdKalischEquations1D) = ("h", "hv", "b")
The initial condition that uses the dispersion relation of the Euler equations
to approximate waves generated by a wave maker as it is done by experiments of
Dingemans. The topography is a trapesoidal. It is assumed that `equations.eta0 = 0.8`.
Dingemans. The topography is a trapezoidal. It is assumed that `equations.eta0 = 0.8`.
References:
- Magnus Svärd, Henrik Kalisch (2023)
Expand All @@ -70,16 +70,14 @@ function initial_condition_dingemans(x, t, equations::SvaerdKalischEquations1D,
h = A * cos(k * x)
end
v = sqrt(equations.gravity / k * tanh(k * eta0)) * h / eta0
if x < 11.01 || x >= 33.07
b = 0.0
elseif 11.01 <= x && x < 23.04
if 11.01 <= x && x < 23.04
b = 0.6 * (x - 11.01) / (23.04 - 11.01)
elseif 23.04 <= x && x < 27.04
b = 0.6
elseif 27.04 <= x && x < 33.07
b = 0.6 * (33.07 - x) / (33.07 - 27.04)
else
error("should not happen")
b = 0.0
end
eta = h + eta0
D = -b
Expand Down

0 comments on commit 6511399

Please sign in to comment.