outfall_rockdesign.py 文件源码

python
阅读 45 收藏 0 点赞 0 评论 0

项目:Outfall-Rock-Protection-Design-Tool 作者: FranciscoChaves90 项目源码 文件源码
def __init__(self,Hs,d,slope):
        Hs = float(Hs)
        d = float(d)
        slope = float(slope)
        battjes = genfromtxt("battjes.csv",delimiter=',') #import table with normalized wave heights from Battjes&Groenendijk 2000, Wave height distribution on shallow foreshores
        if Hs/d >= 0.78:
            self.Hs = 0.78*d
        else:
            self.Htr = (0.35+5.8*1/slope)*d
            # Hrms equation .59 The Rock Manual (page 359)
            self.Hrms = (0.6725 + 0.2025*(Hs/d))*Hs
            # calculate the normalised Htr
            HtrNorm = self.Htr / self.Hrms
            #find nearest to self.Htr in column 1 of Battjes. Choose the value immediately next to it.
            index = int(HtrNorm / 0.05) + 1
            if index > 60:
                index = 60
            #extract the relevant wave heights from Battjes table.
            self.Hs = battjes[index,3] * self.Hrms
            self.H2Percent = battjes[index,5] * self.Hrms
            self.H1Percent = battjes[index,6] * self.Hrms
            self.Hmax = battjes[index,7] * self.Hrms
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号