Courses: The GoldSim Contaminant Transport Module:
Unit 5 - Building a Simple Model of a Well-Mixed Environmental Compartment
Lesson 5 - Understanding the Species and Element Array Label Sets
As we discussed in Unit 2, you can create and edit sets of Array Labels and use these to create arrays in a GoldSim model. In that Unit, we created several sets of Array Labels manually using the Array Labels dialog (accessed from the main menu by selecting Model | Array Labels…). You may recall that in addition to sets of Array Labels that you create manually in this way, GoldSim provides two example sets of Array Labels: "Days" has seven items (the days of the week); and "Months" has twelve items (the months of the year). An Array Label set may be deleted if it is not referenced in the model.
In addition, there are two sets of Array Labels that are automatically added when the Contaminant Transport Module is activated (they would not be present if you deactivate the module). These are named "Elements" and "Species".
Select Model | Array Labels… now and you will see these:
Now click on the Species set:
Note that it lists this set as having two items (X and Y). Note also that the name of the set and the name of the items cannot be edited here (as they would be if you had manually created a set yourself). If you look at the Elements set it looks identical.
Why can’t these be edited here and how are they defined? As you may have guessed, when you add, delete, or edit species in the Species element, in addition to changing the Species element itself, you are also modifying the Species Array Label set and the Elements Array Label set. In fact, the only way to edit these two sets is through the Species element.
The items in the Species Array Label set are the names of the species defined in the Species element. The Elements array label set is created based on the names of the chemical elements that are assigned to the species when you define their properties. If a species is not defined as an isotope, the chemical element name is the same as the species name. But if a species is defined as an isotope, this will not necessarily be the case. In our example, none of the species are isotopes, so the Species and Elements Array Label Sets are identical. (As we will discuss in Unit 10, when modeling isotopes such as U235 and U238, the Species and Elements Array Label sets will be different).
Note: The order of the species in the Species Array Label set is defined by the Row # in the Species element. You can control this order (via the Species set ordering drop-list) if you wish. The Elements Array Label set, however, is always alphabetical.
So why do we have these two sets and how do we use them? As we shall soon see, many of the inputs to Contaminant Transport Module elements (e.g., partition coefficients and solubilities in environmental media, boundary conditions in pathways) require that you enter a vector of Species (i.e., a vector with an item for each species) or a vector of Elements (i.e., a vector with an item for each chemical element). These two sets allow us to create these.
If we are not simulating isotopes (as will be the case for most of this Course), these sets are identical, so we generally will only define the inputs as vectors of Species. (But as we will discuss in Unit 10, if we are modeling isotopes, some inputs vary by Species, while others vary by Element.)
To illustrate the use of the Species Array Label set, let’s revisit the inputs discussed in Lesson 2 that we have not yet defined:
Variable | Value |
---|---|
Initial Mass of X and Y | 100 g |
Sand Partition Coefficient for X | 2 m3/kg |
Sand Partition Coefficient for Y | 5 m3/kg |
If you think about the first input, it is simply a vector of Species (in which the values for the two items are in this case identical). So to represent this, we would create a Data element that is a vector of Species. Let’s do that now:
- Go to the Inputs Container and insert a Data element (name it Initial_Mass and assign it Display Units of g).
- Press the Type… button, specify the Order as “Vector (1D-Array)” and the Row Labels as Species and click OK.
- Press the Edit Data... button and specify 100 g for both items:
The two partition coefficients also can be entered using a single Data element that is a vector of Species:
- Go to the Inputs Container and insert a Data element (name it Partition_Coefficient and assign it Display Units of m3/kg).
- Press the Type… button, specify the Order as “Vector (1D-Array)” and the Row Labels as Species and click OK.
- Press the Edit Data... button and specify the two different values from the table:
Note: Partition Coefficients are actually properties of an element rather than properties of a species. However, since we are not simulating isotopes, these two Array Label sets are identical (and we can use either one).
As we shall see, we will subsequently use these two vectors as inputs to other Contaminant Transport Module elements.
Make sure you save your model. In the next Lesson, we will discuss environmental media (Fluids and Solids).