From de46bbd6a2edcd9ad32c1b18a5f1964a9747c509 Mon Sep 17 00:00:00 2001 From: Chris Leaman Date: Tue, 13 Nov 2018 15:32:25 +1100 Subject: [PATCH] Add runup_models.py Started with Stockdon 2006, but will probably need to add more. --- src/analysis/runup_models.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 src/analysis/runup_models.py diff --git a/src/analysis/runup_models.py b/src/analysis/runup_models.py new file mode 100644 index 0000000..403768c --- /dev/null +++ b/src/analysis/runup_models.py @@ -0,0 +1,23 @@ +import numpy as np + +def stockdon06(Hs0, Tp, beta): + + Lp = 9.8 * Tp ** 2 / 2 / np.pi + + S_ig = 0.06 * np.sqrt(Hs0 * Lp) + S_inc = 0.75 * beta * np.sqrt(Hs0 * Lp) + + # Dissipative conditions + if beta / (Hs0/Lp)**(0.5) <= 0.3: + setup = 0.016 * (Hs0 * Lp) ** 0.5 + S_total = 0.046 * (Hs0 * Lp) ** 0.5 + R2 = 0.043 * (Hs0 * Lp) ** 0.5 + else: + setup = 0.35 * beta * (Hs0 * Lp) ** 0.5 + S_total = np.sqrt(S_inc ** 2 + S_ig **2) + R2 = 1.1 * (setup + S_total / 2) + + return R2, setup, S_total, S_inc, S_ig + +if __name__ == '__main__': + pass