python调用swmm程序_Python SWMM5包_程序模块 - PyPI - Python中文网

用法:New Interface:应该始终使用新接口。旧接口(如下)只为向后兼容而保留。新界面的主要功能是More pythonic interface

A number of convenience functions

导入新接口并运行swmm>>> from swmm5.swmm5tools import SWMM5Simulation

>>> st=SWMM5Simulation("swmm5/examples/simple/swmm5Example.inp")Example 1:Retrive simulation properties.>>> st.SWMM5_Version() # Version of underlying SWMM5 engine.

'5.1.000'

>>> st.SWMM5_VERSION # same thing as an integer

51000

>>> st.Flow_Units() # Flow units.

'LPS'

>>> st.SWMM_FlowUnits # returns flow units as an index. 0 = CFS, 1 = GPM, 2 = MGD, 3 = CMS, 4 = LPS, and 5 = LPD

4

>>> st.SWMM_Nperiods # number of reporting periods

360

>>> st.SWMM_Nsubcatch # number of subcatchments

6

>>> st.SWMM_Nnodes # number of drainage system nodes

12

>>> st.SWMM_Nlinks # number of drainage system links

11

>>> st.SWMM_Npolluts # number of pollutants tracked

0

>>> print ("%.2f"%st.SWMM_StartDate) # start date of simulation

40844.00

>>> st.SWMM_ReportStep

60

>>>Example 2:Prints available entities>>> st.entityList()

['SUBCATCH', 'NODE', 'LINK', 'SYS']

>>> st.Subcatch()

['A2', 'A1', 'A3', 'A4', 'A5', 'E1']

>>> st.Node()

['J1', 'J2', 'J3', 'J4', 'J5', 'J6', '

  • 0
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值