Пример #1
0
    def energy_dissipation_rate(self, H, U):
        '''
        c_ub = 100 = dimensionless empirical coefficient to correct
        for non-Law-of-the-Wall results (Umlauf and Burchard, 2003)

        u_c = water friction velocity (m/s)
               sqrt(rho_air / rho_w) * u_a ~ .03 * u_a
        u_a = air friction velocity (m/s)
        z_0 = surface roughness (m) (Taylor and Yelland)
        c_p = peak wave speed for Pierson-Moskowitz spectrum
        w_p = peak angular frequency for Pierson-Moskowitz spectrum (1/s)

        TODO: This implementation should be in a utility function.
              It should not be part of the Waves management object itself.
        '''
        if H is 0 or U is 0:
            return 0

        c_ub = 100

        c_p = PiersonMoskowitz.peak_wave_speed(U)
        w_p = PiersonMoskowitz.peak_angular_frequency(U)

        z_0 = 1200 * H * ((H / (2*np.pi*c_p)) * w_p)**4.5
        u_a = .4 * U / np.log(10 / z_0)
        u_c = .03 * u_a
        eps = c_ub * u_c**3 / H

        return eps
Пример #2
0
    def percent_whitecap_coverage(cls, wind_speed):
        '''
            percent whitecap coverage
            drag coefficient reduces linearly with wind speed
            for winds less than 2.4 m/s
        '''

        if wind_speed is 0:
            return 0

        if wind_speed > 2.4:
            C_D = .0008 + .000065 * wind_speed
        else:
            C_D = (.0008 + 2.4 * .000065) * wind_speed / 2.4

        visc_air = 1.5 * 10**(-5)  # m2/s
        peak_ang_freq = PiersonMoskowitz.peak_angular_frequency(wind_speed)
        R_Bw = C_D * wind_speed**2 / (visc_air * peak_ang_freq)
        Wc = 3.88 * 10**(-5) * R_Bw**(1.09)

        return Wc