<jupyter_start><jupyter_text>Dalga Dalga kavramlarıT: Dalga periyodu (sn)f: Dalga frekansı (Hz)Dalga boyu: $ \lambda=\Large\frac{gT^{2}}{2\pi}$Dalga yüksekliği: $ H=2 \zeta$Dalga periyodu: $ T=\Large\sqrt{\frac{2\pi\lambda}{g}}=\Large\frac{1}{f}$Dalga hızı: $ C=\Large\frac{\lambda}{T}=\Large\frac{gT}{2\pi}$Dalga sayısı: $ k=\Large\frac{2\pi}{\lambda}=\Large\frac{\omega^{2}}{g}$<jupyter_code>import math
import numpy as np
from math import pi
from scipy.constants import g
import matplotlib.pyplot as plt

def dalgaBoyu(T):
    Lambda = (g*(np.power(T,2))/(2*pi))
    return(Lambda)

x = np.linspace(0,20)
y = dalgaBoyu(l)

plt.plot(x,y)
plt.xlabel('Periyot (sn)')
plt.ylabel('Dalga boyu (m)')
plt.title("Dalga periyodu-dalga boyu fonksiyonu")
plt.show()
import math
import numpy as np
from math import pi
from scipy.constants import g
import matplotlib.pyplot as plt

def dalga(dalga_yuksekligi,dalga_sayisi,x,omega,t):
    # dalga_genligi [m]
    # dalga_sayisi [rad/m]
    # x [m]
    # omega [rad/s]
    # t [s]
    
    dalga_genligi = dalga_yuksekligi/2
    zeta = dalga_genligi*np.cos(dalga_sayisi*x-omega*t)
    return(zeta)

x = np.linspace(0,100)
y = dalga(5,4,0,10,x)

plt.plot(x,y,'o-')
plt.xlabel('Süre (sn)')
plt.ylabel('Yüzey seviyesi (m)')
plt.title("Dalga periyodu-dalga boyu fonksiyonu")
plt.show()<jupyter_output><empty_output><jupyter_text>Dalga spektrumlarıDalga spektrumları fiziksel gerçekliğin idealize edilmiş halidir. Gemi ve deniz yapılarının hidrodinamik analizinde sıklıkla kullandığımız spektrumlar;- Pierson-Moskowitz- JONSWAP- Bretschneider- ISSC- Ochi-Hubble$S_{\zeta}(\omega)=\Large\frac{A}{\omega^{5}}\exp\Bigl(\frac{B}{\omega^{4}}\Bigr)$$ A = 0.0081g^{2}$$ B = 0.032\Large\frac{g^{2}}{H_{s}^{2}}$<jupyter_code>import math
import numpy as np
from math import pi
from scipy.constants import g
import matplotlib.pyplot as plt

def spektrumPM(omega,Hs):
    A = 0.0081*g**2
    B = 0.032*(g**2/Hs**2)
    S = (A/np.power(omega,5))*np.exp(-B/np.power(omega,4))
    return(S)

x = np.linspace(0.1,2)
y = spektrumPM(x,3)

plt.plot(x,y)
plt.xlabel('Frekans (Hz)')
plt.ylabel('Spektral yoğunluk (m)')
plt.title("Pierson-Moskowitz spektrumu")
plt.show()
import math
import numpy as np
from math import pi
from scipy.constants import g
import matplotlib.pyplot as plt

def spektrumPM(omega,Hs):
    A = 0.0081*g**2
    B = 0.032*(g**2/Hs**2)
    S = (A/np.power(omega,5))*np.exp(-B/np.power(omega,4))
    return(S)

x = np.linspace(0.1,2,100)
y3 = spektrumPM(x,3)
y4 = spektrumPM(x,4)
y5 = spektrumPM(x,5)
y6 = spektrumPM(x,6)

x_ = [x[np.argmax(y3)],x[np.argmax(y4)],x[np.argmax(y5)],x[np.argmax(y6)]]
y_ = [max(y3),max(y4),max(y5),max(y6)]

plt.plot(x,y3,x,y4,x,y5,x,y6)
plt.plot(x_,y_,'o-')
plt.legend(['Hs=3m','Hs=4m','Hs=5m','Hs=6m'])
plt.xlabel('Frekans (Hz)')
plt.ylabel('Spektral yoğunluk (m2s)')
plt.title("Pierson-Moskowitz spektrumu")
plt.show()<jupyter_output><empty_output><jupyter_text>JONSWAP Spektrum (1973)<jupyter_code>import math
import numpy as np
from math import pi
from scipy.constants import g
import matplotlib.pyplot as plt

def spektrumJONSWAP(U10,Fetch,omega):
    #U10 [m/s]
    #Fetch [m]
    S = []
    A = 0.076*math.pow(U10**2/(Fetch*g),0.22)
    omegaP = 22*math.pow(g**2/(U10*Fetch),1/3)
    for w in omega:
        if w <= omegaP:
            sigma = 0.07
        else:
            sigma = 0.09
        r = math.exp(-1*math.pow(w-omegaP,2)/(2*sigma**2*omegaP**2))
        S_ = ((A*g**2)/math.pow(w,5))*np.exp(-1.25*math.pow(omegaP/w,4))*math.pow(3.3,r)
        S.append(S_)
    return(S)

x = np.linspace(0.1,2,100)
y100 = spektrumJONSWAP(15,100000,x)
y200 = spektrumJONSWAP(15,200000,x)
y300 = spektrumJONSWAP(15,300000,x)
y400 = spektrumJONSWAP(15,400000,x)

x_ = [x[np.argmax(y100)],x[np.argmax(y200)],x[np.argmax(y300)],x[np.argmax(y400)]]
y_ = [max(y100),max(y200),max(y300),max(y400)]

plt.plot(x,y100,x,y200,x,y300,x,y400)
plt.plot(x_,y_,'o-')
plt.legend(['Fetch=100 km','Fetch=200 km','Fetch=300 km','Fetch=400 km'])
plt.xlabel('Frekans (Hz)')
plt.ylabel('Spektral yoğunluk (m2s)')
plt.title("JONSWAP spektrumu")
plt.show()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.19422890397672163, 'fraction_numerical': 0.05892337536372454, 'mean_word_length': 4.9352517985611515, 'pattern_counts': {'":': 0, '<': 14, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '343674', 'license': 'Unlicense', 'n_tokens_mistral': 2113, 'n_tokens_neox': 1964, 'n_words': 300, 'path': 'notes/dalga.ipynb', 'repo_name': 'sariogluba/hidrodinamik', 'size': '4124'}