# Lesson 2 - Modeling Compartments with Dynamically Changing Flows and Volumes

One of the biggest simplifications of the models we have seen so far is that the volumes and flow rates were constant.  In the real world, we would expect the volumes and flows associated with environmental compartments to dynamically change (e.g., responding to seasons, or simply daily fluctuations).

For example, if the inflows or outflows to a pond were higher during one part of the year, perhaps the volume would change accordingly, and we would want to represent this as it could have an impact on concentrations.  How would we represent this?  The answer is that we would build a model (probably inside a separate Container) that represented the flow system.  The volume of water in the pond would be represented using a Reservoir or Pool element (discussed in detail in the Basic Course).

Note: For reasons that will be discussed further later in this Unit, it is highly recommended that Pools, rather than Reservoirs be used.

That element would then be used to define the amount of Water in a mixing Cell representing the pond.  Any inflows and outflows from the pond would also be computed in the flow model and used appropriately when defining Outflows (and Inflows) for the Cell.

The best way to illustrate this is to explore a simple example. Let’s open the model now so we can examine it. Go to the “Examples” subfolder of the “Contaminant Transport Course” folder you should have downloaded and unzipped to your Desktop, and open a model file named ExampleCT9_Dynamic_Ponds.gsm.

This Example actually contains three slightly different flow models (in three different Containers: Flow_Model1, Flow_Model2 and Flow_Model3).  We will examine each separately.

Let’s start by going inside the Flow_Model1 Container.  Conceptually, in this model water flows from a source at a constant rate (28 m3/day) and concentration (1 mg/l) into a well-mixed pond: The initial concentration in the pond is the same as that of the source that is flowing in (1 mg/l). Water is pumped from the pond at a time variable rate (25 m3/day for the first 400 days, and 30 m3/day after 400 days).

You can see that the model consists of a “Flow Model” and a “Mass Transport Model”: Note: In most cases, the “Flow Model” and the “Mass Transport Model” would be in different Containers.  Because they are so simple in this Example they are in the same Container.

In the Flow Model, you can see that the volume in the pond is represented using a Pool element.

As an important aside, it is critical to highlight here that when we use an outflow from a Pool (or Reservoir) to specify an outflow for a pathway, we do not use the requested outflow (in this case, Pumping_From_Pond), but instead use the actual outflow (which is an output of the Pool element): The reason for doing this is discussed in detail in Unit 7, Lesson 5 of the Basic Course. Essentially, the actual outflow is not necessarily always the same as the requested outflow. In this particular example, that is not the case, but as we will see in a later Lesson, it can be.

Since the inflow was constant at 28 m3/day, and the outflow changed from 25 m3/day to 30 m3/day, the pond volume initially increases, and then decreases.  You can see this by running the model and double-clicking on the Pond Volume Time History Result element: Return to Edit Mode so we can look at the three Cell pathways used to represent the Mass Transport Model.  The source is represented by Source_Cell1: This is simply acting as a boundary condition.  As such, we have assigned a “Defined Concentration” (discussed in Unit 6, Lesson 8) for the Cell Inventory. The Amount of Water is simply set to an arbitrary number (since it is not used – the concentration is fixed). There is an outflow from this Cell to the Pond_Cell: Since Pumping_From_Source1 is a constant (28 m3/day), a constant rate of species input (equal to the flow rate times the defined concentration) enters Pond_Cell.

The Pond_Cell is defined as follows: Note that the Amount of Water is defined as the output of the Pool (i.e., it is not constant). An “Initial Inventory” for the Cell Inventory is defined such that the Cell starts with the same concentration as that entering from Source_Cell1.  If you look at the Outflows tab you will see that there is an Outflow to the Sink.  The specified flow rate (Pond.Pumping) changes with time as described above.

It is important to reiterate that the Flow Model and Mass Transport Model are linked (in three ways):

• The volume computed by the Pond Pool is used to specify the Amount of Water in the Pond_Cell.
• The Outflow from Source_Cell1 (and the corresponding Inflow to the Pond_Cell) is specified using the same element (Pumping_From_Source1) that defined the rate of addition to the Pool.
• The Outflow from Pond_Cell (and the corresponding Inflow to the Sink) is specified using an Outflow (Pond.Pumping) which was defined using the same element (Pumping_From_Pond) that defined the rate of withdrawal from the Pool.

Run the model and double-click on the Pond Mass and Concentration Time History Result element: What we see here is that the amount of mass in the pond changes with time, but the concentration stays constant.  This is, of course, what we would expect.  The initial concentration and the concentration in the pond’s Inflow (and Outflow) are the same; hence the concentration stays constant.  The pond volume changes (and hence the total mass is proportional to the volume).

Note: Recall that in Unit 6, Lesson 3 we stated that GoldSim will produce a warning message if the inflow to a Cell is greater than the outflow. In this model, this was the case for the first 400 days, but no warning message was generated.  This is because GoldSim noticed that the Amount of Water was also changing.  In particular, if the volume of Reference Fluid in the Cell is specified in such a way that it can change with time (in this case, because it was defined using a Pool element), GoldSim will not issue the warning message.  Under these circumstances, it is assumed that you are properly tracking the volume of the fluid directly (and hence inflow/outflow imbalances are being explicitly accounted for).

Let’s now look at the Flow_Model2 Container. In this model, as in the first model, water flows from a source at a constant rate (28 m3/day) and concentration (1 mg/l) into a pond, and the initial concentration in the pond is the same as that of the source that is flowing in (1 mg/l).

In the first model, water was pumped from the pond at a time variable rate (25 m3/day for the first 400 days, and 30 m3/day after 400 days). But in this model, water leaves the pond in two different ways: In particular,

• Water is pumped from the pond at a rate of 25 m3/day for the first 400 days, and 0 m3/day after 400 days).
• Water evaporates from the pond at a rate of 0 m3/day for the first 400 days, and 30 m3/day after 400 days). (Physically, you can imagine that the pond had a floating cover to prevent evaporation for the first 400 days.)

To represent this, if you open the Pool element, you will see that the Pond has two Outflows: the pumping rate and the evaporation. Note that the additions and withdrawals of water from the pond are identical to that for the first flow model we looked at (the sum of the pumping and evaporation for this model is identical to the pumping for the first model).  As a result, if you run the model and double-click on the Pond Volume Time History Result element, you will see that the pond volume behaves identically to that of the first flow model.

However, there is an important difference in this model.  Whereas the evaporation rate impacts the Pool (and hence the volume of water in the pond), it does not directly affect the Mass Transport Model.  That is, the only specified Outflow from the Pond_Cell is due to pumping.  The Evaporation_From_Pond does not appear as an Outflow for the Cell. That is, while the Pool had two outflows, the Cell only has one Outflow. This is because Outflows from a Cell are only specified for flows that transport mass.  Evaporation does not transport mass (and hence is not represented by an Outflow from the Cell).  It does, of course, affect the Amount of Water in the Cell (since this is computed by the Pool element, for which the evaporation rate is specified as an outflow).

Note: This is precisely why it is recommended that Pools (rather than Reservoirs) be used to build flow models that will be used by Cells. Pools have a separate output for each outflow, while Reservoirs do not.  Hence, it is much easier to specify Cell Outflows using Pools than Reservoirs.

Double-click on the Pond Mass and Concentration Time History Result element: As you can see, this produces a very different result than the first flow model.  So what is happening here? For the first 400 days, the behavior is identical to the first flow model (since during that time the two flow models are identical). The concentration stays constant.  After 400 days, water is still withdrawn from the system via evaporation (and hence the volume decreases), but no mass is removed from the system (and hence you can see that it increases linearly).  This mass increase, combined with the volume decrease results in the increasing concentration.

Note: If we ran this model long enough, the volume would eventually go to zero.  As we will discuss in a subsequent Lesson, such a system can cause GoldSim to compute inaccurate concentrations and mass transfer rates as the volume approaches zero, and some special steps need to be taken to minimize these problems.

Let’s now look at the Flow_Model3 Container. This is a mixing example. In this model, the pond volume stays constant, but the various Inflows and Outflows change.  In particular, water from two different sources enter the pond:

• Water flows from one source at a constant rate (25 m3/day) and concentration (1 mg/l).
• After 400 days, water flows from a second source at a constant rate (25 m3/day) but at a lower concentration (0.1 mg/l). Prior to 400 days, the flow rate from this second source is zero.
• Water is pumped from the pond at a rate of 25 m3/day for the first 400 days and 50 m3/day thereafter (thereby maintaining a flow balance and constant volume). The pond starts with an initial concentration that is the same as what is entering from first source.

The two sources are represented by two different Cells, each with a “Defined Concentration” for the Cell Inventory: Double-click on the Pond Mass and Concentration Time History Result element: During the first 400 days, nothing is changing (the volume is constant and the inflow concentration is the same as the initial concentration). After 400 days, however, the second source starts to flow (at the same rate as the first) into the pond (and the outflow doubles so as to maintain the flow balance). Because the second source has a lower concentration than the first (one tenth), it acts to dilute the concentration in the pond.  Eventually, the pond reaches a new steady state concentration (equal to average concentration of the two sources).

These three examples are simple, but clearly demonstrate how you would go about specifying varying flows and volumes for environmental compartments.  In the next Lesson, we will work through an Exercise to build upon this.