MakeWaves time series generation

Looking for random waves that would over-extend piston


In [6]:
import numpy as np
import matplotlib.pyplot as plt
%matplotlib inline
import makewaves
from makewaves import wavetsgen
from makewaves import wavemakerlimits as wml 
import pandas as pd

w = wavetsgen.Wave("JONSWAP")

heights = np.linspace(0.1, 0.4, num=8)
periods = np.linspace(0.5, 5.0, num=8)
max_stroke = pd.DataFrame(columns=periods, index=heights)
max_stroke.index.name = "wave height"
max_stroke.columns.name = "wave period"

for h in heights:
    for p in periods:
        w.sig_height = h
        w.sig_period = p
        w.gen_ts_stroke()
        max_stroke[p][h] = w.ts_stroke.max()
        
max_stroke[max_stroke < wml.max_halfstroke]


Out[6]:
wave period 0.5 1.14285714286 1.78571428571 2.42857142857 3.07142857143 3.71428571429 4.35714285714 5.0
wave height
0.100000 0.03025619 0.0316957 0.0343945 0.05148759 0.06968643 0.07650559 0.05009272 0.03266602
0.142857 0.04479137 0.03925396 0.04954043 0.08091665 0.09661688 0.1030433 0.07715946 0.04844338
0.185714 0.04762482 0.05346754 0.0691836 0.07686355 0.1235671 0.1401515 0.0854992 0.06749225
0.228571 0.0679515 0.06721397 0.08444479 0.150779 0.1437829 NaN 0.1160233 0.08005322
0.271429 0.08228077 0.08367989 0.0992025 0.1253035 NaN NaN 0.1104088 0.101169
0.314286 0.09980684 0.09475829 0.1455177 NaN NaN NaN 0.1324717 0.1068629
0.357143 0.09522418 0.1139122 0.1556816 NaN NaN NaN NaN 0.1442765
0.400000 0.1290719 0.1108672 0.1408628 NaN NaN NaN NaN 0.1468576

8 rows × 8 columns


In [ ]: