OpenSWMM Engine  6.0.0-alpha.4
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.4)
Loading...
Searching...
No Matches
openswmm Namespace Reference

Namespaces

namespace  climate
 
namespace  components
 
namespace  constants
 
namespace  controls
 
namespace  culvert
 
namespace  datetime
 
namespace  detail
 
namespace  divider
 
namespace  dynwave
 
namespace  edit
 
namespace  exfil
 
namespace  fastmath
 
namespace  findroot
 
namespace  forcemain
 
namespace  fv
 
namespace  gage
 Rain records, accepted runoff-clock state and read-only report lookups. Context routines require aligned initialized gage/subcatchment arrays, valid project units and ordered finite table x/y pairs unless stated otherwise. State mutations are immediate; serialize updates with reads and use private copies for trials. Only precipitation splits convert rates to internal ft/s.
 
namespace  gpkg
 
namespace  groundwater
 
namespace  h5io
 
namespace  hydkernels
 
namespace  hydraulics
 
namespace  hydstruct
 
namespace  iface
 
namespace  infil
 Native infiltration kernels with caller-managed accepted-step state. These methods mutate the supplied state immediately and provide no rollback, finite-input validation or failure status. Call once per accepted source step, or evaluate a private state copy for a trial. Internal rates/depths are ft/s/ft; initialization alone accepts project input units. Serialize shared state use.
 
namespace  inflow
 
namespace  inlet
 
namespace  inp_writer
 
namespace  input
 
namespace  io
 
namespace  kinwave
 
namespace  landuse
 
namespace  lard
 
namespace  lid
 
namespace  lidnode
 
namespace  link
 
namespace  mathexpr
 
namespace  msxlid
 
namespace  msxsurf
 
namespace  native_model
 
namespace  node
 
namespace  nodecoupling2d
 
namespace  ode
 
namespace  outfall
 
namespace  perf
 
namespace  polygon
 
namespace  quality
 
namespace  rdii
 
namespace  rdii_iface
 
namespace  richards
 
namespace  roadway
 
namespace  runoff
 
namespace  runoff_iface
 
namespace  simd
 
namespace  snow
 
namespace  street
 
namespace  surface
 
namespace  surfacespecies
 
namespace  threadinfo
 
namespace  toposort
 
namespace  trace
 
namespace  transect
 
namespace  transport
 
namespace  treatment
 
namespace  twoD
 
namespace  ucf
 
namespace  xsect
 
namespace  xsect_batch
 
namespace  xsect_tables
 

Classes

struct  AquiferStore
 SoA storage for aquifer parameter sets. More...
 
struct  ArdConfigData
 Parsed model.ard state consumed by ArdEngine::init (phase E3). More...
 
struct  ArdTransportRow
 One raw [TRANSPORT_BOUNDARIES] or [TRANSPORT_SOURCES] row (E5a). More...
 
struct  BedZoneState
 Runtime bed state, one entry per LINK. More...
 
struct  BuildupData
 
class  BuiltinDefaultInputPluginInfo
 
class  BuiltinDefaultOutputPluginInfo
 
class  BuiltinDefaultReportPluginInfo
 
class  BuiltinDefaultStateIOPluginInfo
 
struct  ChannelSpeciesIncrement
 
struct  ChannelSpeciesRegion
 
struct  ChannelThermalIncrement
 
struct  ChannelThermalRegion
 
struct  CheckpointInspection
 
struct  CiEqual
 Transparent case-insensitive equality for unordered containers. More...
 
struct  CiHash
 Transparent case-insensitive hash (FNV-1a over the uppercase fold). More...
 
struct  CloudConfig
 [CLOUD_COVER] — one fraction driving two modules (H6a, D-H6a-2). More...
 
struct  ConductionConfig
 Vertical conduction between LID layers (plan §6.1 D-H5b, H5b). More...
 
struct  ConduitData
 Dense SoA for conduit-only properties (one row per CONDUIT link). More...
 
struct  ControlRuleStore
 
struct  CurveNumState
 
class  DefaultInputPlugin
 Default input plugin that reads/writes SWMM .inp files. More...
 
class  DefaultOutputPlugin
 Default output plugin: writes SWMM 5.x compatible binary .out file. More...
 
class  DefaultReportPlugin
 Default report plugin: writes SWMM 5.x compatible .rpt report file. More...
 
class  DefaultStateIOPlugin
 Default state-IO plugin: OpenSWMM binary + legacy SWMM5 hot-start. More...
 
struct  DiscoveredFilter
 A FileFilter paired with the plugin id and version that emitted it. More...
 
struct  DiscoveredPlugin
 A plugin grouped by id with all the roles and filters it advertises. More...
 
struct  DividerData
 Dense SoA for flow-divider properties (one row per DIVIDER node). More...
 
struct  DwfData
 Dry-weather-flow authoring rows stored in aligned columns. More...
 
struct  ExtInflowData
 External inflow authoring rows stored in aligned columns. More...
 
struct  FileFilter
 A file-format filter advertised by a plugin. More...
 
struct  FilePathPair
 Two-string carrier for any external file path that appears in a SWMM .inp file. More...
 
struct  FilesSpec
 
struct  ForcingData
 
struct  GageData
 Structure-of-Arrays storage for all rain gages. More...
 
struct  GageSnapshot
 Snapshot of rain gage state at an output time step. More...
 
struct  GreenAmptState
 
struct  HeatConfigData
 Parsed model.heat state (heat component, phase H1). More...
 
struct  HeatElement
 Which element a flux evaluator is being called for. More...
 
struct  HeatOverrideData
 Dense per-element attribute storage (PE2, D-PE2). More...
 
struct  HeatOverrideRow
 
struct  HeatState
 Runtime heat state shared by the engines (phase H1). More...
 
struct  HortonState
 
struct  HotStartFile
 In-memory hot start file data. More...
 
struct  HotStartHeader
 In-memory representation of the OPENSWMM_HS_V1 header. More...
 
struct  HotStartLidCellRecord
 Node hydraulic state at hot-start save time. More...
 
struct  HotStartLinkRecord
 Link hydraulic state at hot-start save time. More...
 
class  HotStartManager
 
struct  HotStartNodeRecord
 
struct  HotstartSaveEntry
 Configuration parsed from the [FILES] section. More...
 
struct  HotStartSubcatchRecord
 Subcatchment state at hot-start save time. More...
 
class  ICouplingPoint
 Abstract coupling point between a 1D SWMM object and a 2D mesh cell. More...
 
class  IInputPlugin
 Interface for input file reader/writer plugins. More...
 
struct  InitialQualityData
 
struct  InletStore
 
struct  InletUsageStore
 
class  IOThread
 Producer-consumer IO thread for writing simulation snapshots. More...
 
class  IOutputPlugin
 Interface for output-writing plugins. More...
 
class  IPluginComponentInfo
 Describes a plugin component: metadata, capabilities, and factory methods. More...
 
class  IReportPlugin
 Interface for report-writing plugins. More...
 
class  IStateIOPlugin
 Interface for state / hot-start IO plugins. More...
 
struct  LanduseData
 
struct  LegacySpeciesTrailer
 Static utility class for hot start file operations. More...
 
struct  LidControlStore
 SoA storage for LID control type definitions. More...
 
struct  LidLayerSpeciesState
 Per-(unit, layer, species) state for every LID unit in the model. More...
 
struct  LidLayerTreatment
 
struct  LidNodeCell
 
struct  LidNodeConfig
 
struct  LidNodeLayer
 
struct  LidNodeOutlet
 
struct  LidNodeState
 
struct  LidPortTransfer
 
struct  LidUsageStore
 SoA storage for LID usage assignments to subcatchments. More...
 
struct  LidWaterTransfer
 
struct  LinkData
 Structure-of-Arrays storage for all links. More...
 
struct  LinkSnapshot
 Snapshot of link state at an output time step. More...
 
struct  LinkSubtypes
 Owns the five link subtype side-tables plus the reverse index map. More...
 
struct  MsxSurfaceData
 Resolved MSX surface-quality parameters and state. More...
 
struct  MsxSurfaceRows
 Rows parked by the section handlers for names that are not pollutants. More...
 
class  NameIndex
 Bidirectional name↔index registry for SWMM objects. More...
 
struct  NodeCoupling2DRows
 Sparse [2D_NODE_COUPLING] rows (one per authored node). More...
 
struct  NodeData
 Structure-of-Arrays storage for all nodes. More...
 
struct  NodeSnapshot
 Snapshot of node state at an output time step. More...
 
struct  NodeSubtypes
 Owns the three node subtype side-tables plus the reverse index map. More...
 
struct  OrificeData
 
struct  OutfallData
 Dense SoA for outfall boundary-condition properties (one row per OUTFALL). More...
 
struct  OutletData
 
class  OutputReader
 Reads SWMM 5.x binary .out files produced by DefaultOutputPlugin. Reads use a shared mutable FILE cursor even on const methods: serialize all operations per reader, including refresh/close. Returns raw stored units; no endian/float-representation conversion or general corrupt-file hardening is provided. File counts/offsets must fit native allocation/long arithmetic. More...
 
struct  PatternData
 Time-pattern authoring names, types and multiplier vectors. More...
 
class  PluginFactory
 Manages plugin discovery, loading, and lifecycle for one engine instance. More...
 
struct  PluginSpec
 One plugin entry from the [PLUGINS] section. More...
 
struct  PollutantData
 Static properties for each pollutant species. More...
 
struct  ProcessComponentSpec
 One row of [PROCESS_COMPONENTS] (Unified Transport suite, D-UT8). More...
 
struct  PumpData
 
struct  RadiativeConfig
 [RADIATIVE_FLUXES] parameters (heat plan §2.2, phase H3). More...
 
struct  RDIIAssignData
 Node-to-hydrograph authoring assignments stored in aligned columns. More...
 
struct  RDIIDecayData
 Exponential IA-decay authoring rows keyed by group and response. More...
 
struct  RDIIDecayEntry
 
struct  ReactionData
 
struct  RegistrationInfo
 Registration information for plugin activation. More...
 
class  Router
 Top-level routing orchestrator. More...
 
struct  RxExprSpan
 Compiled expression = span into the shared pool. len 0 ⇒ no expression. More...
 
struct  RxToken
 
struct  SedimentConfig
 [SEDIMENT_EXCHANGE] — the bed zone's material and geometry. More...
 
struct  ShapeGroup
 SoA parameter block for all links of one cross-section shape. More...
 
struct  SimulationContext
 Central, reentrant simulation context. More...
 
struct  SimulationOptions
 All SWMM simulation options parsed from [OPTIONS] section. More...
 
struct  SimulationSnapshot
 Complete simulation state snapshot at one output time step. More...
 
struct  SnowpackStore
 SoA storage for snowpack parameter sets. More...
 
struct  SnowResultField
 
struct  SolarConfig
 [SOLAR_RADIATION] — site geometry and Bird atmosphere (H6a). More...
 
struct  SpatialFrame
 Spatial frame containing CRS and georeferenced coordinates. More...
 
class  SpeciesRegistry
 
struct  StateAccessors
 Solver-neutral hooks for reading and writing solver-internal state (infiltration, groundwater) at hot-start save/load time. More...
 
struct  StorageData
 Dense SoA for storage-unit properties (one row per STORAGE node). More...
 
struct  StreetStore
 
struct  SubcatchData
 Structure-of-Arrays storage for all subcatchments. More...
 
struct  SubcatchSnapshot
 Snapshot of subcatchment state at an output time step. More...
 
struct  Table
 
struct  TableBlock
 A single time series or rating curve. More...
 
struct  TableCursor
 Bidirectional cursor tracking the last accessed index in a Table. More...
 
struct  TableData
 SoA collection of all time series and curves in the model. More...
 
struct  TableValidation
 
struct  TransectStore
 
struct  TreatmentData
 
struct  UnitHydData
 Hydrograph parameter rows and independent group-to-gage assignments. More...
 
struct  UnitHydEntry
 
struct  UserFlagAssignment
 A (object_type, object_name, flag_name) → value assignment. More...
 
struct  UserFlagDef
 Schema entry for a single user-defined flag. More...
 
class  UserFlags
 Stores the full user-flags data: schema definitions + per-object values. More...
 
struct  WashoffData
 
struct  WaterAgeConfigData
 Parsed model.age state (waterage component, phase A1a). More...
 
struct  WaterAgeState
 
struct  WeirData
 
struct  WriteTask
 One item in the IOThread write queue. More...
 
class  XSectGroups
 Shape-grouped cross-section manager for batch computation. More...
 
struct  XSectParams
 Native cross-section geometry and borrowed optional normalized transect tables. More...
 

Typedefs

using UserFlagValue = std::variant<bool, int, double, std::string>
 A concrete flag value assigned to a specific object.
 
using NodeCoupling2DParams = std::array<double, kNodeCoupling2DKeys>
 
using PluginInfoFactory = IPluginComponentInfo* (*)()
 Typedef for the C factory function that plugin libraries must export.
 
using MeshSnowSnapshot = std::array<std::vector<double>, meshSnowFields.size()>
 

Enumerations

enum  ErrorCode : int {
  ERR_NONE = 0 ,
  ERR_MEMORY = 101 ,
  ERR_KINWAVE = 103 ,
  ERR_ODE_SOLVER = 105 ,
  ERR_TIMESTEP = 107 ,
  ERR_SUBCATCH_OUTLET = 108 ,
  ERR_AQUIFER_PARAMS = 109 ,
  ERR_GROUND_ELEV = 110 ,
  ERR_LENGTH = 111 ,
  ERR_ELEV_DROP = 112 ,
  ERR_ROUGHNESS = 113 ,
  ERR_BARRELS = 114 ,
  ERR_SLOPE = 115 ,
  ERR_NO_XSECT = 117 ,
  ERR_XSECT = 119 ,
  ERR_NO_CURVE = 121 ,
  ERR_PUMP_LIMITS = 122 ,
  ERR_LOOP = 131 ,
  ERR_MULTI_OUTLET = 133 ,
  ERR_DUMMY_LINK = 134 ,
  ERR_DIVIDER = 135 ,
  ERR_DIVIDER_LINK = 136 ,
  ERR_WEIR_DIVIDER = 137 ,
  ERR_NODE_DEPTH = 138 ,
  ERR_REGULATOR = 139 ,
  ERR_STORAGE_VOLUME = 140 ,
  ERR_OUTFALL = 141 ,
  ERR_REGULATOR_SHAPE = 143 ,
  ERR_NO_OUTLETS = 145 ,
  ERR_UNITHYD_TIMES = 151 ,
  ERR_UNITHYD_RATIOS = 153 ,
  ERR_RDII_AREA = 155 ,
  ERR_RAIN_FILE_CONFLICT = 156 ,
  ERR_RAIN_GAGE_FORMAT = 157 ,
  ERR_RAIN_GAGE_TSERIES = 158 ,
  ERR_RAIN_GAGE_INTERVAL ,
  ERR_CYCLIC_TREATMENT = 161 ,
  ERR_CURVE_SEQUENCE = 171 ,
  ERR_TIMESERIES_SEQUENCE = 173 ,
  ERR_SNOWMELT_PARAMS = 181 ,
  ERR_SNOWPACK_PARAMS = 182 ,
  ERR_LID_TYPE = 183 ,
  ERR_LID_LAYER = 184 ,
  ERR_LID_PARAMS = 185 ,
  ERR_LID_AREAS = 187 ,
  ERR_LID_CAPTURE_AREA ,
  ERR_START_DATE = 191 ,
  ERR_REPORT_DATE = 193 ,
  ERR_REPORT_STEP = 195 ,
  ERR_INPUT = 200 ,
  ERR_INPUT_LINE = 201 ,
  ERR_ITEMS = 203 ,
  ERR_KEYWORD = 205 ,
  ERR_DUP_NAME = 207 ,
  ERR_NAME = 209 ,
  ERR_NUMBER = 211 ,
  ERR_DATETIME = 213 ,
  ERR_CONTROL_RULE = 217 ,
  ERR_TRANSECT_UNKNOWN = 219 ,
  ERR_TRANSECT_SEQUENCE = 221 ,
  ERR_TRANSECT_TOO_FEW = 223 ,
  ERR_TRANSECT_TOO_MANY = 225 ,
  ERR_TRANSECT_MANNING = 227 ,
  ERR_TRANSECT_OVERBANK = 229 ,
  ERR_TRANSECT_NO_DEPTH = 231 ,
  ERR_MATH_EXPR = 233 ,
  ERR_INFILTRATION = 235 ,
  ERR_FILE_NAME = 301 ,
  ERR_INP_FILE = 303 ,
  ERR_RPT_FILE = 305 ,
  ERR_OUT_FILE = 307 ,
  ERR_OUT_SIZE = 308 ,
  ERR_OUT_WRITE = 309 ,
  ERR_OUT_READ = 311 ,
  ERR_RAIN_IFACE_SCRATCH = 313 ,
  ERR_RAIN_IFACE = 315 ,
  ERR_RAIN_FILE_OPEN = 317 ,
  ERR_RAIN_FILE_SEQUENCE = 318 ,
  ERR_RAIN_FILE_FORMAT = 319 ,
  ERR_RAIN_IFACE_FORMAT = 320 ,
  ERR_RAIN_IFACE_GAGE = 321 ,
  ERR_RUNOFF_IFACE = 323 ,
  ERR_RUNOFF_IFACE_COMPAT = 325 ,
  ERR_RUNOFF_IFACE_EOF = 327 ,
  ERR_RUNOFF_IFACE_READ = 329 ,
  ERR_HOTSTART_FILE = 331 ,
  ERR_HOTSTART_COMPAT = 333 ,
  ERR_HOTSTART_READ = 335 ,
  ERR_NO_CLIMATE_FILE = 336 ,
  ERR_CLIMATE_FILE_OPEN = 337 ,
  ERR_CLIMATE_FILE_READ = 338 ,
  ERR_CLIMATE_FILE_EOF = 339 ,
  ERR_RDII_IFACE_SCRATCH = 341 ,
  ERR_RDII_IFACE = 343 ,
  ERR_RDII_IFACE_FORMAT = 345 ,
  ERR_ROUTING_IFACE = 351 ,
  ERR_ROUTING_IFACE_FORMAT = 353 ,
  ERR_ROUTING_IFACE_NAMES = 355 ,
  ERR_ROUTING_IFACE_SAME = 357 ,
  ERR_TABLE_FILE_OPEN = 361 ,
  ERR_TABLE_FILE_READ = 363 ,
  ERR_SYSTEM = 500 ,
  ERR_API_NOT_OPENED = 501 ,
  ERR_API_NOT_STARTED = 502 ,
  ERR_API_NOT_ENDED = 503 ,
  ERR_API_OBJECT_TYPE = 504 ,
  ERR_API_OBJECT_INDEX = 505 ,
  ERR_API_OBJECT_NAME = 506 ,
  ERR_API_PROPERTY_TYPE = 507 ,
  ERR_API_PROPERTY_VALUE = 508 ,
  ERR_API_TIME_PERIOD = 509 ,
  ERR_TIMESERIES_EMPTY = 601 ,
  ERR_TIMESERIES_NAN = 603 ,
  ERR_TABLE_COL_MISMATCH = 605 ,
  ERR_GAGE_TSERIES_NOTFOUND = 607 ,
  ERR_VJ_LINK_COUNT = 609 ,
  ERR_VJ_XSECT_MISMATCH ,
  ERR_VJ_OFFSET = 613 ,
  ERR_VJ_INVERT_MISMATCH = 615 ,
  ERR_VJ_LATERAL_INFLOW ,
  ERR_VJ_ROUTING_MODEL = 619 ,
  ERR_VJ_EXTRA_TOKENS = 621 ,
  ERR_IJ_NOT_STREET ,
  ERR_IJ_DESIGN = 625 ,
  ERR_IJ_CAPTURE_NODE ,
  ERR_IJ_USAGE_ON_PAIR = 629 ,
  ERR_IJ_EXTRA_TOKENS = 631 ,
  ERR_IJ_NO_USAGE = 633 ,
  ERR_INLET_USAGE_SHAPE = 635
}
 
enum  CffiErrorCode : int {
  CFFI_OK = 0 ,
  CFFI_ERR_NOMEM = 1 ,
  CFFI_ERR_INPFILE = 2 ,
  CFFI_ERR_RPTFILE = 3 ,
  CFFI_ERR_OUTFILE = 4 ,
  CFFI_ERR_PARSE = 5 ,
  CFFI_ERR_LIFECYCLE = 6 ,
  CFFI_ERR_BADHANDLE = 7 ,
  CFFI_ERR_BADINDEX = 8 ,
  CFFI_ERR_BADPARAM = 9 ,
  CFFI_ERR_PLUGIN = 10 ,
  CFFI_ERR_IO = 11 ,
  CFFI_ERR_HOTSTART = 12 ,
  CFFI_ERR_CRS = 13 ,
  CFFI_ERR_NUMERICAL = 14 ,
  CFFI_ERR_INTERNAL = 99
}
 
enum  CffiWarnCode : int {
  CFFI_WARN_NONE = 0 ,
  CFFI_WARN_HOTSTART_MISSING = 1 ,
  CFFI_WARN_UNKNOWN_SECTION = 2 ,
  CFFI_WARN_UNKNOWN_OPTION = 3 ,
  CFFI_WARN_DEPRECATED_KW = 4 ,
  CFFI_WARN_PLUGIN_INIT = 5 ,
  CFFI_WARN_NUMERICAL = 6 ,
  CFFI_WARN_STABILITY_LIMIT = 7
}
 
enum  WarnCode : int {
  WARN_NONE = 0 ,
  WARN_WET_STEP_REDUCED ,
  WARN_MAX_DEPTH_INCREASED = 2 ,
  WARN_NEGATIVE_OFFSET = 3 ,
  WARN_MIN_ELEV_DROP = 4 ,
  WARN_MIN_SLOPE = 5 ,
  WARN_DRY_STEP_INCREASED = 6 ,
  WARN_ROUTING_STEP_REDUCED = 7 ,
  WARN_ELEV_DROP_EXCEEDS = 8 ,
  WARN_GAGE_INTERVAL ,
  WARN_REGULATOR_CREST_LOW ,
  WARN_CONTROL_RULE_ATTR = 11 ,
  WARN_INLET_REMOVED = 12 ,
  WARN_UH_PARAMS_REPEATED ,
  WARN_TIMESERIES_DUPLICATE_X = 101 ,
  WARN_BOUNDARY_OVERLAP = 102 ,
  WARN_FILES_SLOT_UNSUPPORTED = 103 ,
  WARN_2D_OPTION_RETIRED = 104 ,
  WARN_FV_OPTION_INERT = 105 ,
  WARN_DW_OPTION_UNDER_FV ,
  WARN_RAIN_CSV_ROWS_SKIPPED ,
  WARN_FV_SLOT_CAP = 108
}
 
enum class  FileMode {
  FileMode::NONE ,
  FileMode::SAVE ,
  FileMode::USE
}
 Mode keyword for one [FILES] row — SAVE or USE. More...
 
enum class  HotstartFormat {
  AUTO = 0 ,
  LEGACY = 1 ,
  NATIVE = 2
}
 
enum class  EngineState : int32_t {
  EngineState::CREATED = 0 ,
  EngineState::OPENED = 1 ,
  EngineState::INITIALIZED = 2 ,
  EngineState::RUNNING = 3 ,
  EngineState::PAUSED = 4 ,
  EngineState::ENDED = 5 ,
  EngineState::REPORTED = 6 ,
  EngineState::CLOSED = 7 ,
  EngineState::ERROR_STATE = 8 ,
  EngineState::BUILDING = 9
}
 High-level engine lifecycle state. More...
 
enum class  FlowUnits : int {
  CFS = 0 ,
  GPM = 1 ,
  MGD = 2 ,
  CMS = 3 ,
  LPS = 4 ,
  MLD = 5
}
 Flow unit systems. More...
 
enum class  RoutingModel : int {
  STEADY = 0 ,
  KINWAVE = 1 ,
  DYNWAVE = 2 ,
  FV = 3
}
 Flow routing methods. More...
 
enum class  QualitySolverKind : int {
  LEGACY = 0 ,
  EULERIAN_ARD = 1 ,
  LAGRANGIAN = 2
}
 Water-quality engine ([OPTIONS] QUALITY_SOLVER, master plan D-UT6). More...
 
enum class  InfiltrationModel : int {
  HORTON = 0 ,
  MOD_HORTON = 1 ,
  GREEN_AMPT = 2 ,
  MOD_GREEN_AMPT = 3 ,
  CURVE_NUMBER = 4
}
 Infiltration methods. More...
 
enum class  RunoffModel : int {
  NONE = 0 ,
  NL_POND = 1
}
 Runoff routing methods. More...
 
enum class  NodeContinuity : int {
  EXPLICIT = 0 ,
  SEMI_IMPLICIT = 1
}
 Node continuity formulation for depth update. More...
 
enum class  UserFlagType : int {
  UserFlagType::BOOLEAN = 0 ,
  UserFlagType::INTEGER = 1 ,
  UserFlagType::REAL = 2 ,
  UserFlagType::STRING = 3
}
 Value type for a user flag. More...
 
enum class  ArdDispersionMode : int {
  OFF = 0 ,
  FISCHER = 1 ,
  VALUE = 2
}
 Global dispersion coefficient model ([TRANSPORT_OPTIONS] DISPERSION). More...
 
enum class  ForcingMode : int8_t {
  NONE = 0 ,
  OVERRIDE = 1 ,
  ADD = 2
}
 
enum class  ForcingPersist : int8_t {
  RESET = 0 ,
  PERSIST = 1
}
 
enum class  RainSource : int8_t {
  TIMESERIES = 0 ,
  FILE_RAIN = 1
}
 Precipitation source type for a rain gage. More...
 
enum class  RainFileFormat : int8_t {
  UNKNOWN = -1 ,
  NWS_15 = 0 ,
  NWS_HOURLY = 1 ,
  DSI_3240 = 2 ,
  DSI_3260 = 3 ,
  HLY_PRCP = 4 ,
  STAN_PRCP = 5 ,
  USER_CSV = 6
}
 Rain data format in an external file. More...
 
enum class  HeatSource : int {
  RAINFALL = 0 ,
  DWF = 1 ,
  GW = 2 ,
  RDII = 3 ,
  EXTERNAL_INFLOW = 4 ,
  IFACE = 5 ,
  INITIAL_STATE = 6 ,
  COUNT_ = 7
}
 
enum class  HeatSubArea : int {
  IMPERV0 = 0 ,
  IMPERV1 = 1 ,
  PERV = 2 ,
  COUNT_ = 3
}
 
enum class  DryTempPolicy : int {
  HOLD = 0 ,
  AIR = 1 ,
  DEFAULT = 2
}
 What a dry or absent element reports (plan D-H5c, user 2026-08-19). More...
 
enum class  ShortwaveMode : int {
  CONSTANT = 0 ,
  TIMESERIES = 1 ,
  COMPUTED = 2
}
 Where incoming shortwave Jin comes from (plan §2.5, phase H6a). More...
 
enum class  HeatElemKind : std::uint8_t {
  NODE = 0 ,
  LINK = 1 ,
  SUBCATCH = 2 ,
  LID = 3 ,
  CELL2D = 4
}
 What kind of element a flux is being evaluated for (D-PE1). More...
 
enum class  HeatScope : std::uint8_t {
  GLOBAL = 0 ,
  TAG = 1 ,
  NODE = 2 ,
  LINK = 3 ,
  CELL2D = 6 ,
  MESH_TAG = 7
}
 Scope of one override row (D-PE3). Ordered by specificity. More...
 
enum class  HeatAttr : int {
  ALBEDO = 0 ,
  SHADE_FACTOR ,
  SKY_VIEW ,
  EMISS_WATER ,
  EMISS_LANDCOVER ,
  LANDCOVER_TEMP ,
  SED_THERMAL_DIFFUSIVITY ,
  SED_SOLUTE_DIFFUSIVITY ,
  SED_BED_THICKNESS ,
  SED_GROUND_DEPTH ,
  SED_GROUND_TEMP ,
  SED_HYPORHEIC_VELOCITY ,
  SED_DENSITY ,
  SED_SPECIFIC_HEAT ,
  SED_MESH_POROSITY ,
  SED_GROUND_SOURCE ,
  COUNT_
}
 Which attribute an override row sets. More...
 
enum class  LidLayer : int {
  SURFACE = 0 ,
  PAVEMENT = 1 ,
  SOIL = 2 ,
  STORAGE = 3 ,
  COUNT_ = 4
}
 
enum class  LidSpecies : int {
  AGE = 0 ,
  TEMPERATURE = 1 ,
  COUNT_ = 2
}
 Species rows carried on the LID layers. More...
 
enum class  LidNodeLayerKind {
  Surface = 0 ,
  Media = 1 ,
  Aggregate = 2 ,
  Bottom = 3
}
 
enum class  LidNodeBottom {
  Current = 0 ,
  Sealed = 1 ,
  MeshAquifer = 2
}
 
enum class  LinkType : int8_t {
  CONDUIT = 0 ,
  PUMP = 1 ,
  ORIFICE = 2 ,
  WEIR = 3 ,
  OUTLET = 4
}
 Link type codes. More...
 
enum class  XsectShape : int16_t {
  CIRCULAR = 0 ,
  FILLED_CIRCULAR = 1 ,
  RECT_CLOSED = 2 ,
  RECT_OPEN = 3 ,
  TRAPEZOIDAL = 4 ,
  TRIANGULAR = 5 ,
  PARABOLIC = 6 ,
  POWER = 7 ,
  MODBASKETHANDLE = 8 ,
  EGGSHAPED = 9 ,
  HORSESHOE = 10 ,
  GOTHIC = 11 ,
  CATENARY = 12 ,
  SEMIELLIPTICAL = 13 ,
  BASKETHANDLE = 14 ,
  SEMICIRCULAR = 15 ,
  RECT_TRIANG = 16 ,
  RECT_ROUND = 17 ,
  HORIZ_ELLIPSE = 18 ,
  VERT_ELLIPSE = 19 ,
  ARCH = 20 ,
  IRREGULAR = 21 ,
  CUSTOM = 22 ,
  FORCE_MAIN = 23 ,
  STREET_XSECT = 24 ,
  DUMMY = 25
}
 Conduit cross-section shape code. More...
 
enum class  FlowClass : int8_t {
  DRY = 0 ,
  UP_DRY = 1 ,
  DN_DRY = 2 ,
  SUBCRITICAL = 3 ,
  SUPERCRITICAL = 4 ,
  UP_CRITICAL = 5 ,
  DN_CRITICAL = 6
}
 Link flow state. More...
 
enum class  NodeCoupling2DType : int8_t {
  NONE = 0 ,
  MANHOLE = 1 ,
  GRATE = 2 ,
  CURB = 3 ,
  OPEN = 4 ,
  OUTFALL = 5
}
 Coupling structure type of a node. NONE = not coupleable. More...
 
enum class  NodeCoupling2DKey : int {
  D = 0 ,
  PERIMETER ,
  AREA ,
  CHAMBER_AREA ,
  LID_OPEN_FRACTION ,
  CREST ,
  COEFFS ,
  CW ,
  CSW ,
  COI ,
  COO ,
  LAW ,
  SPREAD ,
  TAILWATER_RELAX ,
  COUNT
}
 Optional KEY=VALUE parameters of a [2D_NODE_COUPLING] row, in write order. More...
 
enum class  NodeCoupling2DCrest : int {
  NODE_RIM = 0 ,
  MESH_BED = 1 ,
  MAX = 2 ,
  MIN = 3
}
 CREST policy values (stored in the CREST parameter slot). More...
 
enum class  NodeCoupling2DCoeffs : int {
  DEFAULT = 0 ,
  RUBINATO2017 = 1 ,
  RUBINATO2017_LOWER = 2 ,
  RUBINATO2017_UPPER = 3
}
 COEFFS preset values (stored in the COEFFS parameter slot). More...
 
enum class  NodeCoupling2DLaw : int {
  ORIFICE = 0 ,
  WEIR_ORIFICE = 1
}
 LAW values (stored in the LAW parameter slot). More...
 
enum class  NodeType : int8_t {
  JUNCTION = 0 ,
  OUTFALL = 1 ,
  DIVIDER = 2 ,
  STORAGE = 3
}
 Node type codes. More...
 
enum class  OutfallType : int8_t {
  FREE = 0 ,
  NORMAL = 1 ,
  FIXED = 2 ,
  TIDAL = 3 ,
  TIMESERIES = 4
}
 Outfall boundary condition type. More...
 
enum class  DividerType : int8_t {
  CUTOFF = 0 ,
  OVERFLOW_DIV = 1 ,
  TABULAR = 2 ,
  WEIR = 3
}
 Flow divider type. More...
 
enum class  StorageShape : int8_t {
  TABULAR = 0 ,
  FUNCTIONAL = 1 ,
  CYLINDRICAL = 2 ,
  CONICAL = 3 ,
  PARABOLOID = 4 ,
  PYRAMIDAL = 5
}
 Storage-unit surface-area relation. More...
 
enum class  MassUnits : int8_t {
  MG_PER_L = 0 ,
  UG_PER_L = 1 ,
  COUNTS_PER_L = 2
}
 Pollutant concentration units. More...
 
enum class  ReactionSolverKind : int {
  EUL = 0 ,
  RK5 = 1 ,
  ROS2 = 2 ,
  BDF2 = 3
}
 
enum class  ReactionCoupling : int {
  NONE = 0 ,
  FULL = 1
}
 
enum class  ReactionRateUnits : int {
  SEC = 0 ,
  MIN = 1 ,
  HR = 2 ,
  DAY = 3
}
 
enum class  ReactionAreaUnits : int {
  FT2 = 0 ,
  M2 = 1 ,
  CM2 = 2
}
 
enum class  ReactionExprForm : int {
  NONE = 0 ,
  RATE = 1 ,
  EQUIL = 2 ,
  FORMULA = 3
}
 
enum class  RxHydVar : int {
  D = 0 ,
  Q ,
  U ,
  RE ,
  US ,
  FF ,
  AV ,
  HRT ,
  DT ,
  TEMP ,
  GW_THETA ,
  GW_POROSITY ,
  GW_SE ,
  GW_DEPTH_M ,
  COUNT_
}
 
enum class  SpeciesKind : int {
  POLLUTANT = 0 ,
  RESERVED_AGE = 1 ,
  RESERVED_TEMPERATURE = 2 ,
  MSX_BULK = 3 ,
  MSX_WALL = 4
}
 Constituent kinds (master plan §4.1). More...
 
enum class  TableType : int {
  TIMESERIES = 0 ,
  CURVE_STORAGE = 1 ,
  CURVE_DIVERSION = 2 ,
  CURVE_RATING = 3 ,
  CURVE_SHAPE = 4 ,
  CURVE_CONTROL = 5 ,
  CURVE_TIDAL = 6 ,
  CURVE_PUMP1 = 7 ,
  CURVE_PUMP2 = 8 ,
  CURVE_PUMP3 = 9 ,
  CURVE_PUMP4 = 10 ,
  CURVE_PUMP5 = 11 ,
  CURVE_WEIR = 12
}
 Type of data stored in a Table. More...
 
enum class  WaterAgeSource : int {
  RAINFALL = 0 ,
  DWF = 1 ,
  GW = 2 ,
  RDII = 3 ,
  EXTERNAL_INFLOW = 4 ,
  IFACE = 5 ,
  INITIAL_STATE = 6 ,
  COUNT_ = 7
}
 
enum class  SubArea : int {
  IMPERV0 = 0 ,
  IMPERV1 = 1 ,
  PERV = 2 ,
  COUNT_ = 3
}
 Runtime age state shared by the engines (phase A1a). More...
 
enum class  RouteModel : int {
  STEADY = 0 ,
  KINWAVE = 1 ,
  DYNWAVE = 2 ,
  FV = 3
}
 
enum class  XSectShape : int {
  DUMMY = 0 ,
  CIRCULAR = 1 ,
  FILLED_CIRCULAR = 2 ,
  RECT_CLOSED = 3 ,
  RECT_OPEN = 4 ,
  TRAPEZOIDAL = 5 ,
  TRIANGULAR = 6 ,
  PARABOLIC = 7 ,
  POWERFUNC = 8 ,
  RECT_TRIANG = 9 ,
  RECT_ROUND = 10 ,
  MOD_BASKET = 11 ,
  HORIZ_ELLIPSE = 12 ,
  VERT_ELLIPSE = 13 ,
  ARCH = 14 ,
  EGGSHAPED = 15 ,
  HORSESHOE = 16 ,
  GOTHIC = 17 ,
  CATENARY = 18 ,
  SEMIELLIPTICAL = 19 ,
  BASKETHANDLE = 20 ,
  SEMICIRCULAR = 21 ,
  IRREGULAR = 22 ,
  CUSTOM = 23 ,
  FORCE_MAIN = 24 ,
  STREET_XSECT = 25
}
 
enum class  InfilModel : int {
  HORTON = 0 ,
  MOD_HORTON = 1 ,
  GREEN_AMPT = 2 ,
  MOD_GREEN_AMPT = 3 ,
  CURVE_NUM = 4 ,
  CONSTANT = 5
}
 
enum class  PluginType {
  PluginType::INPUT ,
  PluginType::OUTPUT ,
  PluginType::REPORT ,
  PluginType::STATE_IO
}
 Identifies a plugin capability. More...
 
enum class  PluginRole : int {
  PluginRole::INPUT_READ ,
  PluginRole::OUTPUT_WRITE ,
  PluginRole::REPORT_WRITE ,
  PluginRole::STATE_READ ,
  PluginRole::STATE_WRITE
}
 Identifies the I/O direction and category of a file filter entry. More...
 
enum class  PluginState : std::int32_t {
  PluginState::UNLOADED = 0 ,
  PluginState::LOADED = 1 ,
  PluginState::INITIALIZED = 2 ,
  PluginState::VALIDATED = 3 ,
  PluginState::PREPARED = 4 ,
  PluginState::UPDATING = 5 ,
  PluginState::FINALIZED = 6 ,
  PluginState::CLOSED = 7 ,
  PluginState::ERROR = -1
}
 Plugin lifecycle states. More...
 

Functions

std::from_chars_result from_chars_double (const char *first, const char *last, double &value) noexcept
 Parse a double prefix using the available numeric backend.
 
std::string_view error_get_template (int code) noexcept
 Get the description template for an error code.
 
std::string_view warning_get_template (int code) noexcept
 Get the description template for a warning code.
 
std::string format_error (int code, std::string_view name="")
 Format an error message with object name substitution.
 
std::string format_error (int code, std::string_view name, std::string_view detail)
 Format an error message with object name and additional detail.
 
std::string format_warning (int code, std::string_view name="")
 Format a warning message with object name substitution.
 
std::string format_warning (int code, std::string_view name, std::string_view detail)
 Format a warning and append extra diagnostic context.
 
std::string_view cffi_error_get_template (int code) noexcept
 Get the description for a CFFI error code (SWMM_ErrorCode).
 
std::string_view cffi_warning_get_template (int code) noexcept
 Get the description for a CFFI warning code (SWMM_WarnCode).
 
std::string format_cffi_error (int code, std::string_view name="")
 Format a CFFI error message.
 
std::string format_cffi_warning (int code, std::string_view name="")
 Format a CFFI warning message.
 
constexpr char ci_upper (char c) noexcept
 Fold one ASCII lowercase letter to uppercase without locale rules.
 
bool ieq (std::string_view a, std::string_view b) noexcept
 Compare two byte sequences using the legacy ASCII uppercase fold.
 
bool c_to_internal_node_type (int c_type, NodeType &out_type) noexcept
 Translate a public C node type into its internal enum.
 
int internal_to_c_node_type (NodeType type) noexcept
 Translate an internal node type into its public C enum.
 
bool c_to_internal_link_type (int c_type, LinkType &out_type) noexcept
 Translate a public C link type into its internal enum.
 
int internal_to_c_link_type (LinkType type) noexcept
 Translate an internal link type into its public C enum.
 
bool isSedimentAttr (HeatAttr a) noexcept
 Classify an attribute ordinal by the sediment-family boundary.
 
NodeCoupling2DParams unsetNodeCoupling2DParams () noexcept
 Create a parameter array with every slot marked unauthored.
 
constexpr bool storage_shape_is_geometric (StorageShape s) noexcept
 True when s is one of the four geometric shapes (i.e. its a/b/c are the quadratic coefficients, not TABULAR/FUNCTIONAL).
 
bool storage_shape_params_valid (StorageShape s, double p1, double p2, double p3) noexcept
 Validate raw shape parameters.
 
bool storage_shape_coeffs (StorageShape s, double p1, double p2, double p3, double &a, double &b, double &c) noexcept
 Derive the area-relation coefficients for a geometric shape.
 
const char * storage_shape_keyword (StorageShape s) noexcept
 Canonical INP/GeoPackage keyword for a shape.
 
bool storage_shape_from_keyword (std::string_view kw, StorageShape &out) noexcept
 Parse a shape keyword (caller upper-cases first).
 
constexpr bool storage_shape_is_valid_code (int v) noexcept
 Check whether an integer lies in the public storage-shape ordinal interval.
 
TableValidation validate_table (Table &tbl)
 Check table structure and derive its smallest positive x interval.
 
bool table_open_file (Table &tbl, std::size_t boundary_rows=128)
 Open a legacy streaming table file and prepare sparse index/boundaries.
 
std::size_t table_load_cache (Table &tbl, std::size_t start_row)
 Replace the streaming cache starting at a logical data-row offset.
 
double table_lookup_column (Table &tbl, int col_idx, double x_query)
 Read and linearly interpolate a selected value column.
 
double table_step_column (Table &tbl, int col_idx, double x_query)
 Read and step-hold a selected value column.
 
double table_lookup_cursor (Table &tbl, double x_query) noexcept
 Look up a value in a Table using the bidirectional cursor.
 
double table_tseries_lookup_cursor (Table &tbl, double x_query) noexcept
 Time-series linear interpolation with out-of-range → 0 behaviour.
 
double table_step_cursor (Table &tbl, double x_query) noexcept
 Piecewise-constant (step function) table lookup with cursor.
 
double table_getStorageVolume (Table &tbl, double depth) noexcept
 Compute storage volume by trapezoidal integration of an area-vs-depth curve, matching legacy table_getStorageVolume() in table.c.
 
double table_getStorageDepth (Table &tbl, double volume) noexcept
 Invert a storage area-vs-depth curve to find depth from volume.
 
double table_inverseLookup (const Table &tbl, double y_query) noexcept
 Inverse lookup: given y, find corresponding x by linear interpolation.
 
double table_lookupEx (const Table &tbl, double x_query) noexcept
 Linear-interpolating lookup with linear extrapolation outside bounds.
 
double table_intervalLookup (const Table &tbl, double x_query) noexcept
 Step-function lookup: return y for the first x entry > x_query.
 
double table_getSlope (const Table &tbl, double x_query) noexcept
 Compute the slope (dy/dx) at a given x value.
 
double table_getMaxY (const Table &tbl) noexcept
 Return the maximum y value in the non-decreasing leading portion.
 
void applyConduitLengthening (SimulationContext &ctx, RouteModel model)
 Refresh routing lengths and apply dynamic-wave/FV Courant lengthening.
 
double boundSurfaceOutfallFlow (const SimulationContext &ctx, int link, double q)
 Bound a link flow by its upwind surface-outfall donor allowance.
 
std::vector< DiscoveredFilter > discover_all_filters ()
 Copy file-filter metadata from a transient builtin/dynamic plugin discovery.
 
std::vector< DiscoveredPlugin > discover_plugins_by_id ()
 Group a fresh file-filter discovery snapshot by exact plugin ID.
 
const char * plugin_role_to_string (PluginRole role) noexcept
 Read a stable static spelling for a plugin file role.
 
const char * plugin_state_to_string (PluginState state) noexcept
 Read the static spelling of one lifecycle enum.
 
bool plugin_state_transition_valid (PluginState from, PluginState to) noexcept
 Query the standalone lifecycle transition policy without applying it.
 
template<class State, class Ledger>
std::array< double, meshSnowFields.size()> meshSnowValues (const State &s, const Ledger &b)
 Copy one accepted mesh snow state/ledger into the shared 23-field result order.
 

Variables

constexpr double kLitersPerFt3 = 28.316846592
 
constexpr int kNodeCoupling2DKeys = static_cast<int>(NodeCoupling2DKey::COUNT)
 
constexpr int kRxMaxStackDepth = 32
 
constexpr double kStoragePi = 3.141592654
 π to the precision legacy uses (src/legacy/engine/consts.h: #define PI 3.141592654, the same truncated literal as constants::PI). Full double π differs by 1.3e-10 relative, enough to move a storage unit's depth off legacy's bits from the first routing step.
 
long g_trace_rstep_sn
 
constexpr std::array< SnowResultField, 23 > meshSnowFields
 

Typedef Documentation

◆ MeshSnowSnapshot

using openswmm::MeshSnowSnapshot = std::array<std::vector<double>, meshSnowFields.size()>

◆ NodeCoupling2DParams

◆ PluginInfoFactory

Typedef for the C factory function that plugin libraries must export.

Every plugin shared library must export a function with this signature and the name openswmm_plugin_info. The PluginFactory looks this up via dlsym/GetProcAddress after loading the library.

Example implementation in your plugin:

static MyPluginComponentInfo g_info;
return &g_info;
}
OPENSWMM_GPKG_HIDDEN openswmm::IPluginComponentInfo * openswmm_plugin_info(void)
Borrow GeoPackage singleton metadata through the hidden compatibility factory.
Definition GeoPackagePluginInfo.cpp:77
Describes a plugin component: metadata, capabilities, and factory methods.
Definition IPluginComponentInfo.hpp:201

Enumeration Type Documentation

◆ ArdDispersionMode

enum class openswmm::ArdDispersionMode : int
strong

Global dispersion coefficient model ([TRANSPORT_OPTIONS] DISPERSION).

Enumerator
OFF 

no global dispersion (per-conduit overrides still apply)

FISCHER 

Fischer et al. (1979): D = 0.011 v²B²/(Y·U*), U* = √(gYS)

VALUE 

uniform user value (display units, len²/s)

◆ CffiErrorCode

Enumerator
CFFI_OK 
CFFI_ERR_NOMEM 

memory allocation error

CFFI_ERR_INPFILE 

cannot open input file

CFFI_ERR_RPTFILE 

cannot open report file

CFFI_ERR_OUTFILE 

cannot open output file

CFFI_ERR_PARSE 

input parsing error

CFFI_ERR_LIFECYCLE 

invalid engine lifecycle state transition

CFFI_ERR_BADHANDLE 

invalid engine handle

CFFI_ERR_BADINDEX 

invalid object index

CFFI_ERR_BADPARAM 

invalid parameter value

CFFI_ERR_PLUGIN 

plugin initialization or execution error

CFFI_ERR_IO 

file I/O error

CFFI_ERR_HOTSTART 

hot start file error

CFFI_ERR_CRS 

coordinate reference system error

CFFI_ERR_NUMERICAL 

numerical solver error

CFFI_ERR_INTERNAL 

internal engine error

◆ CffiWarnCode

Enumerator
CFFI_WARN_NONE 
CFFI_WARN_HOTSTART_MISSING 

hot start file not found, cold start used

CFFI_WARN_UNKNOWN_SECTION 

unknown section in input file

CFFI_WARN_UNKNOWN_OPTION 

unknown option in input file

CFFI_WARN_DEPRECATED_KW 

deprecated keyword used

CFFI_WARN_PLUGIN_INIT 

plugin initialization warning

CFFI_WARN_NUMERICAL 

numerical approximation used

CFFI_WARN_STABILITY_LIMIT 

time step reduced for stability

◆ DividerType

enum class openswmm::DividerType : int8_t
strong

Flow divider type.

See also
Legacy: DividerType in src/solver/enums.h
Enumerator
CUTOFF 
OVERFLOW_DIV 

Renamed from OVERFLOW to avoid macOS math.h macro collision.

TABULAR 
WEIR 

◆ DryTempPolicy

enum class openswmm::DryTempPolicy : int
strong

What a dry or absent element reports (plan D-H5c, user 2026-08-19).

A4 zeroes a LID layer holding no water — "no water, no age" — and that is right for age and wrong for temperature, because 0 °C is a real temperature. The three defensible answers serve different studies, so the deck picks one rather than the engine deciding.

Enumerator
HOLD 

Freeze the last wet value; rewetting mixes against it. Invents no number and needs no forcing series, which is why it is the default.

AIR 

Track air temperature — the physical answer for an exposed dry surface. Costs a dependency on the met forcing.

DEFAULT 

Fall to HeatConfigData::kDefaultTemp. Reproducible, but it invents a number that then looks like data.

◆ ErrorCode

enum openswmm::ErrorCode : int
Enumerator
ERR_NONE 
ERR_MEMORY 

memory allocation error

ERR_KINWAVE 

cannot solve KW equations for Link s

ERR_ODE_SOLVER 

cannot open ODE solver

ERR_TIMESTEP 

cannot compute a valid time step

ERR_SUBCATCH_OUTLET 

ambiguous outlet ID name for Subcatchment s

ERR_AQUIFER_PARAMS 

invalid parameter values for Aquifer s

ERR_GROUND_ELEV 

ground elevation is below water table for Subcatchment s

ERR_LENGTH 

invalid length for Conduit s

ERR_ELEV_DROP 

elevation drop exceeds length for Conduit s

ERR_ROUGHNESS 

invalid roughness for Conduit s

ERR_BARRELS 

invalid number of barrels for Conduit s

ERR_SLOPE 

adverse slope for Conduit s

ERR_NO_XSECT 

no cross section defined for Link s

ERR_XSECT 

invalid cross section for Link s

ERR_NO_CURVE 

missing or invalid pump curve assigned to Pump s

ERR_PUMP_LIMITS 

startup depth not higher than shutoff depth for Pump s

ERR_LOOP 

links form cyclic loops in the drainage system

ERR_MULTI_OUTLET 

Node s has more than one outlet link.

ERR_DUMMY_LINK 

Node s has illegal DUMMY link connections.

ERR_DIVIDER 

Divider s does not have two outlet links.

ERR_DIVIDER_LINK 

Divider s has invalid diversion link.

ERR_WEIR_DIVIDER 

Weir Divider s has invalid parameters.

ERR_NODE_DEPTH 

Node s has initial depth greater than maximum depth.

ERR_REGULATOR 

Regulator s is the outlet of a non-storage node.

ERR_STORAGE_VOLUME 

Storage node s has negative volume at full depth.

ERR_OUTFALL 

Outfall s has more than 1 inlet link or an outlet link.

ERR_REGULATOR_SHAPE 

Regulator s has invalid cross-section shape.

ERR_NO_OUTLETS 

Drainage system has no acceptable outlet nodes.

ERR_UNITHYD_TIMES 

a Unit Hydrograph in set s has invalid time base

ERR_UNITHYD_RATIOS 

a Unit Hydrograph in set s has invalid response ratios

ERR_RDII_AREA 

invalid sewer area for RDII at node s

ERR_RAIN_FILE_CONFLICT 

ambiguous station ID for Rain Gage s

ERR_RAIN_GAGE_FORMAT 

inconsistent rainfall format for Rain Gage s

ERR_RAIN_GAGE_TSERIES 

time series for Rain Gage s is also used by another object

ERR_RAIN_GAGE_INTERVAL 

recording interval greater than time series interval for Rain Gage s

ERR_CYCLIC_TREATMENT 

cyclic dependency in treatment functions at node s

ERR_CURVE_SEQUENCE 

Curve s has invalid or out of sequence data.

ERR_TIMESERIES_SEQUENCE 

Time Series s has its data out of sequence.

ERR_SNOWMELT_PARAMS 

invalid Snow Melt Climatology parameters

ERR_SNOWPACK_PARAMS 

invalid parameters for Snow Pack s

ERR_LID_TYPE 

no type specified for LID s

ERR_LID_LAYER 

missing layer for LID s

ERR_LID_PARAMS 

invalid parameter value for LID s

ERR_LID_AREAS 

LID area exceeds total area for Subcatchment s.

ERR_LID_CAPTURE_AREA 

LID capture area exceeds total impervious area for Subcatchment s.

ERR_START_DATE 

simulation start date comes after ending date

ERR_REPORT_DATE 

report start date comes after ending date

ERR_REPORT_STEP 

reporting time step or duration is less than routing time step

ERR_INPUT 

one or more errors in input file

ERR_INPUT_LINE 

too many characters in input line

ERR_ITEMS 

too few items

ERR_KEYWORD 

invalid keyword s

ERR_DUP_NAME 

duplicate ID name s

ERR_NAME 

undefined object s

ERR_NUMBER 

invalid number s

ERR_DATETIME 

invalid date/time s

ERR_CONTROL_RULE 

control rule clause invalid or out of sequence

ERR_TRANSECT_UNKNOWN 

data provided for unidentified transect

ERR_TRANSECT_SEQUENCE 

transect station out of sequence

ERR_TRANSECT_TOO_FEW 

Transect s has too few stations.

ERR_TRANSECT_TOO_MANY 

Transect s has too many stations.

ERR_TRANSECT_MANNING 

Transect s has no Manning's N.

ERR_TRANSECT_OVERBANK 

Transect s has invalid overbank locations.

ERR_TRANSECT_NO_DEPTH 

Transect s has no depth.

ERR_MATH_EXPR 

invalid math expression

ERR_INFILTRATION 

invalid infiltration parameters

ERR_FILE_NAME 

files share same names

ERR_INP_FILE 

cannot open input file

ERR_RPT_FILE 

cannot open report file

ERR_OUT_FILE 

cannot open binary results file

ERR_OUT_SIZE 

output will exceed maximum file size

ERR_OUT_WRITE 

error writing to binary results file

ERR_OUT_READ 

error reading from binary results file

ERR_RAIN_IFACE_SCRATCH 

cannot open scratch rainfall interface file

ERR_RAIN_IFACE 

cannot open rainfall interface file s

ERR_RAIN_FILE_OPEN 

cannot open rainfall data file s

ERR_RAIN_FILE_SEQUENCE 

line is out of sequence in rainfall data file s

ERR_RAIN_FILE_FORMAT 

unknown format for rainfall data file s

ERR_RAIN_IFACE_FORMAT 

invalid format for rainfall interface file

ERR_RAIN_IFACE_GAGE 

no data in rainfall interface file for gage s

ERR_RUNOFF_IFACE 

cannot open runoff interface file s

ERR_RUNOFF_IFACE_COMPAT 

incompatible data found in runoff interface file

ERR_RUNOFF_IFACE_EOF 

attempting to read beyond end of runoff interface file

ERR_RUNOFF_IFACE_READ 

error in reading from runoff interface file

ERR_HOTSTART_FILE 

cannot open hot start interface file s

ERR_HOTSTART_COMPAT 

incompatible data found in hot start interface file

ERR_HOTSTART_READ 

error in reading from hot start interface file

ERR_NO_CLIMATE_FILE 

no climate file specified for evaporation and/or wind speed

ERR_CLIMATE_FILE_OPEN 

cannot open climate file s

ERR_CLIMATE_FILE_READ 

error in reading from climate file s

ERR_CLIMATE_FILE_EOF 

attempt to read beyond end of climate file s

ERR_RDII_IFACE_SCRATCH 

cannot open scratch RDII interface file

ERR_RDII_IFACE 

cannot open RDII interface file s

ERR_RDII_IFACE_FORMAT 

invalid format for RDII interface file

ERR_ROUTING_IFACE 

cannot open routing interface file s

ERR_ROUTING_IFACE_FORMAT 

invalid format for routing interface file s

ERR_ROUTING_IFACE_NAMES 

mis-matched names in routing interface file s

ERR_ROUTING_IFACE_SAME 

inflows and outflows interface files have same name

ERR_TABLE_FILE_OPEN 

could not open external file used for Time Series s

ERR_TABLE_FILE_READ 

invalid data in external file used for Time Series s

ERR_SYSTEM 

System exception thrown.

ERR_API_NOT_OPENED 

project not opened

ERR_API_NOT_STARTED 

simulation not started

ERR_API_NOT_ENDED 

simulation not ended

ERR_API_OBJECT_TYPE 

invalid object type

ERR_API_OBJECT_INDEX 

invalid object index

ERR_API_OBJECT_NAME 

invalid object name

ERR_API_PROPERTY_TYPE 

invalid property type

ERR_API_PROPERTY_VALUE 

invalid property value

ERR_API_TIME_PERIOD 

invalid time period

ERR_TIMESERIES_EMPTY 

Time Series s has no data.

ERR_TIMESERIES_NAN 

Time Series s contains NaN or Inf values.

ERR_TABLE_COL_MISMATCH 

column count mismatch in data for s

ERR_GAGE_TSERIES_NOTFOUND 

Rain Gage s references unknown time series.

ERR_VJ_LINK_COUNT 

Virtual Junction s must connect exactly two conduits.

ERR_VJ_XSECT_MISMATCH 

Virtual Junction s connects conduits with different cross sections.

ERR_VJ_OFFSET 

Virtual Junction s has a conduit with a nonzero offset.

ERR_VJ_INVERT_MISMATCH 

Virtual Junction s conduit inverts do not agree at the node.

ERR_VJ_LATERAL_INFLOW 

Virtual Junction s cannot be coupled to a 2D surface mesh (point laterals are allowed)

ERR_VJ_ROUTING_MODEL 

Virtual Junction s requires DYNWAVE or FV flow routing.

ERR_VJ_EXTRA_TOKENS 

too many items for Virtual Junction s

ERR_IJ_NOT_STREET 

Inlet Junction s must connect two STREET conduits (or RECT_OPEN/TRAPEZOIDAL for drop inlets)

ERR_IJ_DESIGN 

Inlet Junction s references an unknown inlet design.

ERR_IJ_CAPTURE_NODE 

Inlet Junction s has an invalid capture node (missing, itself, or virtual)

ERR_IJ_USAGE_ON_PAIR 

Inlet Junction s conduit also carries an [INLET_USAGE] entry.

ERR_IJ_EXTRA_TOKENS 

too many items for Inlet Junction s

ERR_IJ_NO_USAGE 

Inlet Junction s has no inlet design assigned.

ERR_INLET_USAGE_SHAPE 

Inlet s cannot be used with the cross section of s.

◆ FlowClass

enum class openswmm::FlowClass : int8_t
strong

Link flow state.

See also
Legacy: FlowClass in src/solver/enums.h
Enumerator
DRY 
UP_DRY 
DN_DRY 
SUBCRITICAL 
SUPERCRITICAL 
UP_CRITICAL 
DN_CRITICAL 

◆ FlowUnits

enum class openswmm::FlowUnits : int
strong

Flow unit systems.

See also
Legacy: FlowUnitsType in enums.h
Enumerator
CFS 

Cubic feet per second.

GPM 

Gallons per minute.

MGD 

Million gallons per day.

CMS 

Cubic meters per second.

LPS 

Liters per second.

MLD 

Million liters per day.

◆ ForcingMode

enum class openswmm::ForcingMode : int8_t
strong
Enumerator
NONE 

Use model-computed value (no forcing)

OVERRIDE 

Replace computed value with user value.

ADD 

Add user value to computed value.

◆ ForcingPersist

enum class openswmm::ForcingPersist : int8_t
strong
Enumerator
RESET 

Auto-clear after each timestep.

PERSIST 

Keep until explicitly cleared.

◆ HeatAttr

enum class openswmm::HeatAttr : int
strong

Which attribute an override row sets.

One enum spanning both config structs, so one row type serves both and the parser, the resolver and the serializer share a single table. COUNT_ is load-bearing: the attribute-name table in HeatComponent.cpp static_asserts against it, so adding an attribute here without teaching the parser and the writer breaks the build rather than silently dropping the new key on save.

Enumerator
ALBEDO 
SHADE_FACTOR 
SKY_VIEW 
EMISS_WATER 
EMISS_LANDCOVER 
LANDCOVER_TEMP 

NEW (PE2) — NaN means "use air temperature".

SED_THERMAL_DIFFUSIVITY 
SED_SOLUTE_DIFFUSIVITY 
SED_BED_THICKNESS 
SED_GROUND_DEPTH 
SED_GROUND_TEMP 
SED_HYPORHEIC_VELOCITY 
SED_DENSITY 
SED_SPECIFIC_HEAT 
SED_MESH_POROSITY 
SED_GROUND_SOURCE 
COUNT_ 

◆ HeatElemKind

enum class openswmm::HeatElemKind : std::uint8_t
strong

What kind of element a flux is being evaluated for (D-PE1).

Enumerator
NODE 
LINK 
SUBCATCH 
LID 
CELL2D 

Surface mesh cell; CELL2D and MESH_TAG overrides are independent of the network LINK/NODE/TAG namespaces.

◆ HeatScope

enum class openswmm::HeatScope : std::uint8_t
strong

Scope of one override row (D-PE3). Ordered by specificity.

Enumerator
GLOBAL 
TAG 
NODE 
LINK 
CELL2D 
MESH_TAG 

◆ HeatSource

enum class openswmm::HeatSource : int
strong

Source pathways with a configurable inlet temperature ([HEAT_SOURCES]). Order is the storage index of HeatConfigData::global_temp, and matches WaterAgeSource one-for-one so the two tables read the same way.

Enumerator
RAINFALL 

washoff runoff. H5b retired this row's second job: a LID drain now leaves at its own storage-layer temperature, not the rain's.

DWF 
GW 
RDII 
EXTERNAL_INFLOW 
IFACE 
INITIAL_STATE 

water in the network at t = 0

COUNT_ 

◆ HeatSubArea

enum class openswmm::HeatSubArea : int
strong

H5a: which subarea of a subcatchment a ponded temperature belongs to. Deliberately a SEPARATE enum from openswmm::SubArea (A3's), even though the members coincide today: nothing guarantees the age and heat tracks keep the same subarea decomposition, and a shared enum would make a future divergence a silent index error rather than a compile error.

Enumerator
IMPERV0 
IMPERV1 
PERV 
COUNT_ 

◆ HotstartFormat

enum class openswmm::HotstartFormat
strong

File format a SAVE HOTSTART row writes. Values match the C API's SWMM_HOTSTART_FORMAT_*. AUTO is the behaviour of a row with no format keyword: legacy SWMM5 .hsf, or native when node LIDs need it.

Enumerator
AUTO 
LEGACY 
NATIVE 

◆ InfilModel

enum class openswmm::InfilModel : int
strong
Enumerator
HORTON 
MOD_HORTON 

Modified Horton: linear decay fp = f0 - kd * Fe.

GREEN_AMPT 
MOD_GREEN_AMPT 

Modified Green-Ampt: does not reset F between events.

CURVE_NUM 
CONSTANT 

Constant rate, capacity-bounded. 2D-only (no legacy [INFILTRATION] token); see plan §5.5.1.

◆ InfiltrationModel

enum class openswmm::InfiltrationModel : int
strong

Infiltration methods.

See also
Legacy: InfilModelType in enums.h
Enumerator
HORTON 
MOD_HORTON 
GREEN_AMPT 
MOD_GREEN_AMPT 
CURVE_NUMBER 

◆ LidLayer

enum class openswmm::LidLayer : int
strong

A4: layer index within a LID unit. These are exactly the four LIDGroupSoA fields that carry water state (surf_depth, pave_depth, soil_moist, stor_depth) and exactly the four terms LIDSolver::storedVolume() sums. A drainage mat has thickness and void but no depth field of its own — the green roof stores its mat water in stor_depth — so it is not a fifth layer here.

Enumerator
SURFACE 
PAVEMENT 
SOIL 
STORAGE 
COUNT_ 

◆ LidNodeBottom

enum class openswmm::LidNodeBottom
strong
Enumerator
Current 
Sealed 
MeshAquifer 

◆ LidNodeLayerKind

enum class openswmm::LidNodeLayerKind
strong
Enumerator
Surface 
Media 
Aggregate 
Bottom 

◆ LidSpecies

enum class openswmm::LidSpecies : int
strong

Species rows carried on the LID layers.

Enumerator
AGE 
TEMPERATURE 

H5b. A4 reserved the stride for exactly this: one more row, no second array, no change to layer_index.

COUNT_ 

◆ LinkType

enum class openswmm::LinkType : int8_t
strong

Link type codes.

See also
Legacy: LinkType in src/solver/enums.h
Enumerator
CONDUIT 
PUMP 
ORIFICE 
WEIR 
OUTLET 

◆ MassUnits

enum class openswmm::MassUnits : int8_t
strong

Pollutant concentration units.

See also
Legacy: MassUnitsType in src/solver/enums.h
Enumerator
MG_PER_L 

Milligrams per liter.

UG_PER_L 

Micrograms per liter.

COUNTS_PER_L 

Counts per liter (bacteria)

◆ NodeContinuity

enum class openswmm::NodeContinuity : int
strong

Node continuity formulation for depth update.

Controls how node depths are updated in the dynamic wave solver:

  • EXPLICIT: Classic two-branch formulation — separate non-surcharged (dV/surfArea) and surcharged (EXTRAN dQ/dH) paths.
  • SEMI_IMPLICIT: Unified formulation that integrates sumdqdh into the depth update so that head changes affect inflow/outflow rates within the same timestep. Merges surcharged and non-surcharged states into a single equation: dy = dV / (surfArea + sumdqdh * dt).

Specified in [OPTIONS] as:

NODE_CONTINUITY EXPLICIT ;; default (legacy behaviour)
NODE_CONTINUITY SEMI_IMPLICIT ;; unified semi-implicit formulation
@ EXPLICIT
Classic explicit two-branch (default)
Definition SimulationOptions.hpp:146
@ SEMI_IMPLICIT
Unified semi-implicit formulation.
Definition SimulationOptions.hpp:147
Enumerator
EXPLICIT 

Classic explicit two-branch (default)

SEMI_IMPLICIT 

Unified semi-implicit formulation.

◆ NodeCoupling2DCoeffs

enum class openswmm::NodeCoupling2DCoeffs : int
strong

COEFFS preset values (stored in the COEFFS parameter slot).

Enumerator
DEFAULT 
RUBINATO2017 
RUBINATO2017_LOWER 
RUBINATO2017_UPPER 

◆ NodeCoupling2DCrest

enum class openswmm::NodeCoupling2DCrest : int
strong

CREST policy values (stored in the CREST parameter slot).

Enumerator
NODE_RIM 
MESH_BED 
MAX 
MIN 

◆ NodeCoupling2DKey

enum class openswmm::NodeCoupling2DKey : int
strong

Optional KEY=VALUE parameters of a [2D_NODE_COUPLING] row, in write order.

Enumerator
D 

manhole diameter (length)

PERIMETER 

weir crest length (length)

AREA 

orifice / open area (length²)

CHAMBER_AREA 

1D chamber plan area above the rim (length²)

LID_OPEN_FRACTION 

open share of a covered lid, (0, 1]

CREST 

crest policy (NodeCoupling2DCrest)

COEFFS 

coefficient preset (NodeCoupling2DCoeffs)

CW 

free-weir coefficient

CSW 

submerged-weir coefficient

COI 

orifice coefficient, surface → sewer

COO 

orifice coefficient, sewer → surface

LAW 

per-node exchange law (NodeCoupling2DLaw)

SPREAD 

outfall discharge spread radius (length)

TAILWATER_RELAX 

outfall tailwater relaxation time (s)

COUNT 

◆ NodeCoupling2DLaw

enum class openswmm::NodeCoupling2DLaw : int
strong

LAW values (stored in the LAW parameter slot).

Enumerator
ORIFICE 
WEIR_ORIFICE 

◆ NodeCoupling2DType

enum class openswmm::NodeCoupling2DType : int8_t
strong

Coupling structure type of a node. NONE = not coupleable.

Enumerator
NONE 
MANHOLE 
GRATE 
CURB 
OPEN 

open-top storage / pond under the mesh

OUTFALL 

tailwater + discharge mechanism, not an exchange law

◆ NodeType

enum class openswmm::NodeType : int8_t
strong

Node type codes.

See also
Legacy: NodeType in src/solver/enums.h
Enumerator
JUNCTION 
OUTFALL 
DIVIDER 
STORAGE 

◆ OutfallType

enum class openswmm::OutfallType : int8_t
strong

Outfall boundary condition type.

See also
Legacy: OutfallType in src/solver/enums.h
Enumerator
FREE 
NORMAL 
FIXED 
TIDAL 
TIMESERIES 

◆ QualitySolverKind

enum class openswmm::QualitySolverKind : int
strong

Water-quality engine ([OPTIONS] QUALITY_SOLVER, master plan D-UT6).

Enumerator
LEGACY 

Legacy-parity CSTR mixing (QualityRouting.cpp)

EULERIAN_ARD 

Eulerian ARD on the FV cell mesh (all routing models)

LAGRANGIAN 

LARD segment transport. LIVE: LTD advection + junction/storage mixing (X2 8c141a5e), RWPT dispersion (X3b b9852cee), water age (X4 9f155227), exact-exponential KDECAY. NOT YET, each behind a live open() warning in SWMMEngine::open: MSX reactions on segments (L3), treatment interop, heat (H7). Storage mixing beyond CMSTR is also absent but is NOT warned — there is no input surface for it yet, so there is nothing to bypass. (This comment said "X1 skeleton dispatch only; transport lands in X2" until 2026-08-25, five rounds after X2 landed.) (plans/transport/LARD_AGE_EXPEDITE_SUBPLAN_2026-08-23.md, plans/LAGRANGIAN_QUALITY_STRATEGY.md)

◆ RainFileFormat

enum class openswmm::RainFileFormat : int8_t
strong

Rain data format in an external file.

See also
Legacy: RainFileType in src/solver/enums.h
Enumerator
UNKNOWN 
NWS_15 

NWS 15-minute data.

NWS_HOURLY 

NWS hourly data.

DSI_3240 

NCDC DSI 3240 hourly.

DSI_3260 

NCDC DSI 3260 15-minute.

HLY_PRCP 

HLY_PRCP format.

STAN_PRCP 

Standard SWMM rain file.

USER_CSV 

User-supplied multi-column text file — CSV, TSV, or PCSWMM TSF, auto-detected by content (new in 6.0.0, R08; extended per MULTICOLUMN_SERIES_SINGLE_READ plan)

◆ RainSource

enum class openswmm::RainSource : int8_t
strong

Precipitation source type for a rain gage.

See also
Legacy: RainType in src/solver/enums.h
Enumerator
TIMESERIES 

Data from an in-file [TIMESERIES].

FILE_RAIN 

Data from an external rain file.

◆ ReactionAreaUnits

enum class openswmm::ReactionAreaUnits : int
strong
Enumerator
FT2 
M2 
CM2 

◆ ReactionCoupling

enum class openswmm::ReactionCoupling : int
strong
Enumerator
NONE 
FULL 

◆ ReactionExprForm

enum class openswmm::ReactionExprForm : int
strong
Enumerator
NONE 
RATE 
EQUIL 
FORMULA 

◆ ReactionRateUnits

enum class openswmm::ReactionRateUnits : int
strong
Enumerator
SEC 
MIN 
HR 
DAY 

◆ ReactionSolverKind

enum class openswmm::ReactionSolverKind : int
strong
Enumerator
EUL 
RK5 
ROS2 
BDF2 

◆ RouteModel

enum class openswmm::RouteModel : int
strong
Enumerator
STEADY 

Steady-state (pass-through)

KINWAVE 

Kinematic wave.

DYNWAVE 

Dynamic wave (St. Venant, implicit Picard)

FV 

Explicit conservative finite volume (Godunov)

◆ RoutingModel

enum class openswmm::RoutingModel : int
strong

Flow routing methods.

See also
Legacy: RouteModelType in enums.h
Enumerator
STEADY 

Steady-state (no routing)

KINWAVE 

Kinematic wave approximation.

DYNWAVE 

Dynamic wave (full Saint-Venant, implicit Picard)

FV 

Explicit conservative finite volume (Godunov, HLL/HLLC)

◆ RunoffModel

enum class openswmm::RunoffModel : int
strong

Runoff routing methods.

See also
Legacy: RunoffModelType in enums.h
Enumerator
NONE 
NL_POND 

Non-linear reservoir (default)

◆ RxHydVar

enum class openswmm::RxHydVar : int
strong

Hydraulic variables available in reaction expressions (reactions plan §2; engines populate the evaluation environment at R6). Order is the ABI of the evaluator's hydvar array.

Enumerator
D 

depth (ft)

Q 

flow (cfs)

U 

velocity (ft/s)

RE 

Reynolds number.

US 

shear velocity (ft/s)

FF 

Darcy-Weisbach friction factor.

AV 

wetted surface area per volume (1/ft)

HRT 

hydraulic residence time (s)

DT 

reaction step (s)

TEMP 

local water temperature (degC); [REACTION_OPTIONS] TEMPERATURE constant when HEAT_TRANSPORT is off

GW_THETA 

water content (dimensionless), groundwater only

GW_POROSITY 

porosity (dimensionless), groundwater only

GW_SE 

effective saturation (dimensionless), groundwater only

GW_DEPTH_M 

reactor centre depth below the ground surface (m)

COUNT_ 

◆ ShortwaveMode

enum class openswmm::ShortwaveMode : int
strong

Where incoming shortwave Jin comes from (plan §2.5, phase H6a).

The three spellings of [RADIATIVE_FLUXES] SHORTWAVE are mutually exclusive by parse error, not by precedence (D-H6a-3). A ladder would let a deck configuring two sources run plausibly while silently discarding one; the parser refuses instead, the way it already refuses an out-of-range fraction rather than clamping it.

Enumerator
CONSTANT 

SHORTWAVE GLOBAL <W/m²> — the H3 spelling.

TIMESERIES 

SHORTWAVE GLOBAL TIMESERIES <name> — measured.

COMPUTED 

SHORTWAVE GLOBAL COMPUTED — position + clear-sky.

◆ SpeciesKind

enum class openswmm::SpeciesKind : int
strong

Constituent kinds (master plan §4.1).

Enumerator
POLLUTANT 

legacy [POLLUTANTS] entry

RESERVED_AGE 

WATER_AGE (phase A1)

RESERVED_TEMPERATURE 

TEMPERATURE (phase H1)

MSX_BULK 

reactions component BULK species (R1)

MSX_WALL 

reactions component WALL species (R1)

◆ StorageShape

enum class openswmm::StorageShape : int8_t
strong

Storage-unit surface-area relation.

Values mirror legacy enum StorageType (src/legacy/engine/enums.h:833-847) ordinal-for-ordinal, so the int carried by the C API is the same code the legacy solver uses.

The relation determines how the StorageData a/b/c coefficients are read — they are overloaded:

  • FUNCTIONAL: Area = c + a*d^b (power law)
  • CYLINDRICAL..PYRAMIDAL: Area = c + a*d + b*d² (quadratic) See StorageGeometry.hpp for the raw-parameter → coefficient mapping.
See also
Legacy: StorageType in src/legacy/engine/enums.h
Enumerator
TABULAR 

Area vs. depth from a curve (StorageData::curve)

FUNCTIONAL 

Area = c + a*d^b.

CYLINDRICAL 

Elliptical cylinder (p1 = major axis, p2 = minor axis)

CONICAL 

Elliptical cone (p1, p2 = base axes, p3 = side slope)

PARABOLOID 

Elliptical paraboloid(p1, p2 = top axes, p3 = height ≠ 0)

PYRAMIDAL 

Rectangular pyramid (p1 = length, p2 = width, p3 = side slope)

◆ SubArea

enum class openswmm::SubArea : int
strong

Runtime age state shared by the engines (phase A1a).

node_age_vol_in is a RATE (age·ft³/s), the age analogue of nodes.qual_mass_in — loaders add q · age_source and the engine integrates it over its substeps. node_age/link_age are the PUBLISHED mean ages (seconds) the API and gates read. A3: subarea index within a subcatchment. Matches the RunoffSolver's three ponded depths (depth_imperv0/1/perv, Runoff.hpp:86-88) so the age array can be indexed the same way the water is.

Enumerator
IMPERV0 

impervious, no depression storage

IMPERV1 

impervious with depression storage

PERV 
COUNT_ 

◆ TableType

enum class openswmm::TableType : int
strong

Type of data stored in a Table.

See also
Legacy reference: TableType in src/solver/enums.h
Enumerator
TIMESERIES 

Rainfall, inflow, or other time-varying values.

CURVE_STORAGE 

Storage node volume-depth curve.

CURVE_DIVERSION 

Diversion rating curve.

CURVE_RATING 

Outfall/weir rating curve.

CURVE_SHAPE 

Cross-section shape curve.

CURVE_CONTROL 

Control rule action curve.

CURVE_TIDAL 

Tidal stage curve.

CURVE_PUMP1 

Pump curve type 1 (ON/OFF depth)

CURVE_PUMP2 

Pump curve type 2 (head vs flow)

CURVE_PUMP3 

Pump curve type 3 (volume vs time)

CURVE_PUMP4 

Pump curve type 4 (depth vs speed)

CURVE_PUMP5 

Pump curve type 5 (head vs flow, variable speed)

CURVE_WEIR 

Weir rating curve (legacy CurveTypeWords "WEIR")

◆ WarnCode

enum openswmm::WarnCode : int
Enumerator
WARN_NONE 
WARN_WET_STEP_REDUCED 

wet weather time step reduced to recording interval for Rain Gage s

WARN_MAX_DEPTH_INCREASED 

maximum depth increased for Node s

WARN_NEGATIVE_OFFSET 

negative offset ignored for Link s

WARN_MIN_ELEV_DROP 

minimum elevation drop used for Conduit s

WARN_MIN_SLOPE 

minimum slope used for Conduit s

WARN_DRY_STEP_INCREASED 

dry weather time step increased to the wet weather time step

WARN_ROUTING_STEP_REDUCED 

routing time step reduced to the wet weather time step

WARN_ELEV_DROP_EXCEEDS 

elevation drop exceeds length for Conduit s

WARN_GAGE_INTERVAL 

time series interval greater than recording interval for Rain Gage s

WARN_REGULATOR_CREST_LOW 

crest elevation is below downstream invert for regulator Link s

WARN_CONTROL_RULE_ATTR 

non-matching attributes in Control Rule s

WARN_INLET_REMOVED 

inlet removed due to unsupported shape for Conduit s

WARN_UH_PARAMS_REPEATED 

parameters for same month provided more than once for Unit Hydrograph s

WARN_TIMESERIES_DUPLICATE_X 

Time Series s has duplicate x values.

WARN_BOUNDARY_OVERLAP 

boundary regions overlap for s

WARN_FILES_SLOT_UNSUPPORTED 

[FILES] s is not supported and was ignored

WARN_2D_OPTION_RETIRED 

[2D_OPTIONS] s retired with CVODE/ARKODE and was ignored

WARN_FV_OPTION_INERT 

s has no effect under FLOW_ROUTING FV

WARN_DW_OPTION_UNDER_FV 

s is a dynamic wave option and does not apply under FLOW_ROUTING FV

WARN_RAIN_CSV_ROWS_SKIPPED 

unreadable row(s) skipped in rainfall CSV for Rain Gage s

WARN_FV_SLOT_CAP 

slot width cap (5% of top width) overrides FV_SLOT_CELERITY for s

◆ WaterAgeSource

enum class openswmm::WaterAgeSource : int
strong

Source pathways with configurable initial age ([WATER_AGE_SOURCES]). Order is the storage index of WaterAgeConfigData::global_age.

Enumerator
RAINFALL 

washoff runoff (and LID drains until A4)

DWF 
GW 
RDII 
EXTERNAL_INFLOW 
IFACE 
INITIAL_STATE 

water in the network at t = 0

COUNT_ 

◆ XSectShape

enum class openswmm::XSectShape : int
strong
Enumerator
DUMMY 
CIRCULAR 
FILLED_CIRCULAR 
RECT_CLOSED 
RECT_OPEN 
TRAPEZOIDAL 
TRIANGULAR 
PARABOLIC 
POWERFUNC 
RECT_TRIANG 
RECT_ROUND 
MOD_BASKET 
HORIZ_ELLIPSE 
VERT_ELLIPSE 
ARCH 
EGGSHAPED 
HORSESHOE 
GOTHIC 
CATENARY 
SEMIELLIPTICAL 
BASKETHANDLE 
SEMICIRCULAR 
IRREGULAR 
CUSTOM 
FORCE_MAIN 
STREET_XSECT 

◆ XsectShape

enum class openswmm::XsectShape : int16_t
strong

Conduit cross-section shape code.

See also
Legacy: XsectType in src/solver/enums.h
Enumerator
CIRCULAR 
FILLED_CIRCULAR 
RECT_CLOSED 
RECT_OPEN 
TRAPEZOIDAL 
TRIANGULAR 
PARABOLIC 
POWER 
MODBASKETHANDLE 
EGGSHAPED 
HORSESHOE 
GOTHIC 
CATENARY 
SEMIELLIPTICAL 
BASKETHANDLE 
SEMICIRCULAR 
RECT_TRIANG 

Rectangular-triangular bottom.

RECT_ROUND 

Rectangular-round bottom.

HORIZ_ELLIPSE 

Horizontal elliptical pipe.

VERT_ELLIPSE 

Vertical elliptical pipe.

ARCH 

Arch pipe.

IRREGULAR 

User-supplied shape curve.

CUSTOM 

Shape from CURVE_SHAPE table.

FORCE_MAIN 

Circular force main (Hazen-Williams or D-W)

STREET_XSECT 

Street cross-section.

DUMMY 

Dummy (no geometry)

Function Documentation

◆ applyConduitLengthening()

void openswmm::applyConduitLengthening ( SimulationContext & ctx,
RouteModel model )

Refresh routing lengths and apply dynamic-wave/FV Courant lengthening.

Uses true floodplain length for irregular sections and effective Manning n/force-main conventions. Recomputes factor from stored base values; when lengthened adjusts slope/n-derived beta, rough_factor, q_full/q_max and FORCE_MAIN s_bot. Call before initial normal depths and solver initialization. Does not rewrite authored lengths; caller requires aligned valid subtype rows and finite positive geometry/roughness. Allocation may throw after earlier length updates; no rollback.

Parameters
[in,out]ctxBorrowed resolved native geometry/parameters; updates conduit true/mod lengths, selected conveyance terms and force-main roughness factor.
[in]modelDYNWAVE/FV enable positive LENGTHENING_STEP; other route models retain authored mod_length.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ boundSurfaceOutfallFlow()

double openswmm::boundSurfaceOutfallFlow ( const SimulationContext & ctx,
int link,
double q )
inline

Bound a link flow by its upwind surface-outfall donor allowance.

Does not decrement allowance or validate finite values/cap signs; apply before node continuity consumes flow.

Parameters
[in]ctxBorrowed aligned endpoint arrays and nonnegative per-node cfs allowances.
[in]linkValid global link slot when limits are nonempty and q!=0; otherwise endpoints are not read.
[in]qSigned native cfs, positive node1 to node2.
Returns
q clipped to donor cap while preserving direction; unchanged when no limits, zero flow or donor index is absent.
Here is the caller graph for this function:

◆ c_to_internal_link_type()

bool openswmm::c_to_internal_link_type ( int c_type,
LinkType & out_type )
inlinenoexcept

Translate a public C link type into its internal enum.

Named mapping avoids relying on ordinal agreement between public and internal enums.

Parameters
[in]c_typeA SWMM_LinkType enumerator; unknown integers are refused.
[out]out_typeDestination assigned only for a recognized C enumerator; preserved on failure.
Returns
True on conversion, false for an unknown code.
Here is the caller graph for this function:

◆ c_to_internal_node_type()

bool openswmm::c_to_internal_node_type ( int c_type,
NodeType & out_type )
inlinenoexcept

Translate a public C node type into its internal enum.

Named mapping avoids relying on ordinal agreement between public and internal enums.

Parameters
[in]c_typeA SWMM_NodeType enumerator; unknown integers are refused.
[out]out_typeDestination assigned only for a recognized C enumerator; preserved on failure.
Returns
True on conversion, false for an unknown code.
Here is the caller graph for this function:

◆ cffi_error_get_template()

std::string_view openswmm::cffi_error_get_template ( int code)
noexcept

Get the description for a CFFI error code (SWMM_ErrorCode).

Parameters
codeCFFI error code (from CffiErrorCode / SWMM_ErrorCode enum).
Returns
Description string.
Here is the caller graph for this function:

◆ cffi_warning_get_template()

std::string_view openswmm::cffi_warning_get_template ( int code)
noexcept

Get the description for a CFFI warning code (SWMM_WarnCode).

Parameters
codeCFFI warning code (from CffiWarnCode / SWMM_WarnCode enum).
Returns
Description string.
Here is the caller graph for this function:

◆ ci_upper()

char openswmm::ci_upper ( char c)
inlineconstexprnoexcept

Fold one ASCII lowercase letter to uppercase without locale rules.

Parameters
[in]cByte to fold; non-ASCII and non-lowercase bytes pass through unchanged.
Returns
Uppercase ASCII equivalent, or the original byte.
Here is the caller graph for this function:

◆ discover_all_filters()

SWMM_ENGINE_API std::vector< DiscoveredFilter > openswmm::discover_all_filters ( )

Copy file-filter metadata from a transient builtin/dynamic plugin discovery.

Returns
Owned strings/patterns/roles in retained component/filter order; no plugin info pointer escapes. Constructing the temporary factory scans shallow directories and can execute dynamic metadata code; libraries are released afterward, except globally adopted HydroCouple components. No cache is maintained here. Filesystem/allocation/plugin exceptions propagate. Native scan order can vary. Consumers crossing this C++ vector/string ABI must use a compatible toolchain/runtime.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ discover_plugins_by_id()

SWMM_ENGINE_API std::vector< DiscoveredPlugin > openswmm::discover_plugins_by_id ( )

Group a fresh file-filter discovery snapshot by exact plugin ID.

Returns
Owned entries in first-filter encounter order, with deduplicated roles and every advertised filter retained. First encountered version/caption wins when an ID has multiple versions; builtin flags are ORed. Components with no filters do not appear. Order is preserved within one scan, not guaranteed stable across directory scans. No cache or version selection is applied, and discovery exceptions propagate. Same C++ ABI requirements as discover_all_filters().
Here is the call graph for this function:

◆ error_get_template()

std::string_view openswmm::error_get_template ( int code)
noexcept

Get the description template for an error code.

Returns the legacy-compatible description string with s placeholder for the object name. Returns empty string for unknown codes.

Parameters
codeError code (from ErrorCode enum).
Returns
Description template string (e.g., "could not open external file used for Time Series %s.").
Here is the caller graph for this function:

◆ format_cffi_error()

std::string openswmm::format_cffi_error ( int code,
std::string_view name = "" )

Format a CFFI error message.

Parameters
codeCFFI error code.
nameOptional object name for context.
Returns
Formatted string like " ERROR 5: input parsing error."
Here is the call graph for this function:

◆ format_cffi_warning()

std::string openswmm::format_cffi_warning ( int code,
std::string_view name = "" )

Format a CFFI warning message.

Parameters
codeCFFI warning code.
nameOptional object name for context.
Returns
Formatted string like " WARNING 2: unknown section in input file."
Here is the call graph for this function:

◆ format_error() [1/2]

std::string openswmm::format_error ( int code,
std::string_view name,
std::string_view detail )

Format an error message with object name and additional detail.

Produces output like: " ERROR 173: Time Series RAIN1 has its data out of sequence at 01/01/2024 02:00:00."

Parameters
codeError code.
nameObject name to substitute for s.
detailAdditional detail appended after the template.
Returns
Formatted error message string.
Here is the call graph for this function:

◆ format_error() [2/2]

std::string openswmm::format_error ( int code,
std::string_view name = "" )

Format an error message with object name substitution.

Produces output like: " ERROR 173: Time Series RAIN1 has its data out of sequence."

Parameters
codeError code.
nameObject name to substitute for s.
Returns
Formatted error message string.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ format_warning() [1/2]

std::string openswmm::format_warning ( int code,
std::string_view name,
std::string_view detail )

Format a warning and append extra diagnostic context.

No newline or logging side effect; allocation may throw.

Parameters
[in]codeLegacy/new warning code; unknown codes use the unknown-warning fallback.
[in]nameBorrowed object name substituted into the first s placeholder, if any.
[in]detailBorrowed text appended after one space when nonempty; inserted before a final period when present.
Returns
Owned formatted warning with two leading spaces and WARNING code prefix.
Here is the call graph for this function:

◆ format_warning() [2/2]

std::string openswmm::format_warning ( int code,
std::string_view name = "" )

Format a warning message with object name substitution.

Parameters
codeWarning code.
nameObject name to substitute for s.
Returns
Formatted warning message string.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ from_chars_double()

std::from_chars_result openswmm::from_chars_double ( const char * first,
const char * last,
double & value )
inlinenoexcept

Parse a double prefix using the available numeric backend.

Uses std::from_chars when supported. Fallback copies fewer than 64 bytes to a stack buffer, otherwise a temporary string, and calls C-locale strtod_l when locale creation succeeded. The fallback does not inspect errno/range errors, so overflow may return infinity with success; it accepts strtod syntax such as leading whitespace/plus. noexcept means an allocation failure in the long-token fallback terminates.

Parameters
[in]firstBeginning of a valid borrowed byte range [first,last).
[in]lastOne-past-end pointer in the same range; no NUL terminator is required.
[out]valueParsed destination; preserved for an empty/no-conversion input. Standard backend preserves it on reported range errors.
Returns
Backend end pointer and error status; caller checks ptr==last for complete-token parsing.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ieq()

bool openswmm::ieq ( std::string_view a,
std::string_view b )
inlinenoexcept

Compare two byte sequences using the legacy ASCII uppercase fold.

Allocation-free and noexcept; does not perform Unicode case folding.

Parameters
[in]aBorrowed first sequence; embedded NUL bytes participate in comparison.
[in]bBorrowed second sequence; may be empty.
Returns
True only when lengths and every case-folded byte match.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ internal_to_c_link_type()

int openswmm::internal_to_c_link_type ( LinkType type)
inlinenoexcept

Translate an internal link type into its public C enum.

Parameters
[in]typeInternal LinkType value to translate.
Returns
Matching SWMM_LINK_* code, or SWMM_LINK_CONDUIT for an unrecognized internal value.
Here is the caller graph for this function:

◆ internal_to_c_node_type()

int openswmm::internal_to_c_node_type ( NodeType type)
inlinenoexcept

Translate an internal node type into its public C enum.

Parameters
[in]typeInternal NodeType value to translate.
Returns
Matching SWMM_NODE_* code, or SWMM_NODE_JUNCTION for an unrecognized internal value.
Here is the caller graph for this function:

◆ isSedimentAttr()

bool openswmm::isSedimentAttr ( HeatAttr a)
inlinenoexcept

Classify an attribute ordinal by the sediment-family boundary.

This threshold predicate does not perform a full HeatAttr range check.

Parameters
[in]aHeat attribute ordinal; caller validates membership separately.
Returns
True for every ordinal >=SED_THERMAL_DIFFUSIVITY, including COUNT_ and larger unknown values.
Here is the caller graph for this function:

◆ meshSnowValues()

template<class State, class Ledger>
std::array< double, meshSnowFields.size()> openswmm::meshSnowValues ( const State & s,
const Ledger & b )
inline

Copy one accepted mesh snow state/ledger into the shared 23-field result order.

Template Parameters
StateRow exposing the named model, SI water/rate/energy/thermal/age members.
LedgerRow exposing the named completed-time and cumulative m3/kJ members.
Parameters
sBorrowed accepted result row, already qualified by its owner; unsupported fields can be NaN and model -1 unassigned, 0 degree-day or 1 UEB.
bCorresponding accepted completed clock/physical water/energy ledger.
Returns
Owned fixed-size values in meshSnowFields order; units come directly from the catalogue. No display-unit conversion, validation, closure recomputation, future prediction publication or mutation. Caller must sample both rows coherently.

◆ plugin_role_to_string()

const char * openswmm::plugin_role_to_string ( PluginRole role)
inlinenoexcept

Read a stable static spelling for a plugin file role.

Parameters
roleEnum value; unrecognized returns UNKNOWN.
Returns
Nonnull immutable null-terminated literal, valid for process lifetime. Never free; no state mutation, allocation or synchronization required.

◆ plugin_state_to_string()

const char * openswmm::plugin_state_to_string ( PluginState state)
inlinenoexcept

Read the static spelling of one lifecycle enum.

Parameters
stateStored enum; unrecognized returns UNKNOWN.
Returns
Nonnull immutable null-terminated literal with process lifetime. No ownership transfer, allocation or state mutation; safe for independent concurrent readers.

◆ plugin_state_transition_valid()

bool openswmm::plugin_state_transition_valid ( PluginState from,
PluginState to )
inlinenoexcept

Query the standalone lifecycle transition policy without applying it.

Parameters
fromCurrent enum; unknown is allowed only when to is ERROR.
toProposed enum; ERROR is allowed from every from value, including ERROR or unknown. Normal paths follow load/initialize/validate/prepare/update/finalize/ close; ERROR may close, CLOSED has no outgoing normal transitions.
Returns
True for a listed edge or any transition to ERROR, false otherwise. Same-state transitions are false except ERROR->ERROR. Does not read an instance, set state, invoke callbacks or enforce PluginFactory behavior; no synchronization needed.

◆ storage_shape_coeffs()

bool openswmm::storage_shape_coeffs ( StorageShape s,
double p1,
double p2,
double p3,
double & a,
double & b,
double & c )
inlinenoexcept

Derive the area-relation coefficients for a geometric shape.

Formulas are legacy node.c:713-752, verbatim:

     | shape       | a (=a1)          | b (=a2)            | c (=a0)   |
     |-------------|------------------|--------------------|-----------|
     | CYLINDRICAL | 0                | 0                  | π·A·B     |
     | CONICAL     | 2π·B·Z           | π·(B/A)·Z²         | π·A·B     |
     | PARABOLOID  | π·A·B / Z        | 0                  | 0         |
     | PYRAMIDAL   | 2·(L + W)·Z      | 4·Z²               | L·W       |

     where A = p1/2, B = p2/2 (semi-axes), Z = p3, L = p1, W = p2.
Parameters
[out]a,b,cUntouched when the shape is not geometric or params are invalid.
Returns
false when s is TABULAR/FUNCTIONAL (nothing to derive) or the params are invalid — callers treat the latter as an input error.
Parameters
[in]sGeometric storage shape.
[in]p1Full first dimension in caller-consistent length units.
[in]p2Full second dimension in the same units.
[in]p3Side slope (run/rise), or PARABOLOID height.
Note
No unit conversion or finite-value validation. For finite valid inputs, c has area units, a length units and b is dimensionless in A(d)=c+a*d+b*d*d. Output references should denote independent destinations.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ storage_shape_from_keyword()

bool openswmm::storage_shape_from_keyword ( std::string_view kw,
StorageShape & out )
inlinenoexcept

Parse a shape keyword (caller upper-cases first).

Accepts PARABOLOID as an alias for the canonical PARABOLIC so a file written against the enumerator name still reads back.

Returns
false when the keyword is not a storage shape.
Parameters
[in]kwComplete uppercase keyword; no trimming or case folding.
[out]outAssigned on success, preserved on refusal.
Here is the caller graph for this function:

◆ storage_shape_is_geometric()

bool openswmm::storage_shape_is_geometric ( StorageShape s)
inlineconstexprnoexcept

True when s is one of the four geometric shapes (i.e. its a/b/c are the quadratic coefficients, not TABULAR/FUNCTIONAL).

Parameters
[in]sStorage shape; unrecognized enum values return false.
Returns
True for CYLINDRICAL, CONICAL, PARABOLOID or PYRAMIDAL.
Here is the caller graph for this function:

◆ storage_shape_is_valid_code()

bool openswmm::storage_shape_is_valid_code ( int v)
inlineconstexprnoexcept

Check whether an integer lies in the public storage-shape ordinal interval.

Parameters
[in]vInteger code, including arbitrary out-of-range values.
Returns
True for the inclusive TABULAR..PYRAMIDAL range; does not validate shape parameters.

◆ storage_shape_keyword()

const char * openswmm::storage_shape_keyword ( StorageShape s)
inlinenoexcept

Canonical INP/GeoPackage keyword for a shape.

Note
PARABOLOID's keyword is PARABOLIC — that is what legacy writes and reads (src/legacy/engine/text.h:195). The enumerator keeps the geometric name.
Parameters
[in]sStorage shape; unknown enum values fall back to FUNCTIONAL.
Returns
Static NUL-terminated keyword; never free or modify.
Here is the caller graph for this function:

◆ storage_shape_params_valid()

bool openswmm::storage_shape_params_valid ( StorageShape s,
double p1,
double p2,
double p3 )
inlinenoexcept

Validate raw shape parameters.

Mirrors legacy node.c:700-708 — length and width must be > 0, slope/height must be >= 0, and a PARABOLOID's height may not be 0 (it divides). TABULAR/FUNCTIONAL always validate (their params are unused here).

Parameters
[in]sShape being interpreted; non-geometric/unknown values are not checked here.
[in]p1Full first dimension in caller-consistent length units.
[in]p2Full second dimension in the same length units.
[in]p3Side slope (run/rise), or PARABOLOID height in length units.
Returns
True if the implemented sign/divisor checks pass, false otherwise.
Note
No finite-value checks: NaNs can pass comparisons; callers validate finite input separately.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ table_getMaxY()

double openswmm::table_getMaxY ( const Table & tbl)
inlinenoexcept

Return the maximum y value in the non-decreasing leading portion.

Matches legacy table_getMaxY() in table.c. Scans until y starts decreasing and returns the peak.

Parameters
tblTable to query (const).
Returns
Maximum y before the first decreasing step.

◆ table_getSlope()

double openswmm::table_getSlope ( const Table & tbl,
double x_query )
inlinenoexcept

Compute the slope (dy/dx) at a given x value.

Matches legacy table_getSlope() in table.c. Returns the slope of the interval containing x_query. Clamped to the nearest interval at boundaries.

Parameters
tblTable to query (const — no cursor update).
x_queryThe independent variable value.
Returns
dy/dx at x_query.

◆ table_getStorageDepth()

double openswmm::table_getStorageDepth ( Table & tbl,
double volume )
inlinenoexcept

Invert a storage area-vs-depth curve to find depth from volume.

Matches legacy table_getStorageDepth() in table.c. Uses the trapezoidal volume formula to bracket the target volume, then applies a quadratic formula to solve for depth within that interval.

Parameters
tblTable with x = depth, y = surface area.
volumeTarget volume.
Returns
Depth corresponding to the given volume.
Here is the caller graph for this function:

◆ table_getStorageVolume()

double openswmm::table_getStorageVolume ( Table & tbl,
double depth )
inlinenoexcept

Compute storage volume by trapezoidal integration of an area-vs-depth curve, matching legacy table_getStorageVolume() in table.c.

Parameters
tblTable with x = depth, y = surface area.
depthDepth to integrate to.
Returns
Volume (same units as area * depth).
Here is the caller graph for this function:

◆ table_intervalLookup()

double openswmm::table_intervalLookup ( const Table & tbl,
double x_query )
inlinenoexcept

Step-function lookup: return y for the first x entry > x_query.

Matches legacy table_intervalLookup() in table.c. Used for pattern time series where the value applies until the next time point. Returns y[0] if x_query < x[0], y[last] if x_query >= x[last].

Parameters
tblTable to look up (const — no cursor update).
x_queryThe independent variable value.
Returns
y value of the first entry whose x is strictly greater than x_query (step function).

◆ table_inverseLookup()

double openswmm::table_inverseLookup ( const Table & tbl,
double y_query )
inlinenoexcept

Inverse lookup: given y, find corresponding x by linear interpolation.

Matches legacy table_inverseLookup() in table.c. Assumes y is monotonically increasing. Clamped at boundaries.

Parameters
tblTable to search (y must be monotone-increasing).
y_queryThe dependent variable value to invert.
Returns
Interpolated x value.

◆ table_load_cache()

std::size_t openswmm::table_load_cache ( Table & tbl,
std::size_t start_row )

Replace the streaming cache starting at a logical data-row offset.

Uses sparse seek offsets then skips comments/blank lines; reads up to num_cache_rows. CSV-vs-DAT interpretation follows whether the first column ID parses as an integer. Caller validates positive column count and dimensions; no full ordering check or rollback.

Parameters
[in,out]tblOpened file-backed table; seeks its shared FILE handle and replaces cache vectors/metadata.
[in]start_rowZero-based logical data-row offset; beyond EOF can yield zero rows.
Returns
Number of parsed cache rows, or zero for no open file-backed handle.
Here is the caller graph for this function:

◆ table_lookup_column()

double openswmm::table_lookup_column ( Table & tbl,
int col_idx,
double x_query )

Read and linearly interpolate a selected value column.

Requires finite sorted x and positive num_cols with aligned row-major y. Mutates cursor and may seek/reload a file cache; caller serializes shared access. File cache placement estimates a row from the x range rather than proving a bracketing full-file search; nonuniform files can clamp to a selected cache boundary. Linear lookup clamps both ends and returns the left value for a nonpositive bracket span.

Parameters
[in,out]tblBorrowed in-memory or opened file-backed table with coherent shape/cursor/cache.
[in]col_idxZero-based value column; negative or >=stride falls back to column zero.
[in]x_queryQuery in the table x units (OADate days for time series).
Returns
Value in the stored y units, or zero when no rows are available.

◆ table_lookup_cursor()

double openswmm::table_lookup_cursor ( Table & tbl,
double x_query )
inlinenoexcept

Look up a value in a Table using the bidirectional cursor.

Performs linear interpolation between adjacent entries. Clamping behavior at boundaries:

  • x_query < x[0]: returns y[0]
  • x_query > x[last]: returns y[last]
  • Otherwise: linear interpolation between bracketing entries

The cursor is updated on each call to reflect the current position. For monotonically advancing queries (typical), this is O(1) amortized.

Parameters
tblTable to look up (cursor is modified in-place).
x_queryThe independent variable value to look up.
Returns
Interpolated y value.
Note
NOT thread-safe — do not call from multiple threads on the same Table without external synchronization (each thread should own its cursor copy).
See also
Legacy reference: src/solver/table.c — table_lookup()
Here is the caller graph for this function:

◆ table_lookupEx()

double openswmm::table_lookupEx ( const Table & tbl,
double x_query )
inlinenoexcept

Linear-interpolating lookup with linear extrapolation outside bounds.

Matches legacy table_lookupEx() in table.c. Unlike table_lookup_cursor(), this extends the table using the slope of the first (below) or last (above) interval rather than clamping. Used for storage exfiltration bottom-area extrapolation.

Parameters
tblTable to look up (const — no cursor update).
x_queryThe independent variable value.
Returns
Interpolated or extrapolated y value.
Here is the caller graph for this function:

◆ table_open_file()

bool openswmm::table_open_file ( Table & tbl,
std::size_t boundary_rows = 128 )

Open a legacy streaming table file and prepare sparse index/boundaries.

Supports detected CSV headers or SWMM DAT text with fixed 2048-byte line reads and optional UTF-8 BOM. Existing live handles are not closed here. Caller owns eventual table/handle cleanup and serializes seeking/lookups; exceptions after opening can leave partial state. No unit conversion.

Parameters
[in,out]tblTable with authored file_path and no live file_handle to overwrite. Receives raw FILE handle, metadata and boundary arrays.
[in]boundary_rowsMaximum first/last boundary rows; positive count is required for usable boundaries.
Returns
False for empty path/open refusal, true after setup even if parsing yields no rows; validate separately.
Here is the call graph for this function:

◆ table_step_column()

double openswmm::table_step_column ( Table & tbl,
int col_idx,
double x_query )

Read and step-hold a selected value column.

Requires finite sorted x and positive num_cols with aligned row-major y. Mutates cursor and may seek/reload a file cache; caller serializes shared access. File cache placement estimates a row from the x range rather than proving a bracketing full-file search; nonuniform files can clamp to a selected cache boundary. Step lookup returns zero before the selected first x, except a one-row table always returns its sole value; at/after the final x it holds the last value.

Parameters
[in,out]tblBorrowed in-memory or opened file-backed table with coherent shape/cursor/cache.
[in]col_idxZero-based value column; negative or >=stride falls back to column zero.
[in]x_queryQuery in the table x units (OADate days for time series).
Returns
Value in the stored y units, or zero when no rows are available.

◆ table_step_cursor()

double openswmm::table_step_cursor ( Table & tbl,
double x_query )
inlinenoexcept

Piecewise-constant (step function) table lookup with cursor.

Returns y[idx] where x[idx] <= x_query < x[idx+1]. No interpolation — the value is held constant until the next table entry. This is the correct behavior for rain time series where each entry represents the value for the following interval.

Parameters
tblTable to look up (cursor is modified in-place).
x_queryThe independent variable value to look up.
Returns
Step-function y value (no interpolation).
See also
Legacy reference: gage.c — gage_setState() uses step-function logic

◆ table_tseries_lookup_cursor()

double openswmm::table_tseries_lookup_cursor ( Table & tbl,
double x_query )
inlinenoexcept

Time-series linear interpolation with out-of-range → 0 behaviour.

Matches legacy table_tseriesLookup(..., extend=FALSE):

  • x_query < first x → return 0 (not yet started)
  • x_query > last x → return 0 (series ended, do NOT hold last value)
  • otherwise → linear interpolation with cursor

Use this for external-inflow, evaporation, and similar time series where the inflow should drop to zero once the series is exhausted.

Parameters
tblTable to look up (cursor is modified in-place).
x_queryThe independent variable value (e.g. simulation date).
Returns
Interpolated y value, or 0 outside the series range.
See also
Legacy: table.c::table_tseriesLookup(tbl, x, extend=FALSE)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ unsetNodeCoupling2DParams()

NodeCoupling2DParams openswmm::unsetNodeCoupling2DParams ( )
inlinenoexcept

Create a parameter array with every slot marked unauthored.

Returns
Owned fixed array filled with quiet NaNs; no authored default values are resolved here.
Here is the caller graph for this function:

◆ validate_table()

TableValidation openswmm::validate_table ( Table & tbl)

Check table structure and derive its smallest positive x interval.

In-memory checks x ordering/finite values, y shape and duplicate x warning. File-backed checks handle/first boundary, boundary ordering/overlap and first-boundary y shape only, not the full file, finite values or all payloads. Equal x values are permitted. No universal positive-column or finite-y validation.

Parameters
[in,out]tblBorrowed table; updates dx_min while leaving authored x/y values and cursor unchanged.
Returns
Owned validity/errors/warnings result; diagnostics do not update SimulationContext.
Here is the call graph for this function:

◆ warning_get_template()

std::string_view openswmm::warning_get_template ( int code)
noexcept

Get the description template for a warning code.

Parameters
codeWarning code (from WarnCode enum).
Returns
Description template string.
Here is the caller graph for this function:

Variable Documentation

◆ g_trace_rstep_sn

long openswmm::g_trace_rstep_sn
extern

◆ kLitersPerFt3

double openswmm::kLitersPerFt3 = 28.316846592
inlineconstexpr

Litres per cubic foot — the species-mass/s → internal conc·ft³/s source conversion (internal MSX store mass is concentration (mass/L) × ft³).

◆ kNodeCoupling2DKeys

int openswmm::kNodeCoupling2DKeys = static_cast<int>(NodeCoupling2DKey::COUNT)
constexpr

◆ kRxMaxStackDepth

int openswmm::kRxMaxStackDepth = 32
inlineconstexpr

Maximum operand-stack depth; the compiler rejects deeper expressions so the evaluator's fixed stack can never overflow.

◆ kStoragePi

double openswmm::kStoragePi = 3.141592654
inlineconstexpr

π to the precision legacy uses (src/legacy/engine/consts.h: #define PI 3.141592654, the same truncated literal as constants::PI). Full double π differs by 1.3e-10 relative, enough to move a storage unit's depth off legacy's bits from the first routing step.

◆ meshSnowFields

std::array<SnowResultField, 23> openswmm::meshSnowFields
inlineconstexpr
Initial value:
{
{{"Mesh2_face_snow_model", "snow model (-1 unassigned, 0 degree-day, 1 UEB)", "1"},
{"Mesh2_face_snow_completed", "snow state time since start", "s"},
{"Mesh2_face_snow_swe", "snow water equivalent", "m"},
{"Mesh2_face_snow_cover", "snow covered fraction", "1"},
{"Mesh2_face_snow_melt", "snowpack liquid outflow rate", "m s-1"},
{"Mesh2_face_snow_surface_input", "snow liquid input to surface (including throughfall)",
"m s-1"},
{"Mesh2_face_snow_sublimation", "snow sublimation rate", "m s-1"},
{"Mesh2_face_snow_energy", "snow energy relative to ice at zero degrees C", "kJ m-2"},
{"Mesh2_face_snow_surface_temperature", "snow surface temperature", "degC"},
{"Mesh2_face_snow_bulk_temperature", "snow bulk temperature", "degC"},
{"Mesh2_face_snow_albedo", "snow albedo", "1"},
{"Mesh2_face_snow_surface_age", "snow dimensionless surface age", "1"},
{"Mesh2_face_snow_initial", "initial snow water inventory", "m3"},
{"Mesh2_face_snow_raw_precipitation", "cumulative precipitation before snow catch correction",
"m3"},
{"Mesh2_face_snow_precipitation", "cumulative precipitation after snow catch correction",
"m3"},
{"Mesh2_face_snow_liquid_cum", "cumulative snow liquid input to surface", "m3"},
{"Mesh2_face_snow_sublimation_cum", "cumulative snow sublimation", "m3"},
{"Mesh2_face_snow_storage", "stored snow water inventory", "m3"},
{"Mesh2_face_snow_residual", "snow water continuity residual", "m3"},
{"Mesh2_face_snow_net_energy", "cumulative net snow energy input", "kJ"},
{"Mesh2_face_snow_initial_energy", "initial snow/ground energy", "kJ"},
{"Mesh2_face_snow_stored_energy", "stored snow/ground energy", "kJ"},
{"Mesh2_face_snow_energy_residual", "snow/ground energy continuity residual", "kJ"}}}