本文整理匯總了Python中anuga.shallow_water.shallow_water_domain.Domain.volumetric_balance_statistics方法的典型用法代碼示例。如果您正苦於以下問題:Python Domain.volumetric_balance_statistics方法的具體用法?Python Domain.volumetric_balance_statistics怎麽用?Python Domain.volumetric_balance_statistics使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類anuga.shallow_water.shallow_water_domain.Domain
的用法示例。
在下文中一共展示了Domain.volumetric_balance_statistics方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: Time_boundary
# 需要導入模塊: from anuga.shallow_water.shallow_water_domain import Domain [as 別名]
# 或者: from anuga.shallow_water.shallow_water_domain.Domain import volumetric_balance_statistics [as 別名]
#Btus = Time_boundary(domain, lambda t: [0.0+ 1.025*(1+num.sin(2*pi*(t-4)/10)), 0.0, 0.0])
#Btds = Time_boundary(domain, lambda t: [0.0+ 0.0075*(1+num.sin(2*pi*(t-4)/20)), 0.0, 0.0])
Btus = anuga.Dirichlet_boundary([20.0, 0, 0]) # Outflow water at 20
Btds = anuga.Dirichlet_boundary([19.0, 0, 0]) # Outflow water at 19
domain.set_boundary({'left': Btus, 'right': Br, 'top': Br, 'bottom': Br})
#------------------------------------------------------------------------------
# Evolve system through time
#------------------------------------------------------------------------------
for t in domain.evolve(yieldstep = 1, finaltime = 100):
print domain.timestepping_statistics()
print domain.volumetric_balance_statistics()
for i, culvert in enumerate(culverts):
print 'culvert: ', i
print culvert.timestepping_statistics()
"""
#import sys; sys.exit()
# Profiling code
import time
t0 = time.time()
s = 'for t in domain.evolve(yieldstep = 0.1, finaltime = 300): domain.write_time()'
import profile, pstats