![]() |
OpenSWMM Engine
6.0.0-alpha.4
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.4)
|
E6 — the ARD transport configuration surface ([TRANSPORT_OPTIONS], [TRANSPORT_BOUNDARIES], [TRANSPORT_SOURCES]). More...
#include "openswmm_engine.h"Go to the source code of this file.
Typedefs | |
| typedef enum SWMM_TransportDispersionMode | SWMM_TransportDispersionMode |
[TRANSPORT_OPTIONS] DISPERSION mode. | |
Enumerations | |
| enum | SWMM_TransportDispersionMode { SWMM_DISPERSION_OFF = 0 , SWMM_DISPERSION_FISCHER = 1 , SWMM_DISPERSION_VALUE = 2 } |
[TRANSPORT_OPTIONS] DISPERSION mode. More... | |
Functions | |
| SWMM_ENGINE_API int | swmm_transport_get_configured (SWMM_Engine engine, int *configured) |
| 1 if a transport.ard component is configured on the model. | |
| SWMM_ENGINE_API int | swmm_transport_get_dispersion_mode (SWMM_Engine engine, int *mode) |
| The dispersion mode (SWMM_TransportDispersionMode). | |
| SWMM_ENGINE_API int | swmm_transport_set_dispersion_mode (SWMM_Engine engine, int mode) |
| Set the dispersion mode. | |
| SWMM_ENGINE_API int | swmm_transport_get_dispersion_value (SWMM_Engine engine, double *value) |
| VALUE-mode coefficient, display units (ft²/s or m²/s). | |
| SWMM_ENGINE_API int | swmm_transport_set_dispersion_value (SWMM_Engine engine, double value) |
| Set the VALUE-mode coefficient (must be >= 0 and finite). | |
| SWMM_ENGINE_API int | swmm_transport_get_target_dx (SWMM_Engine engine, double *dx) |
TARGET_DX, display length units; 0 means engine default. | |
| SWMM_ENGINE_API int | swmm_transport_set_target_dx (SWMM_Engine engine, double dx) |
Set TARGET_DX (must be >= 0 and finite; 0 restores default). | |
| SWMM_ENGINE_API int | swmm_transport_conduit_disp_count (SWMM_Engine engine, int *count) |
| Number of per-conduit dispersion override rows. | |
| SWMM_ENGINE_API int | swmm_transport_get_conduit_disp (SWMM_Engine engine, int index, int *link_index, double *value) |
Override row index: link index + coefficient (display units). | |
| SWMM_ENGINE_API int | swmm_transport_boundary_count (SWMM_Engine engine, int *count) |
Number of [TRANSPORT_BOUNDARIES] rows (raw, as configured). | |
| SWMM_ENGINE_API int | swmm_transport_get_boundary (SWMM_Engine engine, int index, char *element, int elem_len, char *species, int spec_len, int *is_ts, double *value, char *ts_name, int ts_len) |
Read boundary row index. | |
| SWMM_ENGINE_API int | swmm_transport_source_count (SWMM_Engine engine, int *count) |
Number of [TRANSPORT_SOURCES] rows (raw, as configured). | |
| SWMM_ENGINE_API int | swmm_transport_get_source (SWMM_Engine engine, int index, char *element, int elem_len, char *species, int spec_len, int *is_ts, double *value, char *ts_name, int ts_len) |
Read source row index. Same contract as the boundary reader; value is the VALUE-mode mass rate (species mass units per second; negative = extraction, D-NS1). | |
E6 — the ARD transport configuration surface ([TRANSPORT_OPTIONS], [TRANSPORT_BOUNDARIES], [TRANSPORT_SOURCES]).
The last quality subsystem with no C API of its own: heat, reactions, water age and the pollutant tables all have theirs, and G7g (the dispersion/boundary property editors) was gated on this header existing. Follows openswmm_water_age.h's conventions: values cross the boundary in the CONFIG FILE'S units, the engine's internal units stay internal, and setters mark the config configured so a save renders it.
Boundary/source rows are read-only in this revision. The rows resolve names to indices once, at open (resolveArdTransportRows), with failures fatal there where the row text is available for the diagnostic; a runtime add would need that resolution re-entrant and its failures survivable, which is its own round (recorded in the E6 handoff). Editors read here and write through the component file.
| typedef enum SWMM_TransportDispersionMode SWMM_TransportDispersionMode |
[TRANSPORT_OPTIONS] DISPERSION mode.
| SWMM_ENGINE_API int swmm_transport_boundary_count | ( | SWMM_Engine | engine, |
| int * | count ) |
Number of [TRANSPORT_BOUNDARIES] rows (raw, as configured).
| SWMM_ENGINE_API int swmm_transport_conduit_disp_count | ( | SWMM_Engine | engine, |
| int * | count ) |
Number of per-conduit dispersion override rows.
| SWMM_ENGINE_API int swmm_transport_get_boundary | ( | SWMM_Engine | engine, |
| int | index, | ||
| char * | element, | ||
| int | elem_len, | ||
| char * | species, | ||
| int | spec_len, | ||
| int * | is_ts, | ||
| double * | value, | ||
| char * | ts_name, | ||
| int | ts_len ) |
Read boundary row index.
| element | Node name buffer (may be NULL to skip). |
| elem_len | Its capacity, including the terminator. |
| species | Species name buffer (may be NULL). |
| spec_len | Its capacity. |
| is_ts | 1 if TIMESERIES mode. The series name is returned in ts_name when set; value is the VALUE-mode concentration otherwise (species units). |
| SWMM_ENGINE_API int swmm_transport_get_conduit_disp | ( | SWMM_Engine | engine, |
| int | index, | ||
| int * | link_index, | ||
| double * | value ) |
Override row index: link index + coefficient (display units).
| SWMM_ENGINE_API int swmm_transport_get_configured | ( | SWMM_Engine | engine, |
| int * | configured ) |
1 if a transport.ard component is configured on the model.
| SWMM_ENGINE_API int swmm_transport_get_dispersion_mode | ( | SWMM_Engine | engine, |
| int * | mode ) |
The dispersion mode (SWMM_TransportDispersionMode).
| SWMM_ENGINE_API int swmm_transport_get_dispersion_value | ( | SWMM_Engine | engine, |
| double * | value ) |
VALUE-mode coefficient, display units (ft²/s or m²/s).
| SWMM_ENGINE_API int swmm_transport_get_source | ( | SWMM_Engine | engine, |
| int | index, | ||
| char * | element, | ||
| int | elem_len, | ||
| char * | species, | ||
| int | spec_len, | ||
| int * | is_ts, | ||
| double * | value, | ||
| char * | ts_name, | ||
| int | ts_len ) |
Read source row index. Same contract as the boundary reader; value is the VALUE-mode mass rate (species mass units per second; negative = extraction, D-NS1).
| SWMM_ENGINE_API int swmm_transport_get_target_dx | ( | SWMM_Engine | engine, |
| double * | dx ) |
TARGET_DX, display length units; 0 means engine default.
| SWMM_ENGINE_API int swmm_transport_set_dispersion_mode | ( | SWMM_Engine | engine, |
| int | mode ) |
Set the dispersion mode.
Setting VALUE without a coefficient leaves the previous coefficient in force — set both. Marks the config present.
| SWMM_ENGINE_API int swmm_transport_set_dispersion_value | ( | SWMM_Engine | engine, |
| double | value ) |
Set the VALUE-mode coefficient (must be >= 0 and finite).
| SWMM_ENGINE_API int swmm_transport_set_target_dx | ( | SWMM_Engine | engine, |
| double | dx ) |
Set TARGET_DX (must be >= 0 and finite; 0 restores default).
| SWMM_ENGINE_API int swmm_transport_source_count | ( | SWMM_Engine | engine, |
| int * | count ) |
Number of [TRANSPORT_SOURCES] rows (raw, as configured).