OpenSWMM Engine  6.0.0-alpha.1
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.1)
Loading...
Searching...
No Matches
openswmm_solver.h
Go to the documentation of this file.
1
14#ifndef OPENSWMMCORE_SOLVER_H_
15#define OPENSWMMCORE_SOLVER_H_
16
17#include "openswmmcore_solver_export.h"
18
19// --- use "C" linkage for C++ programs
20#ifdef __cplusplus
21extern "C" {
22#endif
23
69
85
103
117
123typedef enum
124{
222
260
326
416
436
468
469/* ====================================================================
470 * Statistics and mass balance structures
471 * ==================================================================== */
472
476#define SWMM_MAX_FLOW_CLASSES 7
477
482typedef struct
483{
484 double precip;
485 double runon;
486 double evap;
487 double infil;
488 double runoff;
489 double maxFlow;
491 double pervRunoff;
493
516
521typedef struct
522{
523 double initVol;
524 double avgVol;
525 double maxVol;
526 double maxFlow;
527 double evapLosses;
528 double exfilLosses;
529 double maxVolDate;
531
536typedef struct
537{
538 double avgFlow;
539 double maxFlow;
540 double *totalLoad;
543
566
571typedef struct
572{
573 double utilized;
574 double minFlow;
575 double avgFlow;
576 double maxFlow;
577 double volume;
578 double energy;
579 double offCurveLow;
584
589typedef struct
590{
591 double dwInflow;
592 double wwInflow;
593 double gwInflow;
594 double iiInflow;
595 double exInflow;
596 double flooding;
597 double outflow;
598 double evapLoss;
599 double seepLoss;
600 double reacted;
601 double initStorage;
603 double pctError;
605
610typedef struct
611{
612 double rainfall;
613 double evap;
614 double infil;
615 double runoff;
616 double drains;
617 double runon;
618 double initStorage;
622 double snowRemoved;
623 double pctError;
625
631typedef void (*progress_callback)(double progress);
632
640int EXPORT_OPENSWMMCORE_SOLVER_API swmm_run(const char *inputFile, const char *reportFile, const char *outputFile);
641
650int EXPORT_OPENSWMMCORE_SOLVER_API swmm_run_with_callback(
651 const char *inputFile, const char *reportFile, const char *outputFile, progress_callback callback);
652
660int EXPORT_OPENSWMMCORE_SOLVER_API swmm_open(const char *inputFile, const char *reportFile, const char *outputFile);
661
667int EXPORT_OPENSWMMCORE_SOLVER_API swmm_start(int saveFlag);
668
674int EXPORT_OPENSWMMCORE_SOLVER_API swmm_step(double *elapsedTime);
675
682int EXPORT_OPENSWMMCORE_SOLVER_API swmm_stride(int strideStep, double *elapsedTime);
683
691int EXPORT_OPENSWMMCORE_SOLVER_API swmm_useHotStart(const char *hotStartFile);
692
698int EXPORT_OPENSWMMCORE_SOLVER_API swmm_saveHotStart(const char *hotStartFile);
699
704int EXPORT_OPENSWMMCORE_SOLVER_API swmm_end(void);
705
710int EXPORT_OPENSWMMCORE_SOLVER_API swmm_report(void);
711
716int EXPORT_OPENSWMMCORE_SOLVER_API swmm_close(void);
717
725int EXPORT_OPENSWMMCORE_SOLVER_API swmm_getMassBalErr(float *runoffErr, float *flowErr, float *qualErr);
726
731int EXPORT_OPENSWMMCORE_SOLVER_API swmm_getVersion(void);
732
740int EXPORT_OPENSWMMCORE_SOLVER_API swmm_getError(char *errMsg, int msgLen);
741
748int EXPORT_OPENSWMMCORE_SOLVER_API swmm_getErrorFromCode(int error_code, char *outErrMsg[1024]);
749
754int EXPORT_OPENSWMMCORE_SOLVER_API swmm_getWarnings(void);
755
761int EXPORT_OPENSWMMCORE_SOLVER_API swmm_getCount(int objType);
762
771int EXPORT_OPENSWMMCORE_SOLVER_API swmm_getName(int objType, int index, char *name, int size);
772
779int EXPORT_OPENSWMMCORE_SOLVER_API swmm_getIndex(int objType, const char *name);
780
788double EXPORT_OPENSWMMCORE_SOLVER_API swmm_getValue(int property, int index);
789
799double EXPORT_OPENSWMMCORE_SOLVER_API swmm_getValueExpanded(int objType, int property, int index, int subIndex, int pollutantIndex);
800
809int EXPORT_OPENSWMMCORE_SOLVER_API swmm_setValue(int property, int index, double value);
810
821int EXPORT_OPENSWMMCORE_SOLVER_API swmm_setValueExpanded(int objType, int property, int index, int subIndex, int pollutantIndex, double value);
822
830double EXPORT_OPENSWMMCORE_SOLVER_API swmm_getSavedValue(int property, int index, int period);
831
836void EXPORT_OPENSWMMCORE_SOLVER_API swmm_writeLine(const char *line);
837
849void EXPORT_OPENSWMMCORE_SOLVER_API swmm_decodeDate(double date, int *year, int *month, int *day,
850 int *hour, int *minute, int *second, int *dayOfWeek);
851
862double EXPORT_OPENSWMMCORE_SOLVER_API swmm_encodeDate(int year, int month, int day,
863 int hour, int minute, int second);
864
865/* ====================================================================
866 * Statistics and mass balance API functions
867 *
868 * Call these after swmm_end() but before swmm_close().
869 * ==================================================================== */
870
877int EXPORT_OPENSWMMCORE_SOLVER_API swmm_getSubcatchStats(int index, swmm_SubcatchStats *stats);
878
885int EXPORT_OPENSWMMCORE_SOLVER_API swmm_getNodeStats(int index, swmm_NodeStats *stats);
886
893int EXPORT_OPENSWMMCORE_SOLVER_API swmm_getStorageStats(int index, swmm_StorageStats *stats);
894
902int EXPORT_OPENSWMMCORE_SOLVER_API swmm_getOutfallStats(int index, swmm_OutfallStats *stats);
903
910int EXPORT_OPENSWMMCORE_SOLVER_API swmm_getLinkStats(int index, swmm_LinkStats *stats);
911
918int EXPORT_OPENSWMMCORE_SOLVER_API swmm_getPumpStats(int index, swmm_PumpStats *stats);
919
925int EXPORT_OPENSWMMCORE_SOLVER_API swmm_getSystemRoutingTotals(swmm_RoutingTotals *totals);
926
932int EXPORT_OPENSWMMCORE_SOLVER_API swmm_getSystemRunoffTotals(swmm_RunoffTotals *totals);
933
934#ifdef __cplusplus
935} // matches the linkage specification from above */
936#endif
937
938#endif // OPENSWMMCORE_SOLVER_H_
int size
Definition XSectBatch.cpp:550
void(* progress_callback)(double progress)
Callback function for progress reporting.
Definition openswmm_solver.h:631
int EXPORT_OPENSWMMCORE_SOLVER_API swmm_saveHotStart(const char *hotStartFile)
Save hotstart file for SWMM simulation at current time.
int EXPORT_OPENSWMMCORE_SOLVER_API swmm_stride(int strideStep, double *elapsedTime)
Perform a SWMM simulation step with a stride step and return the elapsed time.
int EXPORT_OPENSWMMCORE_SOLVER_API swmm_run_with_callback(const char *inputFile, const char *reportFile, const char *outputFile, progress_callback callback)
Run a SWMM simulation with the given input file, report file, and output file with a progress callbac...
int EXPORT_OPENSWMMCORE_SOLVER_API swmm_step(double *elapsedTime)
Perform a SWMM simulation step and return the elapsed time.
int EXPORT_OPENSWMMCORE_SOLVER_API swmm_getErrorFromCode(int error_code, char *outErrMsg[1024])
Retrieves the text of the error message that corresponds to the error code number.
int EXPORT_OPENSWMMCORE_SOLVER_API swmm_getWarnings(void)
Gets the number of warnings issued during a simulation.
int EXPORT_OPENSWMMCORE_SOLVER_API swmm_end(void)
End a SWMM simulation.
double EXPORT_OPENSWMMCORE_SOLVER_API swmm_getValueExpanded(int objType, int property, int index, int subIndex, int pollutantIndex)
Get the value of a property for an object given property, index, and subindex in the SWMM model.
int EXPORT_OPENSWMMCORE_SOLVER_API swmm_getNodeStats(int index, swmm_NodeStats *stats)
Get cumulative node statistics.
int EXPORT_OPENSWMMCORE_SOLVER_API swmm_setValue(int property, int index, double value)
Set the value of a property for an object of a given property and index in the SWMM model.
swmm_SystemProperty
Enumeration of system properties used in SWMM5.
Definition openswmm_solver.h:332
@ swmm_UNITSYSTEM
Unit system.
Definition openswmm_solver.h:356
@ swmm_LENGTHENINGSTEP
Lengthening step.
Definition openswmm_solver.h:394
@ swmm_SWEEPEND
Sweep end.
Definition openswmm_solver.h:386
@ swmm_IGNORERAINFALL
Ignore rainfall.
Definition openswmm_solver.h:368
@ swmm_MINSURFAREA
Minimum surface area.
Definition openswmm_solver.h:400
@ swmm_COURANTFACTOR
Courant factor.
Definition openswmm_solver.h:398
@ swmm_MAXTRIALS
Maximum trials.
Definition openswmm_solver.h:388
@ swmm_IGNOREROUTING
Ignore routing.
Definition openswmm_solver.h:376
@ swmm_SYSFLOWTOL
System flow tolerance.
Definition openswmm_solver.h:412
@ swmm_MINROUTESTEP
Minimum routing step.
Definition openswmm_solver.h:392
@ swmm_MINSLOPE
Minimum slope.
Definition openswmm_solver.h:402
@ swmm_SKIPSTEADYSTATE
Skip steady state.
Definition openswmm_solver.h:366
@ swmm_QUALERROR
Quality error.
Definition openswmm_solver.h:408
@ swmm_MAXROUTESTEP
Maximum routing step.
Definition openswmm_solver.h:342
@ swmm_SWEEPSTART
Sweep start.
Definition openswmm_solver.h:384
@ swmm_IGNOREQUALITY
Ignore quality.
Definition openswmm_solver.h:378
@ swmm_SURCHARGEMETHOD
Surcharge method.
Definition openswmm_solver.h:358
@ swmm_RULESTEP
Rule step.
Definition openswmm_solver.h:382
@ swmm_LATFLOWTOL
Lateral flow tolerance.
Definition openswmm_solver.h:414
@ swmm_ENDDATE
End date.
Definition openswmm_solver.h:352
@ swmm_FLOWERROR
Flow error.
Definition openswmm_solver.h:406
@ swmm_IGNORESNOWMELT
Ignore snowmelt.
Definition openswmm_solver.h:372
@ swmm_STARTDATE
Start date.
Definition openswmm_solver.h:334
@ swmm_INERTIADAMPING
Inertia damping.
Definition openswmm_solver.h:362
@ swmm_CURRENTDATE
Current date.
Definition openswmm_solver.h:336
@ swmm_NOREPORT
No report flag.
Definition openswmm_solver.h:348
@ swmm_IGNORERDII
Ignore RDII.
Definition openswmm_solver.h:370
@ swmm_RUNOFFERROR
Runoff error.
Definition openswmm_solver.h:404
@ swmm_NUMTHREADS
Number of threads.
Definition openswmm_solver.h:390
@ swmm_STARTDRYDAYS
Start dry days.
Definition openswmm_solver.h:396
@ swmm_REPORTSTEP
Reporting step.
Definition openswmm_solver.h:344
@ swmm_FLOWUNITS
Flow units.
Definition openswmm_solver.h:350
@ swmm_ROUTESTEP
Routing step.
Definition openswmm_solver.h:340
@ swmm_ERROR_CODE
Error code.
Definition openswmm_solver.h:380
@ swmm_ALLOWPONDING
Allow ponding.
Definition openswmm_solver.h:360
@ swmm_HEADTOL
Head tolerance.
Definition openswmm_solver.h:410
@ swmm_ELAPSEDTIME
Elapsed time.
Definition openswmm_solver.h:338
@ swmm_NORMALFLOWLTD
Normal flow limited.
Definition openswmm_solver.h:364
@ swmm_REPORTSTART
Report start.
Definition openswmm_solver.h:354
@ swmm_TOTALSTEPS
Total steps.
Definition openswmm_solver.h:346
@ swmm_IGNOREGROUNDWATER
Ignore groundwater.
Definition openswmm_solver.h:374
swmm_SubcatchProperty
Enumeration of subcatchment properties used in SWMM5 \TODO Add LID properties to this enum.
Definition openswmm_solver.h:124
@ swmm_SUBCATCH_LID_UNIT_RECEIVING_OUTLET_TYPE
The object type of the receiving drain flow.
Definition openswmm_solver.h:192
@ swmm_SUBCATCH_SLOPE
Slope.
Definition openswmm_solver.h:142
@ swmm_SUBCATCH_INFIL
Infiltration.
Definition openswmm_solver.h:134
@ swmm_SUBCATCH_LID_UNITS_DRAIN_FLOW
Subcatch's LID drain flow.
Definition openswmm_solver.h:174
@ swmm_SUBCATCH_LID_UNIT_FROM_IMPERVIOUS
Subcatch's LID unit fraction of impervious area runoff treated.
Definition openswmm_solver.h:186
@ swmm_SUBCATCH_LID_UNIT_TO_PERVIOUS
Whether Subcatch's LID unit's flow is sent to the pervious area.
Definition openswmm_solver.h:190
@ swmm_SUBCATCH_RPTFLAG
Report flag.
Definition openswmm_solver.h:138
@ swmm_SUBCATCH_RAINGAGE
Rain gage.
Definition openswmm_solver.h:128
@ swmm_SUBCATCH_LID_UNITS_PERV_AREA
Subcatch's LID pervious area.
Definition openswmm_solver.h:170
@ swmm_SUBCATCH_RUNOFF
Runoff.
Definition openswmm_solver.h:136
@ swmm_SUBCATCH_POLLUTANT_RUNOFF_CONCENTRATION
Runoff concentration.
Definition openswmm_solver.h:216
@ swmm_SUBCATCH_CURB_LENGTH
Curb length.
Definition openswmm_solver.h:206
@ swmm_SUBCATCH_LID_UNIT_FULL_WIDTH
Subcatch's LID unit full top width.
Definition openswmm_solver.h:180
@ swmm_SUBCATCH_LID_UNIT_REPLICATES
Number of Subcatch's LID replicates.
Definition openswmm_solver.h:176
@ swmm_SUBCATCH_SUB_AREA_RUNOFF
Subarea's runoff.
Definition openswmm_solver.h:164
@ swmm_SUBCATCH_POLLUTANT_TOTAL_LOAD
Total pollutant load.
Definition openswmm_solver.h:220
@ swmm_SUBCATCH_LID_UNIT_FROM_PERVIOUS
Subcatch's LID unit fraction of pervious area runoff treated.
Definition openswmm_solver.h:188
@ swmm_SUBCATCH_EXTERNAL_POLLUTANT_BUILDUP
External pollutant buildup.
Definition openswmm_solver.h:214
@ swmm_SUBCATCH_API_SNOWFALL
API provided snowfall.
Definition openswmm_solver.h:210
@ swmm_SUBCATCH_EVAP
Evaporation.
Definition openswmm_solver.h:132
@ swmm_SUBCATCH_LID_UNIT_GREEN_AMPT_CAPILLARY_SUCTION
Subcatch's LID unit green and ampt soil capillary suction.
Definition openswmm_solver.h:200
@ swmm_SUBCATCH_API_RAINFALL
API provided rainfall.
Definition openswmm_solver.h:208
@ swmm_SUBCATCH_LID_UNIT_RECEIVING_OUTLET_INDEX
The index of the object receiving drain flow.
Definition openswmm_solver.h:194
@ swmm_SUBCATCH_POLLUTANT_PONDED_CONCENTRATION
Ponded concentration.
Definition openswmm_solver.h:218
@ swmm_SUBCATCH_LID_UNIT_BOTTOM_WIDTH
Subcatch's LID unit bottom width.
Definition openswmm_solver.h:182
@ swmm_SUBCATCH_LID_UNITS_FLOW_TO_PERV_AREA
Subcatch's LID flow to pervious area.
Definition openswmm_solver.h:172
@ swmm_SUBCATCH_FRACTION_IMPERVIOUS
Fraction impervious.
Definition openswmm_solver.h:150
@ swmm_SUBCATCH_OUTLET_TYPE
Outlet type.
Definition openswmm_solver.h:144
@ swmm_SUBCATCH_LID_UNIT_SURFACE_DEPTH
Subcatch's LID unit surface depth.
Definition openswmm_solver.h:196
@ swmm_SUBCATCH_LID_UNIT_GREEN_AMPT_SATURATED_CONDUCTIVITY
Subcatch's LID unit green and ampt saturated conductivity.
Definition openswmm_solver.h:202
@ swmm_SUBCATCH_WIDTH
Width.
Definition openswmm_solver.h:140
@ swmm_SUBCATCH_SUB_AREA_MANNINGS_N
Subarea's Manning's n.
Definition openswmm_solver.h:156
@ swmm_SUBCATCH_SUB_AREA_ROUTE_TO
Subarea routing to.
Definition openswmm_solver.h:152
@ swmm_SUBCATCH_SUB_AREA_FRACTION_AREA
Subarea's depression storage.
Definition openswmm_solver.h:158
@ swmm_SUBCATCH_LID_UNIT_SOIL_MOISTURE
Subcatch's LID unit soil moisture content of biocell soil layer.
Definition openswmm_solver.h:198
@ swmm_SUBCATCH_SUB_AREA_INFLOW
Subarea's inflow.
Definition openswmm_solver.h:162
@ swmm_SUBCATCH_AREA
Area.
Definition openswmm_solver.h:126
@ swmm_SUBCATCH_LID_UNIT_AREA
Subcatch's LID unit area.
Definition openswmm_solver.h:178
@ swmm_SUBCATCH_RAINFALL
Rainfall.
Definition openswmm_solver.h:130
@ swmm_SUBCATCH_LID_UNIT_GREEN_AMPT_MAXIMUM_SOIL_MOISTURE_DEFICIT
Subcatch's LID unit green and ampt maximum soil moisture deficit.
Definition openswmm_solver.h:204
@ swmm_SUBCATCH_SUB_AREA_DEPRESSION_STORAGE
Subarea's depression storage.
Definition openswmm_solver.h:160
@ swmm_SUBCATCH_LID_UNIT_INIT_SATURATION
Subcatch's LID unit initial saturation of soil and storage layers.
Definition openswmm_solver.h:184
@ swmm_SUBCATCH_INFILTRATION_MODEL
Infiltration model.
Definition openswmm_solver.h:148
@ swmm_SUBCATCH_SUB_AREA_DEPTH
Subarea's depth.
Definition openswmm_solver.h:166
@ swmm_SUBCATCH_LID_UNITS_COUNT
Subcatch's LID unit count.
Definition openswmm_solver.h:168
@ swmm_SUBCATCH_POLLUTANT_BUILDUP
Pollutant buildup.
Definition openswmm_solver.h:212
@ swmm_SUBCATCH_OUTLET_INDEX
Outlet index.
Definition openswmm_solver.h:146
@ swmm_SUBCATCH_SUB_AREA_FRACTION_OUTLET
Fraction subarea routed to outlet.
Definition openswmm_solver.h:154
int EXPORT_OPENSWMMCORE_SOLVER_API swmm_getVersion(void)
Get the version of the SWMM engine.
int EXPORT_OPENSWMMCORE_SOLVER_API swmm_getPumpStats(int index, swmm_PumpStats *stats)
Get cumulative pump statistics.
int EXPORT_OPENSWMMCORE_SOLVER_API swmm_getIndex(int objType, const char *name)
Retrieves the index of a named object.
swmm_NodeProperty
Enumeration of node properties used in SWMM5.
Definition openswmm_solver.h:228
@ swmm_NODE_SURCHARGE_DEPTH
Surcharge depth.
Definition openswmm_solver.h:250
@ swmm_NODE_POLLUTANT_CONCENTRATION
Pollutant concentration.
Definition openswmm_solver.h:256
@ swmm_NODE_OVERFLOW
Overflow.
Definition openswmm_solver.h:246
@ swmm_NODE_LATFLOW
Lateral inflow.
Definition openswmm_solver.h:242
@ swmm_NODE_INFLOW
Inflow.
Definition openswmm_solver.h:244
@ swmm_NODE_ELEV
Elevation.
Definition openswmm_solver.h:232
@ swmm_NODE_TYPE
Node type.
Definition openswmm_solver.h:230
@ swmm_NODE_VOLUME
Volume.
Definition openswmm_solver.h:240
@ swmm_NODE_MAXDEPTH
Maximum depth.
Definition openswmm_solver.h:234
@ swmm_NODE_PONDED_AREA
Ponded area.
Definition openswmm_solver.h:252
@ swmm_NODE_DEPTH
Depth.
Definition openswmm_solver.h:236
@ swmm_NODE_RPTFLAG
Report flag.
Definition openswmm_solver.h:248
@ swmm_NODE_INITIAL_DEPTH
Initial depth.
Definition openswmm_solver.h:254
@ swmm_NODE_POLLUTANT_LATMASS_FLUX
Pollutant lateral mass flux inflow.
Definition openswmm_solver.h:258
@ swmm_NODE_HEAD
Hydraulic head.
Definition openswmm_solver.h:238
#define SWMM_MAX_FLOW_CLASSES
Maximum number of flow classification classes for link statistics.
Definition openswmm_solver.h:476
double EXPORT_OPENSWMMCORE_SOLVER_API swmm_encodeDate(int year, int month, int day, int hour, int minute, int second)
Encode date values into a double date value.
int EXPORT_OPENSWMMCORE_SOLVER_API swmm_getMassBalErr(float *runoffErr, float *flowErr, float *qualErr)
Get the mass balance errors for a SWMM simulation.
int EXPORT_OPENSWMMCORE_SOLVER_API swmm_getLinkStats(int index, swmm_LinkStats *stats)
Get cumulative link statistics.
int EXPORT_OPENSWMMCORE_SOLVER_API swmm_open(const char *inputFile, const char *reportFile, const char *outputFile)
Open a SWMM simulation with the given input file, report file, and output file.
int EXPORT_OPENSWMMCORE_SOLVER_API swmm_getName(int objType, int index, char *name, int size)
Retrieves the ID name of an object.
int EXPORT_OPENSWMMCORE_SOLVER_API swmm_setValueExpanded(int objType, int property, int index, int subIndex, int pollutantIndex, double value)
Set the value of a property for an object given property, index, and subindex in the SWMM model.
void EXPORT_OPENSWMMCORE_SOLVER_API swmm_decodeDate(double date, int *year, int *month, int *day, int *hour, int *minute, int *second, int *dayOfWeek)
Decode double date value into year, month, day, hour, minute, second, and day of week.
int EXPORT_OPENSWMMCORE_SOLVER_API swmm_getOutfallStats(int index, swmm_OutfallStats *stats)
Get cumulative outfall node statistics.
int EXPORT_OPENSWMMCORE_SOLVER_API swmm_getError(char *errMsg, int msgLen)
Retrieves the code number and text of the error condition that caused SWMM to abort its analysis.
swmm_LinkType
Enumeration of link types used in SWMM5.
Definition openswmm_solver.h:91
@ swmm_ORIFICE
Orifice link.
Definition openswmm_solver.h:97
@ swmm_PUMP
Pump link.
Definition openswmm_solver.h:95
@ swmm_CONDUIT
Conduit link.
Definition openswmm_solver.h:93
@ swmm_OUTLET
Outlet link.
Definition openswmm_solver.h:101
@ swmm_WEIR
Weir link.
Definition openswmm_solver.h:99
int EXPORT_OPENSWMMCORE_SOLVER_API swmm_getSubcatchStats(int index, swmm_SubcatchStats *stats)
Get cumulative subcatchment statistics.
void EXPORT_OPENSWMMCORE_SOLVER_API swmm_writeLine(const char *line)
Write a line of text to the SWMM report file.
swmm_Object
Enumeration of object types used in SWMM5.
Definition openswmm_solver.h:29
@ swmm_CONTROL_RULE
Control rules.
Definition openswmm_solver.h:49
@ swmm_CURVE
Curve functions.
Definition openswmm_solver.h:45
@ swmm_TIMESERIES
Time series.
Definition openswmm_solver.h:47
@ swmm_INLET
Inlet.
Definition openswmm_solver.h:65
@ swmm_STREET
Street.
Definition openswmm_solver.h:63
@ swmm_TRANSECT
Transects.
Definition openswmm_solver.h:51
@ swmm_POLLUTANT
Pollutants.
Definition openswmm_solver.h:39
@ swmm_TIME_PATTERN
Time patterns.
Definition openswmm_solver.h:43
@ smmm_XSECTION_SHAPE
Cross section shape.
Definition openswmm_solver.h:59
@ swmm_UNIT_HYDROGRAPH
Unit hydrographs.
Definition openswmm_solver.h:55
@ swmm_LID
Low impact development units.
Definition openswmm_solver.h:61
@ swmm_AQUIFER
Aquifers.
Definition openswmm_solver.h:53
@ swmm_SYSTEM
System.
Definition openswmm_solver.h:67
@ swmm_LINK
Links.
Definition openswmm_solver.h:37
@ swmm_SNOWPACK
Snow packs.
Definition openswmm_solver.h:57
@ swmm_GAGE
Rain gages.
Definition openswmm_solver.h:31
@ swmm_SUBCATCH
Subcatchments.
Definition openswmm_solver.h:33
@ swmm_NODE
Nodes.
Definition openswmm_solver.h:35
@ swmm_LANDUSE
Land uses.
Definition openswmm_solver.h:41
int EXPORT_OPENSWMMCORE_SOLVER_API swmm_close(void)
Close a SWMM simulation.
int EXPORT_OPENSWMMCORE_SOLVER_API swmm_getSystemRunoffTotals(swmm_RunoffTotals *totals)
Get system-level surface runoff mass balance totals.
int EXPORT_OPENSWMMCORE_SOLVER_API swmm_getCount(int objType)
Retrieves the number of objects of a specific type.
int EXPORT_OPENSWMMCORE_SOLVER_API swmm_useHotStart(const char *hotStartFile)
Set hotstart file for SWMM simulation.
swmm_LinkProperty
Enumeration of link properties used in SWMM5.
Definition openswmm_solver.h:266
@ swmm_LINK_TIMEOPEN
Time open.
Definition openswmm_solver.h:284
@ swmm_LINK_VELOCITY
Velocity.
Definition openswmm_solver.h:292
@ swmm_LINK_POLLUTANT_LATMASS_FLUX
Pollutant lateral mass flux.
Definition openswmm_solver.h:324
@ swmm_LINK_CAPACITY
Capacity.
Definition openswmm_solver.h:298
@ swmm_LINK_INITIAL_FLOW
Initial flow.
Definition openswmm_solver.h:306
@ swmm_LINK_NODE1
Upstream node.
Definition openswmm_solver.h:270
@ swmm_LINK_POLLUTANT_CONCENTRATION
Pollutant concentration.
Definition openswmm_solver.h:320
@ swmm_LINK_OFFSET2
Downstream invert offset.
Definition openswmm_solver.h:304
@ swmm_LINK_AVERAGE_LOSS
Average loss.
Definition openswmm_solver.h:314
@ swmm_LINK_VOLUME
Volume.
Definition openswmm_solver.h:296
@ swmm_LINK_SEEPAGE_RATE
Seepage rate.
Definition openswmm_solver.h:316
@ swmm_LINK_TIMECLOSED
Time closed.
Definition openswmm_solver.h:286
@ swmm_LINK_TYPE
Link type.
Definition openswmm_solver.h:268
@ swmm_LINK_OFFSET1
Upstream invert offset.
Definition openswmm_solver.h:302
@ swmm_LINK_OUTLET_LOSS
Outlet loss.
Definition openswmm_solver.h:312
@ swmm_LINK_FULLDEPTH
Full depth.
Definition openswmm_solver.h:278
@ swmm_LINK_SLOPE
Slope.
Definition openswmm_solver.h:276
@ swmm_LINK_POLLUTANT_LOAD
Pollutant load.
Definition openswmm_solver.h:322
@ swmm_LINK_DEPTH
Depth.
Definition openswmm_solver.h:290
@ swmm_LINK_FLOW
Flow.
Definition openswmm_solver.h:288
@ swmm_LINK_FULLFLOW
Full flow.
Definition openswmm_solver.h:280
@ swmm_LINK_LENGTH
Length.
Definition openswmm_solver.h:274
@ swmm_LINK_RPTFLAG
Report flag.
Definition openswmm_solver.h:300
@ swmm_LINK_FLOW_LIMIT
Flow limit.
Definition openswmm_solver.h:308
@ swmm_LINK_INLET_LOSS
Inlet loss.
Definition openswmm_solver.h:310
@ swmm_LINK_NODE2
Downstream node.
Definition openswmm_solver.h:272
@ swmm_LINK_SETTING
Setting.
Definition openswmm_solver.h:282
@ swmm_LINK_HAS_FLAPGATE
Flap gate.
Definition openswmm_solver.h:318
@ swmm_LINK_TOPWIDTH
Top width.
Definition openswmm_solver.h:294
int EXPORT_OPENSWMMCORE_SOLVER_API swmm_getSystemRoutingTotals(swmm_RoutingTotals *totals)
Get system-level flow routing mass balance totals.
int EXPORT_OPENSWMMCORE_SOLVER_API swmm_getStorageStats(int index, swmm_StorageStats *stats)
Get cumulative storage node statistics.
double EXPORT_OPENSWMMCORE_SOLVER_API swmm_getSavedValue(int property, int index, int period)
Get saved value of.
int EXPORT_OPENSWMMCORE_SOLVER_API swmm_report(void)
Writes simulation results to the report file.
int EXPORT_OPENSWMMCORE_SOLVER_API swmm_run(const char *inputFile, const char *reportFile, const char *outputFile)
Run a SWMM simulation with the given input file, report file, and output file.
swmm_GageProperty
Enumeration of gage properties used in SWMM5.
Definition openswmm_solver.h:109
@ swmm_GAGE_RAINFALL
Rainfall.
Definition openswmm_solver.h:113
@ swmm_GAGE_TOTAL_PRECIPITATION
Total precipitation.
Definition openswmm_solver.h:111
@ swmm_GAGE_SNOWFALL
Snowfall.
Definition openswmm_solver.h:115
swmm_API_Errors
Enumeration of API errors used in SWMM5.
Definition openswmm_solver.h:442
@ ERR_API_OBJECT_TYPE
API error for errorneous object type.
Definition openswmm_solver.h:450
@ ERR_API_HOTSTART_FILE_FORMAT
API error for errorneous hotstart file format.
Definition openswmm_solver.h:464
@ ERR_API_NOT_ENDED
API error for API not ended.
Definition openswmm_solver.h:448
@ ERR_API_TIME_PERIOD
API error for errorneous time period.
Definition openswmm_solver.h:460
@ ERR_API_IS_RUNNING
API error for API already running.
Definition openswmm_solver.h:466
@ ERR_API_NOT_OPEN
API error for file not opened.
Definition openswmm_solver.h:444
@ ERR_API_HOTSTART_FILE_OPEN
API error for errorneous hotstart file open.
Definition openswmm_solver.h:462
@ ERR_API_OBJECT_INDEX
API error for errorneous object index.
Definition openswmm_solver.h:452
@ ERR_API_PROPERTY_TYPE
API error for errorneous property type.
Definition openswmm_solver.h:456
@ ERR_API_PROPERTY_VALUE
API error for errorneous property value.
Definition openswmm_solver.h:458
@ ERR_API_OBJECT_NAME
API error for errorneous object name.
Definition openswmm_solver.h:454
@ ERR_API_NOT_STARTED
API error for API not started.
Definition openswmm_solver.h:446
double EXPORT_OPENSWMMCORE_SOLVER_API swmm_getValue(int property, int index)
Get the value of a property for an object of a given property in the SWMM model.
swmm_FlowUnitsProperty
Enumeration of flow units used in SWMM5.
Definition openswmm_solver.h:422
@ swmm_CFS
Cubic feet per second.
Definition openswmm_solver.h:424
@ swmm_MGD
Million gallons per day.
Definition openswmm_solver.h:428
@ swmm_LPS
Liters per second.
Definition openswmm_solver.h:432
@ swmm_CMS
Cubic meters per second.
Definition openswmm_solver.h:430
@ swmm_GPM
Gallons per minute.
Definition openswmm_solver.h:426
@ swmm_MLD
Million liters per day.
Definition openswmm_solver.h:434
swmm_NodeType
Enumeration of node types used in SWMM5.
Definition openswmm_solver.h:75
@ swmm_DIVIDER
Divider node.
Definition openswmm_solver.h:83
@ swmm_OUTFALL
Outfall node.
Definition openswmm_solver.h:79
@ swmm_JUNCTION
Junction node.
Definition openswmm_solver.h:77
@ swmm_STORAGE
Storage node.
Definition openswmm_solver.h:81
int EXPORT_OPENSWMMCORE_SOLVER_API swmm_start(int saveFlag)
Start a SWMM simulation with the given save flag.
Cumulative node statistics.
Definition openswmm_solver.h:499
double maxRptDepth
Definition openswmm_solver.h:503
double avgDepth
Definition openswmm_solver.h:500
double maxInflowDate
Definition openswmm_solver.h:513
double timeCourantCritical
Definition openswmm_solver.h:507
double maxInflow
Definition openswmm_solver.h:510
double totLatFlow
Definition openswmm_solver.h:508
double timeSurcharged
Definition openswmm_solver.h:506
double volFlooded
Definition openswmm_solver.h:504
double maxDepth
Definition openswmm_solver.h:501
double maxDepthDate
Definition openswmm_solver.h:502
double maxLatFlow
Definition openswmm_solver.h:509
double maxPondedVol
Definition openswmm_solver.h:512
double timeFlooded
Definition openswmm_solver.h:505
double maxOverflowDate
Definition openswmm_solver.h:514
double maxOverflow
Definition openswmm_solver.h:511
Cumulative outfall node statistics.
Definition openswmm_solver.h:537
double * totalLoad
Definition openswmm_solver.h:540
double avgFlow
Definition openswmm_solver.h:538
double maxFlow
Definition openswmm_solver.h:539
int totalPeriods
Definition openswmm_solver.h:541
Cumulative pump statistics.
Definition openswmm_solver.h:572
double utilized
Definition openswmm_solver.h:573
double minFlow
Definition openswmm_solver.h:574
double volume
Definition openswmm_solver.h:577
int startUps
Definition openswmm_solver.h:581
double maxFlow
Definition openswmm_solver.h:576
double energy
Definition openswmm_solver.h:578
double offCurveHigh
Definition openswmm_solver.h:580
int totalPeriods
Definition openswmm_solver.h:582
double offCurveLow
Definition openswmm_solver.h:579
double avgFlow
Definition openswmm_solver.h:575
System-level flow routing mass balance totals (all in ft3 or m3).
Definition openswmm_solver.h:590
double evapLoss
Definition openswmm_solver.h:598
double dwInflow
Definition openswmm_solver.h:591
double finalStorage
Definition openswmm_solver.h:602
double gwInflow
Definition openswmm_solver.h:593
double iiInflow
Definition openswmm_solver.h:594
double pctError
Definition openswmm_solver.h:603
double seepLoss
Definition openswmm_solver.h:599
double outflow
Definition openswmm_solver.h:597
double reacted
Definition openswmm_solver.h:600
double wwInflow
Definition openswmm_solver.h:592
double exInflow
Definition openswmm_solver.h:595
double initStorage
Definition openswmm_solver.h:601
double flooding
Definition openswmm_solver.h:596
System-level surface runoff mass balance totals.
Definition openswmm_solver.h:611
double pctError
Definition openswmm_solver.h:623
double snowRemoved
Definition openswmm_solver.h:622
double finalSnowCover
Definition openswmm_solver.h:621
double runon
Definition openswmm_solver.h:617
double drains
Definition openswmm_solver.h:616
double initSnowCover
Definition openswmm_solver.h:620
double runoff
Definition openswmm_solver.h:615
double infil
Definition openswmm_solver.h:614
double evap
Definition openswmm_solver.h:613
double initStorage
Definition openswmm_solver.h:618
double finalStorage
Definition openswmm_solver.h:619
double rainfall
Definition openswmm_solver.h:612
Cumulative storage node statistics.
Definition openswmm_solver.h:522
double evapLosses
Definition openswmm_solver.h:527
double maxVolDate
Definition openswmm_solver.h:529
double maxVol
Definition openswmm_solver.h:525
double initVol
Definition openswmm_solver.h:523
double exfilLosses
Definition openswmm_solver.h:528
double avgVol
Definition openswmm_solver.h:524
double maxFlow
Definition openswmm_solver.h:526
Cumulative subcatchment statistics.
Definition openswmm_solver.h:483
double runoff
Definition openswmm_solver.h:488
double infil
Definition openswmm_solver.h:487
double maxFlow
Definition openswmm_solver.h:489
double evap
Definition openswmm_solver.h:486
double precip
Definition openswmm_solver.h:484
double impervRunoff
Definition openswmm_solver.h:490
double runon
Definition openswmm_solver.h:485
double pervRunoff
Definition openswmm_solver.h:491