Concurrent and Countercurrent Exchange

Envision It! Workshop
Arlington High School
Saint Paul, Minnesota
July 15, 1997

Steve McKelvey
Mathematics Department
Saint Olaf College

Introduction

The concurrent and countercurrent flow models presented in this document are representative of computational models used in industry but are still accessible to junior and senior high school students. The goal here is to present these models in the context of the Stella modeling language. You will be given complete Stella code for these models which you are free, in fact encouraged, to modify as you see fit for classroom use.

I would like to acknowledge David Misemer of 3M Corporation, a presenter and planner for the Envision It! workshop, for his sugggestion that we incorporate the concurrent and countercurrent exchange models into this summer's Envision It! curricula.

Concurrent and Countercurrent Exchange

These models involve the exchange of a dissolved material from a high concentration solution to a low concentration solution where the solutions are separated by a permeable membrane. This type of exchange is very common in biological and industrial applications.

As an example, consider your everyday Minnesota walleye. As our walleye swims through our favorite lake, searching out nightcrawlers or leaches, oxygen is removed from its blood to be used in the process of locomotion. The resulting oxygen poor blood is then sent to the fish's gills where a permeable membrane separates it from the lake's oxygen rich water. As the blood moves through capillaries in the gills, water is also flowing through the gills. As these two fluids are passing the permeable membrane oxygen is transferred from the lake water (high oxygen concentration) to the fish's blood (low oxygen concentration). With its oxygen concentration restored, the blood returns to the internal organs to deliver its cargo.

In the example above, the dissolved substance is desirable. In industrial applications the dissolved substance is often a contaminant and the goal of the exchange is to remove the contaminant from a product flow. A concrete example would be water purification, where a soluable contaminant is present in significant quantities and it is important to remove this contaminant before the water is released into the environment. In this situation the contaminated water would flow past a permeable membrane situated so that a second fluid with very low contaminant concentrations is flowing on the opposite side of the membrane. In this situation the contaminant would flow from the water (high contaminant concentration) into the second substance (low contaminant concentration).

In both concurrent and countercurrent exchange, the experimental (or industrial) apparatus can be thought of as two parallel pipes separated by a permeable membrane. Important parameters in the process include the speed of each fluid and the length of the parallel pipes.

Another important consideration is the relative direction of flow of the two fluids. Will the fluids be moving in the same direction as they move through their respective pipes, or will they be moving in opposite directions? The answer to this questions distinquishes concurrent exchange from countercurrent exchange.

In concurrent exchange the two fluids move in the same direction as they pass through the pipes. In countercurrent exchange the fluids move in opposite directions.

Important questions concerning this exchange process are amenable to analysis by computational modeling. Such questions include:

  1. How long should the parallel pipes be to perform a given amount of solute transfer?
  2. Should the fluids be moving at different or identical speeds?
  3. Should the fluids be moving quickly or slowly?
  4. Is either concurrent or countercurrent exchange always more efficient than the other?

It is the goal of the rest of this project to allow you to answer these questions.

The Stella Model for Exchange

The equations which describe the exchange process are examples of partial differential equations. These equations involve rates of change over both space and time simultaneously. Unfortunately, the Stella software is designed to use rate of change over only one quantity, usually time. We'll have to use some stupid Stella tricks to get Stella to solve the exchange problem, but it turns out these tricks are enlightening as well.

To ease into this complexity we will develop a simple case first and then extend this simple model into the full fledged situation.

One technical point, all the models presented in this paper assume that both pipelines have constant and equal cross-sectional areas. This allows us to equate the notions of contaminant concentration and contaminant quantity. With pipes of equal cross sectional areas the two quantities differ by only a multiplicative constant, avoiding some straightforward but tedious conversions.

Concurrent Flow, Equal Speeds

Here we model the situation where both the high and low concentration fluids are moving through the pipes in the same direction and at identical speeds. This is identical to the situation where the fluids are not moving at all, but are left in contact with each other for a finite period of time. For example, if the two fluids are moving through six meter pipes at two meters per second, the exchange between the fluids would be identical to a situation where the fluids are motionless but separated after three seconds of contact. The length of contact, three seconds, was determined by dividing the length of the pipes by the velocity of the fluids through the pipes.

The advantage of thinking of the process in terms of motionless exchange is that the resulting model does not contain any terms involving rates of change through space, but is instead a model using only rates of change in time, something Stella is perfectly designed to handle.

The Stella model consists of two reservoirs labeled High Conc and Low Conc. The values in these reservoirs is the concentration of the solute in each fluid as time passes. These reservoirs are connected with a valve labeled exchange which regulates how quickly solute is moving from the high concentration solution to the low concentration solution. The formula in this valve uses two parameters, labeled rate and rho. The larger the value of rate the quicker the solute moves between fluids. The value of rho determines when the equilibrium concentrations of the solute in the two fluids.

It is often the case that the two fluids may have different affinities for the solute. This, along with the characteristics of the permeable membrane, routinely lead to situations where the equilibrium concentrations (the concentrations that would be achieved if the fluids were left in contact for a very long period of time) are different in the two fluids. The parameter rho describes this situation. In fact, the value of rho is the ratio of the equilibrium concentration of the high concentration solution to the equilibrium concentration of the low concentration solution. Thus, if rho had a value of 2, the equilibrium concentration of the high concentration solution would be twice the concentration of the other fluid. Values of rho less than one are also possible.

The exact equation in the exchange valve of the Stella model is

rate*(High_Conc - rho*Low_Conc).

To run the model place the initial concentration of both fluids in each reservoir as that reservoir's initial condition. Under the RUN menu use the TIME RANGE commands to set the Stella model to run for the length of time the fluids will be in contact (determined by the speed of the fluids and the length of pipe, as discussed earlier). It is probably best to leave the DT at the Stella default of 0.25. Add any animations or graphs you want and run the model.

Click here for the Stella diagram of this model.

Concurrent Flow, Differing Speeds

When differing fluid speeds are introduced into the model it becomes necessary to explicitly model the physical pipes in the apparatus. This extra work is necessary because the two fluids "slip" with respect to each other as time progresses. Since the rate of solute exchange depends on the relative concentrations of solute in the fluids at adjacent points along the permeable membrane, we must explicitly keep track of the position of each flowing fluid, bookkeeping we did not need to undertake in the simpler model.

To accomplish this bookkeeping in a perfect way, we would need to divide each pipe into infinitely many infinitely small cross sections and maintain information on solute concentrations in each cross section. Since these concentrations are also changing with time it is necessary, for perfect modeling, to recompute all the concentrations after time steps which are infinitely small as well.

The partial differential equation describing the exchange process does precisely this. Since our interest is in using Stella we must adopt a different strategy. We will chop our pipes into an equal (finite) number of short (but not infintesimal) lengths. The time steps will also be short but not infintesimal.

In the development which follows, solute concentration and solute quantity will be used somewhat interchangably. This is valid only if both pipes have identical cross sectional area. If this is not the case it is important to make some substantial adjustments in the Stella model.

In the example each pipe has been split into five segments, each represented by a reservoir. Valves are located between these reservoirs in the direction of the fluid flow. The length of pipe modeled by each of these segments, known as delta_x, is determined by dividing the common length of the pipes by the number of segments (reservoirs) used in the model. More accurate models are created by using more segments, but more segments also makes for more congested Stella models.

The valves connecting sections of the same pipe represent the movement of solute down the pipes as time progresses.

Valves also point from one column to the other. These valves represent the diffusion of solute across the permeable membrane from one fluid to another.

The formulas for these diffusion valves are identical to those found in the simpler model discussed earlier, namely a parameter k times the difference in concentrations, modified by rho.

The flows between reservoirs of the same pipe are a little more complicated. If the fluid in a pipe is moving at the speed v then the fraction of the solute which moves from one reservoir to the downstream reservoir during a time step of length DT is given by:

DT*v/delta_x (A)

where delta_x is the length of pipe modeled by the reservoir and the asterisk represents multiplication. To find the amount of solute (or, more precisely, concentration of solute) which flows out of the reservoir, we must multiply this fraction by the concentration of solute in the reservoir under study. If we let C stand for this concentration the resulting quantity is:

DT*C*v/delta_x. (B)

Since Stella automatically accounts for the DT term the formula which goes into the diffusion valves is:

C*v/delta_x.

It is important to remember that this Stella model, with its finitely chopped pipes and non-infinitesimal time steps is only an approximation to the real system, the system modeled with partial differential equations. To assure that this approximation is a good one, it is important to choose the time step DT and the number of pipe sections in such a way that

  1. DT and delta_x are both relatively small, and
  2. the value in formula (A) is less than one for each of the pipes, with values close to zero preferred.

Initial conditions must be specified for all reservoirs. In my version of this model I set the concentration in all reservoirs to be the concentration of the incoming fluid, either init conc high or init conc low, depending on which pipe the initialized reservoir lies.

Click here for the Stella diagram of this model.

Countercurrent Flow, Differing Speeds

We've made it through the hard part of this model. Modifying the concurrent flow model into a countercurrent flow model is simply a matter of switching the valves along one pipe to be flowing in the opposite direction. The values and meanings of all the parameters will remain unchanged.

This adaptation, of course, is easier said than done due to the necessity of reentering many of the formulas after the modifications of the valves. You should begin to see why having a large number of pipe sections would be problematic.

Click here for the Stella diagram of this model.

Suggested Exercises

  1. Give the low concentration fluid an initial concentration of zero (free of solute) and the other fluid an initial concentration of 10. Let the rate parameter k take a value of 0.1, give rho the value 1.2 and let v over delta_x a value of 0.1. Using the default Stella stepsize of 0.25, run both models for 12 time units after setting up any animation or graphics you would like to see. Which kind of exchange, countercurrent or concurrent, seems most efficient? Do you suppose the blood passing through a fish's gills flows headward or tailward through the gills? (Assume the fish spends most of its swimming time swimming headward.)
  2. Does the concurrent exchange system appear to exhibit a steady state after sufficient time has passed in the model?
  3. Does the countercurrent exchange system appear to exhibit a steady state after sufficient time has passed in the model?
  4. Experiment with changing the velocity of the two fluids to try to determine what effect increased or decreased velocity has on the efficiency of the exchange.
  5. Experiment with changing the length of pipe carrying the two fluids to try to determine what effect longer or shorter pipes has on the efficiency of the exchange.
  6. Compare the effects of increasing the fluid velocities with the effects of shortening the pipeline lengths.

Disclaimer