16#ifndef OPENSWMM_INFRASTRUCTURE_H
17#define OPENSWMM_INFRASTRUCTURE_H
103 double* n_left,
double* n_right,
double* n_channel);
118 double x_left,
double x_right);
129 double* x_left,
double* x_right);
148 double x_left,
double x_right);
159 double* x_left,
double* x_right);
181 double x_factor,
double y_factor,
double length_factor);
193 double* x_factor,
double* y_factor,
double* length_factor);
237 double* station,
double* elevation);
308 double t_crown,
double h_curb,
double sx,
double n_road,
309 double gutter_depres,
double gutter_width,
int sides,
310 double back_width,
double back_slope,
double back_n);
357 double* t_crown,
double* h_curb,
double* sx,
double* n_road,
358 double* gutter_depres,
double* gutter_width,
int* sides,
359 double* back_width,
double* back_slope,
double* back_n);
386 const char* grate_type,
double open_area,
double splash_veloc);
432 double* length,
double* width,
433 char* grate_type,
int grate_buflen,
434 double* open_area,
double* splash_veloc);
530 double frac_imperv,
double ksat,
double clog_factor,
double regen_days);
599 double* frac_imperv,
double* ksat,
double* clog_factor,
double* regen_days);
651 int* subcatch_idx,
int* lid_idx,
int* number,
652 double* area,
double* width,
double* init_sat,
653 double* from_imperv,
int* to_perv,
double* from_perv);
#define SWMM_ENGINE_API
Definition openswmm_2d.h:37
void * SWMM_Engine
Opaque handle to an OpenSWMM Engine instance.
Definition openswmm_callbacks.h:35
OpenSWMM Engine — primary transparent C API (master header).
SWMM_ENGINE_API int swmm_transect_get_bank_stations(SWMM_Engine engine, int idx, double *x_left, double *x_right)
Get the left and right bank stations for a transect.
Definition openswmm_infrastructure_impl.cpp:119
SWMM_ENGINE_API int swmm_transect_add_station(SWMM_Engine engine, int idx, double station, double elevation)
Add a station–elevation data point to a transect.
Definition openswmm_infrastructure_impl.cpp:61
SWMM_ENGINE_API int swmm_transect_get_roughness(SWMM_Engine engine, int idx, double *n_left, double *n_right, double *n_channel)
Get the Manning's roughness values for a transect.
Definition openswmm_infrastructure_impl.cpp:96
SWMM_ENGINE_API int swmm_lid_get_pavement(SWMM_Engine engine, int idx, double *thick, double *void_ratio, double *frac_imperv, double *ksat, double *clog_factor, double *regen_days)
Read the porous-pavement layer. Inverse of swmm_lid_set_pavement. Any out-param may be null.
Definition openswmm_infrastructure_impl.cpp:729
SWMM_ENGINE_API int swmm_inlet_index(SWMM_Engine engine, const char *id)
Look up an inlet's zero-based index by its string identifier.
Definition openswmm_infrastructure_impl.cpp:421
SWMM_ENGINE_API int swmm_lid_get_surface(SWMM_Engine engine, int idx, double *storage, double *roughness, double *slope)
Read the surface layer properties. Inverse of swmm_lid_set_surface.
Definition openswmm_infrastructure_impl.cpp:682
SWMM_ENGINE_API int swmm_transect_index(SWMM_Engine engine, const char *id)
Look up a transect's zero-based index by its string identifier.
Definition openswmm_infrastructure_impl.cpp:76
SWMM_ENGINE_API int swmm_transect_rename(SWMM_Engine engine, int idx, const char *new_id)
Rename an existing transect.
Definition openswmm_infrastructure_impl.cpp:230
SWMM_ENGINE_API int swmm_lid_index(SWMM_Engine engine, const char *id)
Look up a LID control's zero-based index by its string identifier.
Definition openswmm_infrastructure_impl.cpp:649
SWMM_ENGINE_API int swmm_lid_count(SWMM_Engine engine)
Get the total number of LID controls in the model.
Definition openswmm_infrastructure_impl.cpp:644
SWMM_ENGINE_API int swmm_lid_set_pavement(SWMM_Engine engine, int idx, double thick, double void_ratio, double frac_imperv, double ksat, double clog_factor, double regen_days)
Set the porous-pavement layer properties for a LID control.
Definition openswmm_infrastructure_impl.cpp:605
SWMM_ENGINE_API int swmm_lid_set_drain(SWMM_Engine engine, int idx, double coeff, double expon, double offset)
Set the underdrain properties for a LID control.
Definition openswmm_infrastructure_impl.cpp:588
SWMM_ENGINE_API int swmm_transect_set_bank_stations(SWMM_Engine engine, int idx, double x_left, double x_right)
Set the left and right bank stations for a transect.
Definition openswmm_infrastructure_impl.cpp:108
SWMM_ENGINE_API int swmm_transect_set_modifiers(SWMM_Engine engine, int idx, double x_factor, double y_factor, double length_factor)
Set the station, elevation, and meander modifiers for a transect.
Definition openswmm_infrastructure_impl.cpp:152
SWMM_ENGINE_API int swmm_transect_get_encroachment_stations(SWMM_Engine engine, int idx, double *x_left, double *x_right)
Get the left and right encroachment stations for a transect (BQ-TR-02).
Definition openswmm_infrastructure_impl.cpp:141
SWMM_ENGINE_API int swmm_transect_set_roughness(SWMM_Engine engine, int idx, double n_left, double n_right, double n_channel)
Set Manning's roughness for left overbank, right overbank, and channel.
Definition openswmm_infrastructure_impl.cpp:50
SWMM_ENGINE_API int swmm_transect_set_encroachment_stations(SWMM_Engine engine, int idx, double x_left, double x_right)
Set the left and right encroachment stations for a transect (BQ-TR-02).
Definition openswmm_infrastructure_impl.cpp:130
SWMM_ENGINE_API int swmm_inlet_set_params(SWMM_Engine engine, int idx, double length, double width, const char *grate_type, double open_area, double splash_veloc)
Set the geometric parameters for an inlet.
Definition openswmm_infrastructure_impl.cpp:400
SWMM_ENGINE_API int swmm_transect_set_comments(SWMM_Engine engine, int idx, const char *text)
Set the free-form comments / description for a transect.
Definition openswmm_infrastructure_impl.cpp:176
SWMM_ENGINE_API int swmm_lid_set_surface(SWMM_Engine engine, int idx, double storage, double roughness, double slope)
Set the surface layer properties for a LID control.
Definition openswmm_infrastructure_impl.cpp:532
SWMM_ENGINE_API const char * swmm_street_id(SWMM_Engine engine, int idx)
Get the string identifier of a street by index.
Definition openswmm_infrastructure_impl.cpp:348
SWMM_ENGINE_API int swmm_transect_get_modifiers(SWMM_Engine engine, int idx, double *x_factor, double *y_factor, double *length_factor)
Get the station, elevation, and meander modifiers for a transect.
Definition openswmm_infrastructure_impl.cpp:164
SWMM_ENGINE_API int swmm_transect_count(SWMM_Engine engine)
Get the total number of transects in the model.
Definition openswmm_infrastructure_impl.cpp:71
SWMM_ENGINE_API int swmm_lid_get_drainmat(SWMM_Engine engine, int idx, double *thick, double *void_frac, double *roughness)
Read the drainage-mat layer. Inverse of swmm_lid_set_drainmat. Any out-param may be null.
Definition openswmm_infrastructure_impl.cpp:744
SWMM_ENGINE_API int swmm_lid_get_type(SWMM_Engine engine, int idx, int *type)
Read a LID control's type code. Inverse of the type argument to swmm_lid_add.
Definition openswmm_infrastructure_impl.cpp:674
SWMM_ENGINE_API int swmm_street_count(SWMM_Engine engine)
Get the total number of street definitions in the model.
Definition openswmm_infrastructure_impl.cpp:334
SWMM_ENGINE_API int swmm_transect_get_station(SWMM_Engine engine, int idx, int station_idx, double *station, double *elevation)
Get a single station–elevation pair from a transect.
Definition openswmm_infrastructure_impl.cpp:205
SWMM_ENGINE_API int swmm_inlet_get_params(SWMM_Engine engine, int idx, double *length, double *width, char *grate_type, int grate_buflen, double *open_area, double *splash_veloc)
Read an inlet's geometric parameters. Inverse of swmm_inlet_set_params.
Definition openswmm_infrastructure_impl.cpp:450
SWMM_ENGINE_API int swmm_lid_usage_count(SWMM_Engine engine)
Total number of LID usage rows across all subcatchments.
Definition openswmm_infrastructure_impl.cpp:784
SWMM_ENGINE_API int swmm_street_add(SWMM_Engine engine, const char *id)
Add a new street cross-section definition.
Definition openswmm_infrastructure_impl.cpp:289
SWMM_ENGINE_API int swmm_lid_usage_remove(SWMM_Engine engine, int usage_idx)
Remove one LID usage row by global index.
Definition openswmm_infrastructure_impl.cpp:812
SWMM_ENGINE_API int swmm_lid_get_storage(SWMM_Engine engine, int idx, double *thick, double *void_frac, double *ksat)
Read the storage layer properties. Inverse of swmm_lid_set_storage. Any out-param may be null.
Definition openswmm_infrastructure_impl.cpp:707
SWMM_ENGINE_API int swmm_lid_usage_add(SWMM_Engine engine, int subcatch_idx, int lid_idx, int number, double area, double width, double init_sat, double from_imperv)
Assign a LID control to a subcatchment.
Definition openswmm_infrastructure_impl.cpp:759
SWMM_ENGINE_API int swmm_lid_set_storage(SWMM_Engine engine, int idx, double thick, double void_frac, double ksat)
Set the storage layer properties for a LID control.
Definition openswmm_infrastructure_impl.cpp:571
SWMM_ENGINE_API int swmm_inlet_count(SWMM_Engine engine)
Get the total number of inlet definitions in the model.
Definition openswmm_infrastructure_impl.cpp:416
SWMM_ENGINE_API const char * swmm_lid_id(SWMM_Engine engine, int idx)
Get the string identifier of a LID control by index.
Definition openswmm_infrastructure_impl.cpp:658
SWMM_ENGINE_API int swmm_lid_add(SWMM_Engine engine, const char *id, int type)
Add a new LID (Low Impact Development) control.
Definition openswmm_infrastructure_impl.cpp:500
SWMM_ENGINE_API int swmm_street_get_params(SWMM_Engine engine, int idx, double *t_crown, double *h_curb, double *sx, double *n_road, double *gutter_depres, double *gutter_width, int *sides, double *back_width, double *back_slope, double *back_n)
Read back the geometric parameters of a street cross-section.
Definition openswmm_infrastructure_impl.cpp:355
SWMM_ENGINE_API int swmm_street_set_params(SWMM_Engine engine, int idx, double t_crown, double h_curb, double sx, double n_road, double gutter_depres, double gutter_width, int sides, double back_width, double back_slope, double back_n)
Set the geometric parameters for a street cross-section.
Definition openswmm_infrastructure_impl.cpp:311
SWMM_ENGINE_API int swmm_transect_get_comments(SWMM_Engine engine, int idx, char *buf, int buflen)
Get the free-form comments / description for a transect.
Definition openswmm_infrastructure_impl.cpp:185
SWMM_ENGINE_API int swmm_lid_get_drain(SWMM_Engine engine, int idx, double *coeff, double *expon, double *offset)
Read the underdrain properties. Inverse of swmm_lid_set_drain. Any out-param may be null.
Definition openswmm_infrastructure_impl.cpp:718
SWMM_ENGINE_API int swmm_transect_get_station_count(SWMM_Engine engine, int idx)
Get the number of station–elevation points stored for a transect.
Definition openswmm_infrastructure_impl.cpp:198
SWMM_ENGINE_API int swmm_inlet_add(SWMM_Engine engine, const char *id, const char *type)
Add a new inlet definition.
Definition openswmm_infrastructure_impl.cpp:382
SWMM_ENGINE_API int swmm_transect_clear_stations(SWMM_Engine engine, int idx)
Remove all station–elevation pairs from a transect.
Definition openswmm_infrastructure_impl.cpp:220
SWMM_ENGINE_API int swmm_transect_add(SWMM_Engine engine, const char *id)
Add a new transect for irregular cross-sections.
Definition openswmm_infrastructure_impl.cpp:25
SWMM_ENGINE_API int swmm_lid_set_soil(SWMM_Engine engine, int idx, double thick, double porosity, double fc, double wp, double ksat, double kslope)
Set the soil layer properties for a LID control.
Definition openswmm_infrastructure_impl.cpp:549
SWMM_ENGINE_API int swmm_lid_get_soil(SWMM_Engine engine, int idx, double *thick, double *porosity, double *fc, double *wp, double *ksat, double *kslope)
Read the soil layer properties. Inverse of swmm_lid_set_soil. Any out-param may be null.
Definition openswmm_infrastructure_impl.cpp:693
SWMM_ENGINE_API const char * swmm_inlet_id(SWMM_Engine engine, int idx)
Get the string identifier of an inlet by index.
Definition openswmm_infrastructure_impl.cpp:430
SWMM_ENGINE_API int swmm_lid_usage_get(SWMM_Engine engine, int usage_idx, int *subcatch_idx, int *lid_idx, int *number, double *area, double *width, double *init_sat, double *from_imperv, int *to_perv, double *from_perv)
Read one LID usage row by global index.
Definition openswmm_infrastructure_impl.cpp:790
SWMM_ENGINE_API int swmm_street_index(SWMM_Engine engine, const char *id)
Look up a street's zero-based index by its string identifier.
Definition openswmm_infrastructure_impl.cpp:339
SWMM_ENGINE_API int swmm_inlet_get_type(SWMM_Engine engine, int idx, char *buf, int buflen)
Read an inlet's type string (the value passed to swmm_inlet_add).
Definition openswmm_infrastructure_impl.cpp:469
SWMM_ENGINE_API int swmm_transect_remove(SWMM_Engine engine, int idx)
Remove a transect by index.
Definition openswmm_infrastructure_impl.cpp:260
SWMM_ENGINE_API const char * swmm_transect_id(SWMM_Engine engine, int idx)
Get the string identifier of a transect by index.
Definition openswmm_infrastructure_impl.cpp:85
SWMM_ENGINE_API int swmm_lid_set_drainmat(SWMM_Engine engine, int idx, double thick, double void_frac, double roughness)
Set the drainage-mat layer properties for a LID control.
Definition openswmm_infrastructure_impl.cpp:627