# Lesson 9 – Exercise: Modeling a Cell Mass Input Rate Boundary Condition

In this Lesson, we will work on an Exercise to become comfortable with simulating a mass input rate boundary condition for a Cell. To do this, we will simply build on the previous Exercise. You should have saved this to the “MyModels” subfolder of the “Contaminant Transport Course” folder on your desktop, and named it ExerciseCT5.gsm. If for some reason you do not have that model, open ExerciseCT5_Advection_Partitioning.gsm in the “Exercises” subfolder.

Recall that this model consists of two tanks containing Water and Sand (and the Sand is not suspended):

There are two species: X (which does not partition onto the Sand) and Y (which does partition onto the Sand). In the original Exercise, 100 g of each species was added to Tank1 at the beginning of the simulation.

In this Exercise, we are simply going to make the following changes:

• Rather than specifying an “Initial Inventory” for Tank1, we will specify an “Input Rate”.
• Rather than having an initial mass, we will add mass to Tank1 at a constant rate equal to 5 g/day for each species.
• Instead of running the simulation for 200 days, we will run it for 500 days.

Schematically, the new model looks like this:

To update this model, you should follow these steps:

1. Open Exercise5.gsm and save the model as ExerciseCT6.gsm in the “MyModels” subfolder of the “Contaminant Transport Course” folder on your desktop (so as not to overwrite ExerciseCT5).
2. Delete the Data element representing the initial amount of mass from the previous Exercise and replace it with a Data element representing the mass input rate (e.g., name it Mass_Input_Rate). This should be defined as a vector of species.  Each item will have a value of 5 g/day.
3. In the Tank1 Cell, in the Cell Inventory section, change “Initial Inventory” to “Input Rate” and specify the input as the Data element created in the previous step.
4. Go to the Simulation Settings and change the Duration to 500 days.

Stop now and try to build the model.

Once you are done with your model, save it to the “MyModels” subfolder of the “Contaminant Transport Course” folder on your desktop (call it ExerciseCT6.gsm). We will revisit this Exercise later in the Course. If, and only if, you get stuck, open and look at the worked out Exercise (ExerciseCT6_Boundary_Condition.gsm in the “Exercises” subfolder) to help you finish the model.

Let’s walk through the model now.

These modifications to the model should have been straightforward, but let’s reiterate the key changes. First let’s look at the Data element for the mass input rate:

The Tank1 Cell should look like this:

If we run the model and double-click on the Result element (displaying the mass in the tanks), the result should look like this:

As can be seen, for a given species, the amount of mass in both tanks eventually reaches a steady state (since we are constantly adding mass). Two things are worth noting:

• X (which does not partition onto the Sand) reaches steady state before Y does.  This makes sense, as X is flushed through the system faster since it does not interact with the Sand.
• The steady state amount of mass of Y is greater than the steady state amount of X.  Why would this be?  The reason is that the tanks have a larger “capacity” to store Y than to store X.  This is because Y is stored not only in the water, but also on the Sand.

Another way to look at these results is to plot the amount of mass of the two species in the Sink Cell.  To do this, you will first need to return to Edit Mode, open the Sink Cell and check Time History in the Save Masses in Pathway section at the bottom of the dialog, rerun the model, and then right-click on the Cell pathway and select Time History Result…:

What we see clearly here is that the amount of mass of X that has been flushed to the Sink is greater than that of Y (whereas recall that the mass of Y in the two tanks is greater than that of X).

Before leaving this Exercise, it is important to discuss one other issue.  In this simple Exercise, we specified an Input Rate boundary condition for the Tank1 Cell (using the Cell Inventory section of the dialog). The Tank2 Cell received mass from Tank1 (via an advective mass flux link), but we did not add any mass to the Tank2 Cell using the Cell Inventory section of the dialog.  It is important to understand, however, that we could do this if we needed to. That is, in this Exercise, we assumed that Tank1 received mass from “outside” the system (which subsequently was advected into Tank2).  But if we wanted to simulate that mass was added directly to both tanks we could have done so by specifying an Input Rate for Tank2 also. That is, Cell pathways (and other pathways) can receive mass in two different ways: 1) from “outside” the system (boundary conditions) and 2) from “inside” the system (mass flux links from other pathways).  There is no reason why a pathway cannot have both. Of course, any pathway can also have a non-zero initial condition (which is also specified via the Cell Inventory section).