$$\rightleftharpoonup{xx}$$
$$\longleftharp{xx}$$,
$$\longrightharp{xx}$$,
As surface water moves in a stream, river, or tidal zone it creates head gradients that drive water into and out of the sediments1. In fluvial systems the portion of the streambed sediments where this exchange occurs is known as the hyporheic zone2,3. This zone is important because many nutrients and pollutants are stored, deposited, or transformed within the hyporheic zone4-9. The amount of time a tracer spends in the sediment is called a residence time. Both residence times and the locations of the flow paths affect the transformation processes. Improved understanding of the processes affecting flow through the sediment is needed to predict solute transport in rivers and address large environmental problems resulting from propagation of materials such as nutrients (e.g., coastal hypoxia10,11). In spite of the significance of hyporheic exchange, it is often not described in undergraduate courses in hydrology, fluid mechanics, hydraulics, etc. Educators wishing to add hyporheic exchange to their courses could find it useful to have experimental and numerical visualizations that clearly show this process.
Stream channel sinuosity, surrounding groundwater levels, and streambed topography (i.e., bars, bedforms, and biogenic mounds) all affect hyporheic exchange to varying degrees12-17. This study focused on bedforms, such as dunes and ripples, which are usually key geomorphic features affecting hyporheic flow14,15. We created a numerical simulation and laboratory experiment to visualize flow through a regular series of bedforms. This simulation is based on a body of previous research relating hyporheic flow paths to readily observable system characteristics15,18-21. As this research forms the scientific background for the simulation, a brief summary of the key aspects of the theory follows. Bedform topography, T(x), is given by:
Equation 1:

where H is twice the amplitude of the bedform, k is the wavenumber, and x is the longitudinal dimension parallel to the average streambed surface. An example of this bedform topography is shown in Figure 1.

Figure 1. Parameter definitions and settings controlled by the user. In Interface, tracer particles are released in a flux-weighted manner at the water/sediment interface and tracked through the sediment. If show-paths? is “on” the water tracers mark where they have been, showing their paths. When a tracer returns to the surface water, this changes the total number of tracers in the system, when re-drop? is set to “off”. The cumulative residence time distribution plot shows this change by plotting the ratio of the number of tracers remaining in the sediment bed to the initial number as a function of time. If re-drop? is “on” then tracers that leave the system are replaced in the same flux-weighted manner as original particles, and the cumulative plot is disabled. Please click here to view a larger version of this figure.
| Parameter Name | Units | Definition | Interface | Mousedrop |
| Lambda (λ) | cm | Wavelength of bedform (see Figure 1) |  |  |
| BedformHeight (H) | cm | Twice the bedform amplitude (see Figure 1) |  |  |
| BedDepth (D) | cm | Depth of the sediments (see Figure 1) |  |  |
| HydrCond (K) | cm/s | Hydraulic Conductivity |  |  |
| Porosity (θ) | | Porosity |  |  |
| ChannelVelocity (U) | cm/s | Mean velocity in the surface water or channel |  |  |
| Depth (d) | cm | Water depth (see Figure 1) |  |  |
| Slope (S) | | Slope of the bedforms and water surface |  |  |
| NumParticles | | The number of particles released into the system. |  | |
| TimeX (Time1, Time2..) | min | Time at which each color change occurs | |  |
| Simulation Buttons | | Definition | Interface | Mousedrop |
| Setup | | Set’s up the simulation using parameters shown |  |  |
| go/stop | | Starts and stops the simulation |  |  |
| Step | | Clicking step causes one time step to pass. This allows users to slow down the code and see exactly what happens in 100 sec. |  | |
| clear paths | | Clears all he blue particle paths from the screen |  |  |
| Advance to next time | | This causes the program to run until the next color change time (TimeX) | |  |
| mouse-drop | | This button must be clicked before particles may be placed in the subsurface by clicking on locations in the subsurface. | |  |
| show-paths? | | If show-paths? is “on” the water particles leave a trail of blue showing where they have been (see Figure 1). |  |  |
| re-drop? | | If re-drop? is “on” the particles are replaced in a flux weighted manner for every particle, which exits the system, and the cumulative plot does not work. When a particle exits the hyporheic zone the number of particles in the system decreases if re-drop? is “off” (see Figure 1). |  | |
Table 1. Hyporheic Parameters and Simulation Controls. Each parameter, button, and slider that can be adjusted by the user is given in this table along with a definition.
In this simulation, two processes induce fluid velocity in the sand bed. The first is due to the interactions of the stream flow with bedforms. The velocity head at the water/sediment interface induced by bedforms is also approximately sinusoidal, and shifted by a quarter wavelength from the bedform itself22. The amplitude of the velocity head function at the surface-subsurface interface has been approximated from measurements as16:
Equation 2:

where U is the mean surface water velocity, g is the gravitational constant, and d is the depth of the water (shown in Figure 1). The velocity head function is then given by:
Equation 3:

This head function can then be used to calculate the bedform-based component of the subsurface velocity functions by solving the Laplace equation with a constant sand bed depth20. The second component of the porewater velocity is determined by the slope of the system, S, which corresponds to a gravitational head gradient that yields flow in the downstream direction proportional to
. The final functions for porewater velocity are:
Equation 4:

Equation 5:

where u is the longitudinal velocity component, v is the vertical velocity component, K is the average hydraulic conductivity of the sediment, is the average porosity of the sediments, y is the vertical coordinate, and D is the depth of the sediments.
Particle tracking simulations were created, which use the NetLogo modeling language and simulation platform23. The two implementations (Mousedrop.nlogo and Interface.nlogo) use these equations to model hyporheic flow with the same simulation core. The primary difference is the initial locations of the tracer particles. Mousedrop allows the user to place simulated tracer anywhere within the subsurface. Subsurface velocity equations 4 and 5 are used to move the tracer to simulate dye injection experiments. In Interface, tracer is always placed along the surface/subsurface boundary in a flux-weighted manner. This mimics the delivery of dissolved and suspended material from the surface water into the porewater, which is crucial to understanding hyporheic exchange. The tracer then moves within the subsurface until it again reaches the stream water. Tracing the dye paths in the flume and simulating the paths using NetLogo yields the streamlines of the flowfield, as long as the flow conditions and bedform morphology remain steady during the period of observation. Interface.nlogo creates a cumulative residence time distribution, which shows the ratio of the number of tracer particles remaining in the sediments to the initial number of tracer particles placed at time 0 as a function of time.
As discussed in a recent literature survey24, there remains considerable debate within the educational research community about the relative merits of hands-on laboratory experiments versus simulated labs and computer models. On the one hand, some feel that “hands-on experience is at the heart of learning”25, and caution that cost-savings arguments may be fueling the replacement of hands-on lab activities by computer-based simulations, to the detriment of student understanding26. On the other hand, some researchers in science/engineering education argue that simulations are at least as effective as traditional hands-on labs27, or discuss the benefits of computer-simulation in fostering student-centered “discovery learning”28. While consensus has not been reached, many researchers have concluded that, ideally, computer simulations should supplement, rather than supplant, hands-on laboratory experiments29,30. There have also been initiatives within science and engineering education to simultaneously couple physical experimentation and real-world sensing with computer simulations of the phenomena; see, e.g., “bifocal modeling”31.
Students can gain a deeper conceptual knowledge and a better understanding of the scientific research process by interacting with both a physical system, and a computer-based simulation of that system. This procedure involves having students perform a solute transport experiment that demonstrates gravitational and bedform-induced hyporheic exchange flow, and match their own experimental setup and results with a computer simulation of the same phenomena. This comparison facilitates important student-learning outcomes, and a deeper discussion of the scientific method, and interplay between model/theory-building and empirical validation through data collection. After performing this comparison, students can also take advantage of the benefits of computer-based simulation to quickly explore a multitude of alternative scenarios by changing model parameters.