Lesson 6 – Exercise: Modeling a System with Solubility Constraints
Because simulating solubility constraints can be so important, in this Lesson we will do a simple Exercise to make sure you are comfortable building such models. This is similar to the Example we discussed in the previous Lesson, but this time you will attempt to build the model on your own. We will also introduce one other aspect of how solubilities are defined.
Like the Example we worked on together, this problem consists of two Cells (a Tank and a Sink). The Tank contains a constant volume of water, and has a constant outflow. Two species (Organic1 and Organic2) are added to the tank at a specified rate for the first 40 days. These species are organic liquids (that can dissolve in water), and are added directly via a pipe (the actual volume added is negligible). They do not decay. Organic1 has a solubility limit and Organic2 other does not (it is infinitely soluble).
The various input parameters describing this system are summarized below:
|Volume of Water in Tank||10 m3|
|Flow Rate Leaving Tank||0.2 m3/day|
|Molecular Weight of each Species||100 g/mol|
|Solubility of Organic1||1.54E-4 mol/l|
|Solubility of Organic2||unlimited|
|Mass Input Rate (for each Species) into Tank||10 g/day for first 40 days, 0 g/day afterward|
To create this model, you should start with a new model and follow these steps:
- Edit the Species element to rename the first species to Organic1 and add a second species named Organic2. Assign a Weight for each species (these can be entered directly as values).
- Create Data elements for the inputs in the table above (except for the Molecular Weights, which can be entered directly as values in step 1). Note that Solubility and the Mass Input Rate should be defined as a vector of species (the Mass Input Rate will need to be an Expression).
- Edit the Water element to define the solubility (using a vector).
- Create a Cell representing the Tank with the specified amount of water and mass input rate. Make sure you check the boxes to save the concentration history (the H next to the Water), the mass in the pathway (Time History under Save Masses in Pathway) and the precipitated mass (Output Precipitated Mass under Save Masses in Pathway).
- Create a Cell representing the Sink (assign it a volume of 1 m3)
- Create an advective mass flux link from the Tank to the Sink.
- The Duration (100 days) and the Timestep (1 day) can remain unchanged.
Stop now and try to build and run 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 ExerciseCT8.gsm). If, and only if, you get stuck, open and look at the worked out Exercise (ExerciseCT8_Solubility.gsm in the “Exercises” subfolder) to help you finish the model.
Let’s walk through the model now. It should look something like this:
Let’s start by opening the Species element:
The key point to note here is that we have specified a Weight for these species. We have not specified this before. This represents the molecular (or atomic) weight of the species. As we shall see below, this is used when solubilities are specified in terms of moles rather than mass. The Weight converts moles to mass. As we will discuss in Unit 10, this input is also used (when using the RT Module) to compute the mass of reactants produced based on the stoichiometry which is specified and is required in order to compute the specific activity of radioactive species. Note that this must be entered as a number (it does not accept links).
It should be noted here that the Species element has an output that is a vector of the Molecular (or Atomic) Weights for each of the species:
This vector allows you to easily convert an input or output vector of mass to moles (or moles to mass):
Next let’s look at the inputs for this Exercise. First, we will look at how the Solubility was defined. It should have been defined in a Data element that looks like this:
A realistic value was specified for Organic1, but Organic2 was assigned a value of -1 mol/l (which indicates to GoldSim that this species is infinitely soluble).
Now return to the Material Container and open the Water element:
By default, the Solubilities field looks like the Relative Diffusivities field (directly above). That is, by default, the vector is defined locally, which means that you can edit it directly from this dialog (by pressing the Edit… button to the right of the input field). However, you will rarely want to do that (and we don’t want to do that here). This is because it is much better to create a single element (a vector) containing all of the values, as opposed to entering each separately. To do so, you would need to press the Clr button (and answer Yes to the prompt). This then clears the local vector, and makes the edit field available to you for entering a link. That is what has been done above.
One more point should be noted here. Just to the right of the Solubilities field (to the right of the Clr button) is a field with a unit (in this case, mol/l). You can use this to define the dimensions that the Solubilities will be entered. The units you enter here must either have dimensions of moles/volume or mass/volume. The default is mol/l (i.e., moles/volume). In the previous Example, we did not mention it but those units were changed to mg/l so we could enter the solubilities as mass/volume. If solubilities are specified in terms of moles/volume (as they are in this case), GoldSim must convert them to mass/volume internally (as all calculations are carried out in terms of mass). It does this by using the specified Weight in the Species dialog (the Weight specifies the number of moles per unit mass).
The Tank Cell should look similar to this:
Given the way this model is defined, we would expect the mass of both species to initially increase (for the first 40 days as we add mass at a fairly high rate), and then gradually decrease. Run the model now. We can see the various results saved by GoldSim by clicking on the output port for the element:
Now plot the amount of mass in the Tank. The result will look like this
Note: The results shown here have been formatted. You can see the changes that have been made by looking at the worked out Exercise. In this particular case, the “Y-Axis Title” has been changed and the “Label” has been changed (actually deleted; when you do so, only the vector labels are displayed). These can be accessed via the Chart Style button and the Edit Properties button, respectively, which can be found at the top of the chart dialog.
To understand why the two species are slightly different (Organic2 is flushed faster than Organic1), plot the concentration in water in the Tank:
As can be seen, the concentration of Organic1 increases until it reaches its solubility limit at approximately 18 days, then stays at that limit until it drops below again just after 90 days. Limiting the concentration to the solubility acts to limit the mass transfer rate.
Finally, plot the amount of precipitated mass:
The amount of precipitated mass of Organic1 increases from the time the concentration reaches the solubility limit (around 18 days) until the mass input stops (at 40 days). It then decreases until the concentration drops below the solubility limit just after 90 days.
One more point is worth noting. When this mass precipitates out of solution, where is it? We said in the last Lesson that the precipitated mass became associated with Solids that were present in the Cell. In this case, there are no Solids, so there is nowhere for the precipitated mass to go. Conceptually (for species that are liquids when not dissolved) you can think that the mass is either floating at the top of the Tank (for liquids that are less dense than water) or sitting at bottom of the Tank (for those that are denser than water). For species that are solids when not dissolved, conceptually you can think that the mass is probably sitting at the bottom of the Tank. Note, however, that in no case does this precipitated mass move with the water. It is effectively “stuck” in the Cell until it dissolves back into solution.