Skip to content

Commit

Permalink
Merge pull request #26 from openearth/wave_function_fix
Browse files Browse the repository at this point in the history
wave_celerity fix #25
  • Loading branch information
MarliesA authored Apr 24, 2024
2 parents 5db1161 + 7356341 commit 4162538
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions xbTools/general/wave_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ def wavecelerity(Tp, d, g=9.81):
'''

k = dispersion(2*np.pi/Tp, d, g)
n = 0.5 * (1 + 2 * k * d * np.sinh(2 * k * d))
k = dispersion(2*np.pi/Tp, d, max_error = 0.0001, g = g)
n = 0.5 * (1 + 2 * k * d / np.sinh(2 * k * d))
c = g * Tp/(2 * np.pi) * np.tanh(k * d)
cg = n * c
return cg, n
Expand Down

0 comments on commit 4162538

Please sign in to comment.