# Lesson 2 - Creating an Outflow from a Cell Pathway

The systems we discussed in the previous Unit were very simple (and hence not very interesting), since they were not really transport models at all (as no mass was moving). In this Lesson we will start to discuss how advective transport processes can be defined between Cell pathways.

As we did in the previous Unit, we will introduce the details of the GoldSim Contaminant Transport Module by building (together) a simple example: a model consisting of two well-mixed compartments.

This example consists of two tanks completely filled with water. The tanks are assumed to be continuously and instantaneously mixed. A small quantity of a chemical (named Species1) is introduced into the first tank.  There are no Solids in the tanks, and we will consider just that single species (that does not decay). However, water will flow from the first tank to the second at a constant rate. The various input parameters describing this system are summarized below:

Variable Value
Volume of Water in each Tank 5 m3
Initial Mass of Species1 in first Tank 100 g
Flow Rate between Tanks 0.1 m3/day

If GoldSim is not already open, open it now.  If GoldSim is already open, let’s make sure we start with a new model. From the main menu. Press File | New.  If the model that was previously open had been edited at all, GoldSim will ask if you want to save the model before opening a new model.

This simple example has no Media other than the Reference Fluid Water, and it has a single species (that does not decay).  We can leave the name of that species as the default (Species1). As a result, there is no need to edit anything in the Material Container.

So let’s start by creating the three Data elements we will use for this model: the volume of water in each tank, the initial mass of Species1 in the first tank, and the flow rate from the first tank to the second tank (you may want to put these inside an Inputs Container):

Note: As we saw in the previous Unit, the initial mass input for a pathway requires a vector of Species. In this case, because there is only a single species being simulated, you could actually enter a scalar input (GoldSim would accept that).  However, it would be more correct to create this as a vector of Species (with a single item).

Now that we have created these Data elements, return to the top of the model, and create a new Container named Tanks.  Go inside that Container and insert a Cell pathway.  Name it Tank1, add the Amount of Water and the Initial Inventory:

Make sure to check the and boxes for Water and the Final Values and Time History boxes at the bottom of the dialog in order to save all the results.

Now create another Cell, name it Tank2, add the Amount of Water (but no Initial Inventory):

Again, make sure to check the and boxes for Water and the Final Values and Time History boxes at the bottom of the dialog in order to save all the results.

Close Tank2.  Before continuing on, let’s refresh our memory on the outputs for each Cell.  If you hold your cursor over the output port of either Cell you will see two outputs:

In the examples in the previous Unit we saw that the Cells we created actually had more outputs (because those Cells had additional Media).  GoldSim adds outputs as appropriate depending on the Cell properties.  In fact, as we shall see shortly, a new output will be created when we specify that mass is leaving a Cell via advection.

Now let’s open Tank1. You will note that there are two tabs at the top of the dialog named Inflows and Outflows. We use these tabs to specify advection into and/or out of a Cell. Click on the Outflows tab and press Add Outflow.  When you do so, you will be prompted for the “Pathway to link to” (i.e., the pathway into which water will flow).  Select Tank2 and press OK.  The dialog will look like this:

This dialog provides several inputs.  The first simply indicates that pathway to which you are connecting (you could change it by pressing the Select… button).  The second indicates what Medium is flowing between the Cells (in this case, Water).

Note: As will be discussed in the next Unit, it is also possible for Solids to flow between Cells, with any mass that is partitioning onto those Solids being advected with the Solid.  This could be appropriate, for example, if you wanted to simulate a process such as erosion of contaminated soils.

The third indicates the Link Type.  The default is “Coupled”.  At the end of this Unit, we will explore this option in detail. In almost all cases, the default option is appropriate.

Press OK again and the Outflow will appear in the list:

The dialog indicates that the Medium Water is flowing from Pathway Tank1 to Pathway Tank2 (and it is a Coupled link). Now we need to specify the Flow Rate:

Because the medium that is flowing is a Fluid, the Flow Rate must have dimensions of volume/time.

Close Tank1 and your model should look like this:

You will see an influence drawn between the two Cells. This link between the two pathways is referred to as a mass flux link (as it signifies that mass is being transported between the Cells).  As we shall see, there are different types of mass flux links that can be created.  This is an advective mass flux link.

Note: The influence has a special appearance (a dot at one end).  We will discuss the meaning of this later in this Unit.

Click on the output port for Tank1 and you will see that an Outflows folder has been added:

If we expand this folder, we will see a new output named Water_to_Tank2:

This is the mass transfer rate from Tank1 to Tank2 via this advective flow.  Like the other Cell outputs, it is a vector of Species.

Now open Tank2 and select the Inflows tab:

This is identical to the Outflows tab for Tank1.  When you create a mass flux link using the Outflows tab of one pathway, it automatically appears in the Inflows tab for the linked pathway. The properties of the mass flux link (in this case, the Flow Rate) can be edited from either location.  In fact, we could have created the Outflow from Tank1 to Tank2 by using the Inflows tab of Tank2 rather than the Outflows tab of Tank1.  We are accessing the same information from both locations.

Note: When making advective mass flux links between Cells, you can actually specify a negative Flow Rate.  If you define an Outflow from a Cell, and the Flow Rate becomes negative, mathematically it is treated as an Inflow to that Cell. This can be useful if the flow is reversing during a simulation.

In the next Lesson we will run this model, look at some results, and discuss Inflows and Outflows in a bit more detail.  So if you have not already done so, save your model now (e.g., to the “MyModels” subfolder in the “Contaminant Transport Course” folder on your Desktop).

Note: If you had any trouble building this Example, 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.