Pages

Sunday, July 28, 2024

Hyd-Rant

A couple weeks ago, my father-in-law Scott told us about an incident he heard about in a nearby water system (part of his field of expertise): A local fire department was testing their equipment with water from a fire hydrant, and shut off the valve too quickly. The high volume of water that had been flowing through the pipes slammed into the closed valve, and the resulting pressure wave bounced back and caused issues at other points along the water line. Scott mentioned a couple ways to avoid this: A Kunkle valve is designed to release excess pressure to avoid damaging other points along the line, or the firefighters could simply close the hydrant more slowly.

I was curious if I could adapt the same Lattice Boltzmann simulation I used a couple months ago to show the effect Scott was talking about. I had hoped to try including multiple outlets for the water to represent other customers, but it took me several tries to get the simplest case working: Water flows through a single pipe that closes at one end. In the simulation, when fluid hits a boundary, it bounces off, reversing its direction. This is a change in momentum, which is exactly what a force causes. We can use this change in momentum to find the reaction force (equal and opposite, per Newton) that the water is putting on the pipe.

One issue I encountered with the simulation was the spatial resolution: if we make things too coarse, then closing the valve involves big bricks of wall being added at once, which leads to sharp spikes in force. Increasing the number of pixels helps smooth it out, but then it takes longer to run. I didn't get around to trying to add other pipes to the main line, but I'm still quite pleased with the results.

The animations below shows the horizontal velocity of the water at different points along the pipe: red shades are to the right and blue to the left. The valve begins to close at t=100. For the slowest case, I used 600 steps to close it fully:

The fastest case I tried snaps shut in only 50 steps:

Comparing the two, you can definitely see more, and darker, blue in the fast case, indicating significant ricochet from the valve. to get more quantitative though, we can use the force calculation I outlined to find out how badly we're shaking up the system:

The maximum force is clearly proportional to the time it takes to close, but there's also some interesting oscillation from the right/left flows running into each other. You can also see a bit of the resolution effect I mentioned in the spikes along the curve.

When Scott described this, it actually reminded me of something I experienced growing up: At my parents' house, if you shut off the shower too quickly, there would be a sharp "bang!" when the flowing water hit the valve. This is sometimes called a water hammer, and can damage the pipes in your house, just like this hydrant can affect a whole system!