Thursday, February 9, 2023

SWMM 5.2 App Python Code for the Index

 

This code is a Python interface to the SWMM5 hydrology and hydraulic simulation software. It uses the ctypes library to interface with the SWMM5 library, which is either a shared library file on Linux systems (libswmm5.so) or a dynamic-link library file on Windows systems (swmm5.dll). The code provides several functions to run and control the SWMM5 simulation, such as run, open, step, end, close, and report. It also provides functions to retrieve information from the simulation, such as getMassBalErr, getWarnings, getError, getValue, getSavedValue, and decodeDate. Additionally, the code includes several constants that are used to specify the type of objects and properties in the simulation.


Index NameInteger ValueDescription
GAGE0
SUBCATCH1
NODE2
LINK3
SYSTEM100
JUNCTION0
OUTFALL1
STORAGE2
DIVIDER3
CONDUIT0
PUMP1
ORIFICE2
WEIR3
OUTLET4
GAGE_RAINFALL100
SUBCATCH_AREA200
SUBCATCH_RAINGAGE201
SUBCATCH_RAINFALL202
SUBCATCH_EVAP203
SUBCATCH_INFIL204
SUBCATCH_RUNOFF205
SUBCATCH_RPTFLAG206
NODE_TYPE300
NODE_ELEV301
NODE_MAXDEPTH302
NODE_DEPTH303
NODE_HEAD304
NODE_VOLUME305
NODE_LATFLOW306
NODE_INFLOW307
NODE_OVERFLOW308
NODE_RPTFLAG309
LINK_TYPE400
LINK_NODE1401
LINK_NODE2402
LINK_LENGTH403
LINK_SLOPE404
LINK_FULLDEPTH405
LINK_FULLFLOW406
LINK_SETTING407
LINK_TIMEOPEN408
LINK_TIMECLOSED409
LINK_FLOW410
LINK_DEPTH411
LINK_VELOCITY412
LINK_TOPWIDTH413
LINK_RPTFLAG414
STARTDATE0
CURRENTDATE1
ELAPSEDTIME2
ROUTESTEP3
MAXROUTESTEP4
REPORTSTEP5
TOTALSTEPS6
NOREPORT7
FLOWUNITS8
CFS0
GPM1
MGD2
CMS3
LPS4
MLD5

No comments:

The Goal of SWMM5 Input Files

 🌟 SWMM5 (Storm Water Management Model 5) is a widely used urban hydrology and hydraulic modeling software developed by the United States E...