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

E6 — the ARD transport configuration surface ([TRANSPORT_OPTIONS], [TRANSPORT_BOUNDARIES], [TRANSPORT_SOURCES]). More...

#include "openswmm_engine.h"
Include dependency graph for openswmm_transport.h:
This graph shows which files directly or indirectly include this file:

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).
 

Detailed Description

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 Documentation

◆ SWMM_TransportDispersionMode

[TRANSPORT_OPTIONS] DISPERSION mode.

Enumeration Type Documentation

◆ SWMM_TransportDispersionMode

[TRANSPORT_OPTIONS] DISPERSION mode.

Enumerator
SWMM_DISPERSION_OFF 

No global dispersion (per-conduit overrides still apply).

SWMM_DISPERSION_FISCHER 

Fischer et al. (1979) closure from the local hydraulics.

SWMM_DISPERSION_VALUE 

One user coefficient, display len²/s.

Function Documentation

◆ swmm_transport_boundary_count()

SWMM_ENGINE_API int swmm_transport_boundary_count ( SWMM_Engine engine,
int * count )

Number of [TRANSPORT_BOUNDARIES] rows (raw, as configured).

◆ swmm_transport_conduit_disp_count()

SWMM_ENGINE_API int swmm_transport_conduit_disp_count ( SWMM_Engine engine,
int * count )

Number of per-conduit dispersion override rows.

◆ swmm_transport_get_boundary()

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.

Parameters
elementNode name buffer (may be NULL to skip).
elem_lenIts capacity, including the terminator.
speciesSpecies name buffer (may be NULL).
spec_lenIts capacity.
is_ts1 if TIMESERIES mode. The series name is returned in ts_name when set; value is the VALUE-mode concentration otherwise (species units).

◆ swmm_transport_get_conduit_disp()

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_transport_get_configured()

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_transport_get_dispersion_mode()

SWMM_ENGINE_API int swmm_transport_get_dispersion_mode ( SWMM_Engine engine,
int * mode )

The dispersion mode (SWMM_TransportDispersionMode).

◆ swmm_transport_get_dispersion_value()

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_transport_get_source()

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_transport_get_target_dx()

SWMM_ENGINE_API int swmm_transport_get_target_dx ( SWMM_Engine engine,
double * dx )

TARGET_DX, display length units; 0 means engine default.

◆ swmm_transport_set_dispersion_mode()

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_transport_set_dispersion_value()

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_transport_set_target_dx()

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_transport_source_count()

SWMM_ENGINE_API int swmm_transport_source_count ( SWMM_Engine engine,
int * count )

Number of [TRANSPORT_SOURCES] rows (raw, as configured).