Lesson 3 - Understanding Advective Inflows and Outflows
We will start this Lesson by running the simple model we built in the previous Lesson. If you had any trouble building this Example, or you forgot to save your model, you can find the model by going to the “Examples” subfolder of the “Contaminant Transport Course” folder you should have downloaded and unzipped to your Desktop, and opening a model file named ExampleCT5_Two_Tanks.gsm.
By default, new GoldSim models are set up to run for 100 days with a 1-day timestep. We don’t need to change this. Run the model now. When you do so, a dialog will appear alerting you to a warning, and asking if you wish to display the Run Log to view it. Answer No for now; we will revisit this shortly.
Now go to Tank1, left-click on the output port (which will be green since it contains saved results), right-click on Mass_in_Pathway, and select Time History Result…:
Note: You could also have simply right-clicked on the Cell and then selected Time History Result... from the menu. That is, for Cell pathways, the Mass_in_Pathway output is the primary output, so right-clicking on the Cell displays this output.
This shows that the mass in the tank is decreasing (since it is being advected out of the tank). The mass in Tank2 looks like this:
The mass being advected out of Tank1 is being added to Tank2.
At first glance, these results make sense, but there is something unusual going on in this simple model. If we look at Tank1 and Tank2, we have specified an Amount of Water that is constant (5 m3). But we have also stated that Water is flowing (advecting contaminant mass) from Tank1 to Tank2 at a rate of 0.1 m3/day. How can both of those statements be true? They can only be true if we assume that 0.1 m3/day of clean water is entering Tank1 and 0.1 m3/day of clean water is leaving Tank2:
As we shall see later in this Unit, this is exactly the assumption that is made when GoldSim solves the equations. It is important to understand, however, that GoldSim is simply representing the system in exactly the way we have specified. We have stated that the volumes of the tanks are constant and that Water is flowing (and mass is advected) from Tank1 to Tank2, but no other advective mass flux links have been defined. Hence, clean water must be entering Tank1 and leaving Tank2 (in order for the volumes to remain constant).
Though this may seem odd, such a system is actually not unusual at all, and many of the real environmental systems that you simulate will have Cells like Tank1 and Tank2. These kinds of Cells basically represent the boundaries of a system. Tank1 is the upstream boundary and Tank2 is the downstream boundary. In a more realistic model, we would have many pathways between Tank1 and Tank2.
At the upstream boundary of a system, it would not be unusual to have clean water entering the system (e.g., clean surface water or groundwater that is subsequently contaminated when it enters the system of interest). However, at the downstream boundary of a system, it would in fact be quite unusual to have clean water exiting the system. Although there are ways that this could physically happen (e.g., evaporation), in most cases it would not be physically correct. Yet it is likely that EVERY model you build will have at least one Cell like this. Why? Because at some point, you reach the boundary of your system beyond which you are no longer interested in tracking the mass. By definition, such a Cell will have Inflows but no Outflows. It is a sink for mass in the model. As such, we are generally not interested in viewing the results in a sink Cell (since they likely will not be physically meaningful, particularly concentration results).
Let’s now revisit the warning message we saw when we ran the model. We can view the Run Log by selecting Run | View Run Log from the main menu.
If you scroll to the bottom of the Run Log, you will see this warning:
Note: It is important to keep in mind that the Contaminant Transport Module solves the transport equations based on specified media flow rates. It does not itself solve for the media flow rates. This means that you are required to specify a flow model (using the basic GoldSim framework) that produces the media flow rates that can subsequently be used by the Contaminant Transport Module. Warning messages like these are provided in order to remind you to ensure that your flow model is balanced and consistent.
In this case, GoldSim is warning that the inflow to Tank2 is greater than the outflow. Such a warning implies one of two things:
- The flows don’t balance because a mistake has been made (e.g., perhaps you accidently omitted an Inflow or Outflow); or
- The flows don’t balance because the Cell is a sink.
In many cases the warning can be ignored (this is why it is a warning, not a fatal error). GoldSim is providing this warning in order to make sure that the first case is not causing the warning. That is, if the first case was true, hopefully the warning would alert us to the problem. However, if the second case was true, we could ignore the warning.
But as pointed out above, all models will have sinks, so the second case will always occur (resulting in unnecessary warning messages). Fortunately, we can avoid this warning very easily. In particular, if the first four characters of a Cell pathway are “sink” (e.g., Sink, Sink1, sinkA) GoldSim will not generate any warning messages for that Cell (it is not case-sensitive). Try it now on this model (rename Tank2 to Sink_Tank). You will see that the warning goes away. This is useful in two ways: 1) it eliminates the warning message; and 2) it alerts anyone viewing the model that those Cells are sinks.
Note: There is one other situation in which the inflow might exceed the outflow for a Cell: a case where the volume was increasing in the Cell due to the flow imbalance. This, of course, is certainly realistic (and likely quite a common occurrence for many models). We will discuss the case where the volume of water changes in a Cell in the next Unit. For now, it is sufficient to note that if the volume of the Reference Fluid in the Cell is specified as changing with time, GoldSim will not issue the warning message. That is, if the volume is not constant, it is assumed that you are properly tracking the volume of the fluid directly (and hence inflow/outflow imbalances are being explicitly accounted for).
You will note that Tank1 also has a flow imbalance: the outflow exceeds the inflow (which is zero). But GoldSim does not issue a warning message for this. It only issues warnings if the inflow exceeds the outflow. This is because in the former case, this implies clean water is potentially entering the Cell, while in the latter case it implies that clean water is potentially exiting the Cell. The former is physically reasonable (at the upstream boundary of a system, it would not be unusual to have clean water entering the system), while the latter is typically not physically reasonable.
Before we end this Lesson, one other point is important to understand. In this simple model, the Flow Rate was specified as a constant. It is important to note, however, that the Flow Rate that we specify here can be defined to change with time (as can the Amount of Water). We will explore such examples in later Units.