← Articles
Computational studyWater & environment

Time-step and outlet-model effects in detention routing

CivilSpectra Technical Collection

Illustrative study · No peer review · 2026CX-T0036 pages8 min read

Abstract

A detention-routing calculation can satisfy mass balance while estimating peak storage inaccurately. This study examines the effects of the outlet relation, time integration and output sampling for a triangular inflow with a total volume of 720 m³. An ideal constant-capacity outlet of 0.10 m³/s produces a peak storage of 405 m³ at 52.5 minutes. A linear reservoir with a time constant of 900 s gives 247.845 m³ at 39.346 minutes, reflecting its different storage-outflow relation. For the linear reservoir, backward Euler and trapezoidal integration are compared with an analytical solution using six time steps from 600 to 18.75 s. Both methods close their discrete mass budgets to within 4 × 10⁻¹² m³. At a 600 s step, however, maximum endpoint errors are 27.130 and 4.099 m³, respectively. Refinement reduces these errors to 1.101 and 0.003863 m³. The trapezoidal estimate of peak storage changes non-monotonically because the continuous peak falls between output times. These results show that mass balance, integration accuracy and peak sampling should be assessed separately, with the outlet assumptions stated explicitly.

Keywords detention routing; continuity; Modified Puls; time-step convergence; peak storage; analytical benchmark

Notation and units
Symbols used in this paper
SymbolUnitMeaning
I, Om³/sInflow and outflow rates
Sm³Stored volume
KsLinear storage time constant
cm³/sIdeal constant outlet capacity
T, ΔtsTime to inflow peak and time step
am³/s²Rising-limb inflow slope

1. Introduction

Mass balance is a fundamental check in detention routing, but agreement between cumulative inflow, outflow and final storage does not establish the accuracy of the storage history. A numerical scheme may conserve water while shifting the magnitude or timing of the peak. The assumed outlet relation introduces a separate source of variation that remains even when the time step is refined.

Level-pool routing combines continuity with a storage-outflow relationship. HEC-HMS documentation describes this coupling and the trapezoidal formulation used in Modified Puls routing (USACE, Reservoir modeling concepts and equations; USACE, Modified Puls model). Outlet discharge may also depend on stage, geometry and downstream conditions, as discussed in the SWMM hydraulics reference (Rossman, 2017). A useful comparison must therefore distinguish the outlet behaviour from the numerical method used to represent it.

The analysis begins with a constant-capacity outlet for which storage can be integrated exactly. A separate linear-reservoir model provides an analytical transient solution against which two time-integration schemes are tested. This arrangement allows endpoint error and peak-sampling error to be examined independently. All cases use a specified inflow hydrograph rather than a calibrated rainfall-runoff model.

2. Inflow, outlet relations and exact solutions

The prescribed inflow rises from zero to 0.40 m³/s during 1,800 s and falls linearly to zero during the next 1,800 s. Its total volume is 720 m³. Initial storage is zero. There is no infiltration, evaporation, sediment displacement, spillway discharge or capacity limit. The imposed hydrograph is the boundary input; no rainfall-to-runoff transformation or return period is assigned.

In the constant-capacity case, the outlet passes the inflow when storage is empty and inflow is below capacity c. Once water accumulates, discharge is c until the storage is exhausted. This is an ideal control rule rather than the rating of a passive opening. At c = 0.10 m³/s, accumulation begins at 450 s and the maximum occurs at 3,150 s. Integrating the triangular area above the outlet line gives 405 m³. Storage at 3,600 s is 382.5 m³ and drainage completes at 7,425 s.

The second outlet model relates outflow to storage through O = S/K, where K is a time constant in seconds. The reference value is 900 s. This relation permits outflow to increase with storage and is considered independently of the constant-capacity case. For each linear inflow segment, I(t) = at + b, the storage solution contains exponential and linear terms. Storage is continuous at the hydrograph apex and at the end of inflow.

For the rising limb, storage is aK[t-K+K exp(-t/K)], with a = 1/4500 m³/s². The falling-limb solution uses the stored volume at 1,800 s as its initial condition. After 3,600 s, storage decays exponentially. The exact peak is found from I = O, giving the peak time in the expression below. This avoids defining the reference peak from a finely sampled plot.

\frac{dS}{dt}=I-O,\quad O=\frac{S}{K}
(1)
S(t)=aK\left[t-K+K e^{-t/K}\right]\quad(0\leq t\leq T)
(2)
t_{\rm peak}=T+K\ln\left(2-e^{-T/K}\right),\quad T=1800\ {\rm s}
(3)

3. Numerical methods and verification metrics

The analytical linear-reservoir solution is used to assess backward Euler and trapezoidal time integration. Backward Euler evaluates inflow and outflow at the new endpoint, whereas the trapezoidal scheme averages their values at successive endpoints. Because outflow is linear in storage, each update can be solved directly without nonlinear iteration.

The six time steps are 600, 300, 150, 75, 37.5 and 18.75 s. Each divides the 1,800 s rising limb exactly. This prevents changing the treatment of the inflow corner while studying convergence. The simulation lasts 7,200 s; the linear reservoir is not artificially emptied at the end. Its residual stored volume remains in the mass balance. The baseline K is held fixed throughout the time-step study.

Maximum endpoint error is measured as the largest absolute difference between numerical and analytical storage at matching times. Peak error compares the largest sampled numerical value with the analytical continuous-time maximum. Mass balance is evaluated separately from accumulated inflow, accumulated outflow and final storage, using the quadrature rule of each scheme. This separates the accuracy of the response from conservation within the discrete equations.

The comparison follows the use of analytical benchmarks for solution verification described by Oberkampf and Trucano (2002). Convergence order is evaluated from endpoint errors. A sampled maximum is less suitable for this purpose because its proximity to the continuous peak changes as the time grid is refined.

S_{n+1}^{BE}=\frac{S_n+\Delta t I_{n+1}}{1+\Delta t/K}
(4)
S_{n+1}^{TR}=\frac{(1-\Delta t/(2K))S_n+\Delta t(I_n+I_{n+1})/2}{1+\Delta t/(2K)}
(5)
Table 1. Time-step study for K = 900 s. Peak error is signed relative to the exact continuous-time maximum.
Step (s)MethodMax. error (m³)Peak error (%)
600Backward Euler27.1295-8.2783
600Trapezoidal4.098651.37369
300Backward Euler15.2962-4.97288
300Trapezoidal0.9916380.273567
150Backward Euler8.22833-2.71307
150Trapezoidal0.2479750.0163014
75Backward Euler4.27493-1.35784
75Trapezoidal0.0618383-0.0389542
37.5Backward Euler2.18003-0.703927
37.5Trapezoidal0.01545030.00489991
18.75Backward Euler1.10107-0.357169
18.75Trapezoidal0.003862750.00112452
Maximum endpoint error versus time step. The two methods approach first- and second-order convergence, respectively.
Figure 1. Maximum endpoint error versus time step. The two methods approach first- and second-order convergence, respectively.

4. Results and outlet sensitivity

The analytical linear-reservoir solution reaches 247.845373 m³ at 39.346219 minutes, with an outflow of 0.275384 m³/s. At 60 minutes, storage is 134.576113 m³. The constant-capacity case instead reaches 405 m³ at 52.5 minutes. This larger storage reflects its restricted discharge of 0.10 m³/s, whereas outflow from the linear reservoir can exceed that value. The difference therefore follows from the outlet assumptions.

At a 600 s interval, backward Euler has a maximum endpoint error of 27.1295 m³ and underestimates the continuous peak by 8.278%. The trapezoidal method has a maximum endpoint error of 4.09865 m³ and a sampled peak 1.374% above the reference. At 18.75 s, endpoint errors fall to 1.10107 and 0.00386275 m³. The backward-Euler ratio between successive fine-grid errors approaches two; the trapezoidal ratio approaches four.

Despite the endpoint errors, both schemes close their discrete mass budgets to within 4 × 10⁻¹² m³. In the coarse backward-Euler calculation, this small residual accompanies a maximum storage error of about 27 m³. The scheme satisfies continuity for its approximate states, so the mass residual alone gives little indication of the accuracy of those states.

Trapezoidal sampled peak error changes sign: it is about +0.0163% at 150 s, -0.0390% at 75 s and +0.00490% at 37.5 s. Endpoint convergence remains orderly. The sign changes arise because the continuous maximum is not generally an output point, while endpoint integration error has its own sign and magnitude. Reporting the peak time and output interval helps readers distinguish these effects.

Outlet sensitivity is substantial in both model families. Constant capacities of 0.05, 0.10, 0.15 and 0.20 m³/s give exact peak storages of 551.25, 405, 281.25 and 180 m³. Separately, increasing the linear-reservoir K from 450 to 1,800 s raises peak storage from 149.222 to 367.286 m³ and delays its occurrence. These are prescribed scenarios, with no probability assigned to any outlet parameter.

Table 2. Exact constant-capacity cases. Emptying time includes the post-inflow drainage period.
Capacity (m³/s)Peak storage (m³)Peak time (min)Empty at (min)
0.05551.2556.25241.875
0.140552.5123.75
0.15281.2548.7585.625
0.21804567.5
Exact storage histories under two distinct outlet assumptions. The difference is model choice, not numerical error.
Figure 2. Exact storage histories under two distinct outlet assumptions. The difference is model choice, not numerical error.

5. Practical interpretation and limitations

The outlet relation determines how a storage result should be interpreted. A controlled release, a linear reservoir and a stage-dependent orifice can all satisfy continuity while producing different maxima. In this comparison, the outlets have no common geometry or downstream constraint. Their storage histories illustrate the consequences of the assumed discharge behaviour, rather than provide a basis for ranking detention assets.

The prescribed outlet variations describe sensitivity to selected parameter values. Assigning probabilities would require evidence about the parameters and their dependence, consistent with the NIST uncertainty-propagation framework. Rainfall, hydrograph shape and rating-curve uncertainties would also need to be included when extending the calculation to a project.

The trapezoidal scheme is accurate for the tested linear relation and positive steps, but the result should not be generalised to every nonlinear storage model. Dry-state constraints, abrupt control changes and spillway activation require additional event treatment. Level-pool assumptions also omit momentum and spatial water-surface gradients. Rossman (2017) describes a broader hydraulic setting in which backwater and other network effects matter; none is represented here.

A practical verification process should compare the solver with an analytical or independently obtained reference, refine the time step around relevant hydrograph events, and calculate the mass residual using the implemented update rule. Peak finding should also be checked independently of the plotting interval. Subsequent field validation would require observed stages or outflows, a supported rating curve and estimates of measurement uncertainty.

Table 3. Exact sensitivity to the linear storage time constant, evaluated independently of the numerical time step.
K (s)Peak time (min)Peak storage (m³)Peak outflow (m³/s)Storage at 60 min (m³)
45035.1296149.2220.33160543.3667
67537.4001203.3990.30133287.6684
90039.3462247.8450.275384134.576
1,35042.4159316.5150.234455219.627
1,80044.6964367.2860.204048287.695
Increasing K changes both the magnitude and timing of the exact linear-reservoir peak.
Figure 3. Increasing K changes both the magnitude and timing of the exact linear-reservoir peak.

6. Reproducibility and conclusions

The accompanying program evaluates both analytical trajectories and the two time-stepping schemes, exports the comparison tables and includes residual storage in each mass budget. NumPy is the only third-party calculation dependency (Harris et al., 2020). The specified inputs, units and separate output files allow the calculations to be reproduced and reused (Wilkinson et al., 2016).

For the prescribed linear reservoir, both schemes conserve water, but their endpoint errors differ substantially. Time-step refinement reveals the expected convergence orders, while peak estimates are also influenced by the position of output times relative to the continuous maximum. The outlet comparison shows a further dependence on the physical relation being solved. A routing assessment should therefore report mass balance together with integration accuracy, peak resolution and outlet assumptions.

Declarations

Data and code availability

The calculations use specified numerical scenarios. No field or laboratory measurements were used. The accompanying files provide the calculation code, input values, result tables and software environment.

Funding and competing interests

This study was prepared for the CivilSpectra technical collection. No external research funding or sponsorship is claimed.

Editorial status

This article forms part of the journal’s illustrative technical collection and has not undergone peer review.

References

  1. US Army Corps of Engineers (n.d.). HEC-HMS Technical Reference Manual: Reservoir modeling concepts and equations. Accessed 7 November 2026. Source ↗
  2. US Army Corps of Engineers (n.d.). HEC-HMS Technical Reference Manual: Modified Puls model. Accessed 7 November 2026. Source ↗
  3. Rossman, L.A. (2017). Storm Water Management Model Reference Manual, Volume II: Hydraulics. US Environmental Protection Agency, EPA/600/R-17/111. Source ↗
  4. Oberkampf, W.L. and Trucano, T.G. (2002). Verification and validation in computational fluid dynamics. Progress in Aerospace Sciences, 38(3), 209-272. Source ↗
  5. Taylor, B.N. and Kuyatt, C.E. (1994). Guidelines for Evaluating and Expressing the Uncertainty of NIST Measurement Results. NIST Technical Note 1297, Appendix A. Source ↗
  6. Harris, C.R., Millman, K.J., van der Walt, S.J., et al. (2020). Array programming with NumPy. Nature, 585, 357-362. Source ↗
  7. Wilkinson, M.D., Dumontier, M., Aalbersberg, I.J., et al. (2016). The FAIR Guiding Principles for scientific data management and stewardship. Scientific Data, 3, 160018. Source ↗