Share

#### Fundamentally, environmental engineering consists of understanding and managing change in natural systems.

An example of change is the inflow, outflow, and accumulation of water within a specified volume. Water management is an important component in the design of storage basins and tanks for water and wastewater treatment plants. This is to ensure the tank dimensions provide enough storage to handle the liquid capacity commitment of the facility. As with many challenges encountered by engineers, mathematics can be applied to provide solutions. For this blog post, I would like to take you through how water storage facilities are modeled.

A water storage basin or tank can be analyzed using the principle of mass balance which, in its simplest form, is described by the following:

Mathematically, a formula used to describe a rate of change is written as a differential equation like the following:

For the record, this is called a differential equation because dV/dt is a derivative or differential.

Picture your kitchen sink. If you plug the drain and turn on the faucet, the outflow is equal to zero and the accumulation rate or change in volume of water with time is equal to the inflow. Turn off the faucet and unplug the drain, the opposite will occur as the water volume decreases as it drains. In essence, you can visualize the change in water volume with time (dV/dt) as the water level in your sink rises and falls.

If we have a sink that is filling and draining simultaneously with varying inflow and outflow, things get a little more interesting. Knowing how much the water level will rise or fall can be difficult to predict. During periods where inflow exceeds outflow, storage will be needed to contain the excess water. Otherwise, the sink will overflow. This is especially important with storage basins and tanks at water and wastewater treatment plants which can process millions of gallons of water per day.

To know the required storage, the differential equation must be solved which will provide an expression for volume at a given time. However, differential equations used to describe real-life water storage facilities can be difficult to solve by conventional means prohibiting its creator from obtaining the precious equation for volume.

### Euler’s Method

Euler’s Method is a technique used to approximate solutions to first-order differential equations. Essentially, it estimates the solution by solving the differential equation in a series of tiny steps sequentially starting from a set of initial conditions. All you need is an initial value and the size of each step.

For our example of Euler’s Method applied to water and wastewater engineering, let’s consider a water storage basin where inflow is dependent on the elapsed time and the outflow is controlled by the water level. The net inflow (Qin – Qout) is a function of both time and water height (Qnet (t,y)) resulting in this differential equation.

To apply Euler’s Method, we need to modify the equation and solve for ynew which is the water level after each time step. Let dy = Δy = ynew – yold and dt = Δt. Note that the time derivative of the water height (dy/dt) is converted to a finite change in height over a time interval (Δy/Δt) like the slope of a line.

The only remaining thing to do is select initial conditions and a time step (Δt). Let’s try working with some actual numbers.

For this water basin, our starting conditions are the initial water level (y) and the simulation start time (t = 0). We will assume the water level starts at 2 ft above the basin floor. The rise and fall of the water level will be monitored for 15 hours (900 minutes). If we want to check the water level of the basin every 40 minutes, then Δt = 40 min. Our equation can now be solved little by little through iteration by taking the results of the last calculation and plugging them into the formula to get a new one. This is demonstrated below starting with our established initial conditions.

This process will continue until 900 minutes is reached, signaling the end of the simulation. A graph of the change in water level over time can be created by plotting the results. This is the solution to the differential equation that we need and can answer questions such as, “How high will the water level in the basin get?” or “How long does it take to fill and drain back to its initial water level?”

It is important to understand that solutions produced by Euler’s Method are approximations and have errors. These errors can be minimized by shrinking each time step. Think of this like framerate in cinematography. Lower framerates produce a choppy, less detailed film while higher framerates produce a smoother, more detailed visual experience. As we shrink the time step for our equation, we can see the series of curves converge minimizing the error. The tradeoff for more accuracy is that this increases the number of calculations required. Luckily, we have computers for that!

### Real-World Application of Euler’s Method and Mass Balance

Now consider a large concrete basin like in the photo which is at a wastewater treatment plant.

This is a transfer basin that receives decanted water from an upstream treatment process by gravity flow. This process consists of sequencing batch reactors (SBRs) which are basins that hold wastewater during treatment and release it based on a schedule. The transfer basin discharges water through the three pumps on the above concrete platform. At the time, this facility was undergoing expansion receiving two additional SBRs and pumps with increased capacity.

These modifications had us asking questions about the existing transfer basin such as, “At what water levels do we shut the new pumps on and off so the basin can handle the flow from the system with the two new additional SBRs?” and “How high can we expect the water level to get in the basin?” We also had to account for scenarios where two SBRs release their flow at the same time and if three basins decanted consecutively without any break in between.

We were looking at a situation where inflow and outflow to the basin vary with time and the water level. Sound familiar?This is like our previous example. By setting up an equation using a mass balance on the basin and solving it via Euler’s Method, a mathematical model was set up to analyze the changes in water level over a 24-hour period. The model allowed us to visualize the changes in the basin water level and optimize its operations for the new expansion.

The application of mathematical principles to engineering problems allows us at Chastain-Skillman to be innovative with our solutions. Contact us todayto see how we can use the sophistication and beauty of mathematics to help you with your next engineering project!

## Let’s start the conversation.

Sources:

Cooper, C. D. (2015). 3.5 Numerical Methods. In Introduction to Environmental Engineering (pp. 111–114). essay, Waveland Press, Inc.

Nagle, R. K., Saff, E. B., & Snider, A. D. (2018). 1.4 The Approximation Method of Euler. In Fundamentals of Differential Equations (9th ed., pp. 23–24). essay, Pearson.