本文整理汇总了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