HEC-ResSim represents the components of a watershed using a link-node type geometry. Reservoirs are represented as storage elements, with state variables for their total storage, surface elevation and inflows and outflows. Flows are computed at the junctions between reach and reservoir elements. Reaches utilize hydrologic routing methods to transfer flows from one junction to the next, but generally have no knowledge of the volume of water within the reach. An example of a HEC-ResSim network schematic is shown below.

In order to model spatially-variable water quality throughout the system, the reach, reservoir, and junction elements must be discretized and additional geometry information must be passed to the HEC-Water Quality Engine program. Discretization is done for each element in HEC-ResSim independently, and is referred to as a water quality "subdomain".
Reservoir Element Discretization
Reservoirs are discretized using a 1D stack of vertical layers. Information for the volume contained within each layer is taken from the reservoir storage-elevation curve. Interpolation between the storage elevation points is done using linear or conic (frustum) interpolation. The locations of the layer interfaces are user-controlled; they may either be constantly spaced, or at uneven intervals to provide greater resolution near the surface of the reservoir and lower resolution towards the bottom.
Reservoir inflows from upstream junctions are linked to all layers of the reservoir, because variable inflow and layer densities determine what layers the inflows will ultimately enter. Reservoir dam releases and diversions are also linked to all layers of the reservoir for similar reasons. User-entered outlet geometry parameters provide information for the outlet envelope calculations, and which layers will have water withdrawn from them.

Reach Element Discretization
Reaches are discretized with 1D longitudinal cells. Because no reach geometry information is available natively in HEC-ResSim, cross-sectional data from an existing HEC-RAS model covering the water quality modeling domain must be input to the model. Once the HEC-RAS cross-sectional information is input, a reach can be discretized. By default, the boundaries for the water quality cells are taken as the cross-section locations. User controls allow those cells to be combined or split to modify the spatial resolution. An example discretized reach is shown below, with the HEC-RAS cross-section locations shown in green.

Junction Elements
Junctions elements in ResSim are the interfaces between reservoir and reach elements. In the WQ Engine computational geometry, they are not represented using a computational cell. Rather, the inflows and water quality concentrations from upstream elements and local inflows are aggregated and averaged to provide the boundary inflows and concentrations to the downstream elements.