本文整理匯總了Python中gnome.environment.Waves.dissipative_wave_energy方法的典型用法代碼示例。如果您正苦於以下問題:Python Waves.dissipative_wave_energy方法的具體用法?Python Waves.dissipative_wave_energy怎麽用?Python Waves.dissipative_wave_energy使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類gnome.environment.Waves
的用法示例。
在下文中一共展示了Waves.dissipative_wave_energy方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: test_wave_energy
# 需要導入模塊: from gnome.environment import Waves [as 別名]
# 或者: from gnome.environment.Waves import dissipative_wave_energy [as 別名]
def test_wave_energy(H, expected):
"""
Test the dissipative wave energy
"""
print "testing for H:", H
water = copy(default_water)
water.fetch = 1e4 # 10km
w = Waves(test_wind_5, water) # 10km fetch
De = w.dissipative_wave_energy(H)
print De
# Note: Right now we are just documenting the results that we are
# getting. The expected values need to be checked for validity.
assert np.isclose(De, expected, rtol=0.01)