Courses: The GoldSim Contaminant Transport Module:

# Unit 7 - Modeling Complex Transport Processes in Environmental Compartments

# Lesson 11 - Representing Specialized Transport Mechanisms: Treatment

In this Lesson we are going to introduce another specialized transport mechanism that would be very difficult to fully describe and represent accurately using the actual physical and chemical processes controlling them, but can be readily approximated using a simplified approach.

In particular, we are going to discuss how to represent a treatment process. For example, imagine you were modeling a system (e.g., a contaminated site or perhaps a mine) that collected contaminated water at some location. This water was then sent to a tank where some kind of treatment process occurred. The treated water was released back to the system, and the mass that was removed during treatment was effectively removed from the system. Based on the design of that system, you know the “treatment efficiency” (i.e., the fraction of mass entering the treatment tank that is removed). Obviously, the physics and chemistry of such a treatment process would likely be very complex. But rather than modeling the treatment process in detail, we could simply abstract the entire process into a single parameter: the treatment efficiency. The “Fraction of Inflows (Treatment)” mass flux link in GoldSim provides a way to represent this.

To illustrate how to create and use such a mass flux link, we will start with a simple Example, and add a one of these mass flux links to it. This model, named ExampleCT16_Treatment.gsm, can be found in the “Examples” subfolder of the “Contaminant Transport Course” folder. Open it now.

The model contains four Cells (we will create the mass flux links to these Cells together):

For simplicity, all of these Cells contain only Water. The Treatment_Tank Cell represents the actual treatment system (which in reality may be a tank or an entire treatment plant). The Upstream_System Cell represents the “upstream” system that produces water that needs to be treated. In this example, it is defined quite simply (with a Defined Concentration), but in a real model, this would be much more complex. In fact, it is likely that more than one pathway may be directed to the treatment facility. The Sink_Downstream_System is the part of the system that is downstream from the treatment facility. This also is likely to be much more complex in a real model and will consist of many pathways (i.e., it will not necessarily be a sink). In fact, in many systems, water released downstream may eventually recycle through the system and make its way back to the treatment facility. Finally, the Sink_Removed_from_System Cell is where all of the mass removed by the treatment facility is sent (and this often will indeed be a sink).

The model contains three species (A, B and C). Key input parameters can be found in the Inputs Container. In particular, the Incoming_Concentrations from the Upstream_System Cell are 10 mg/l for all three species for the first 50 days, and 20 mg/l afterward. The Treatment_Flow_Rate (moving from Upstream_System to Treatment_Tank to Downstream_System is constant and equal to 100 m3/day).

Let’s create the mass flux links between these Cells together.

First, we need to create an advective mass flux link from the Upstream_System to the Treatment_Tank. We’ve done this before, but we will walk through it now because this time we need to do something different. Open the Upstream_System Cell and go to the **Outflows **tab. Press **Add Outflow**. You will be presented with a dialog for which pathway to link to. Select Treatment_Tank and press **OK**. The following dialog is displayed:

The default is to create an advective outflow of Water (which is what we want to do). However, the default is also to create a “Coupled” link. But that is not what we want to do here. In fact, if we do, no mass will be treated at all! For numerical reasons, when simulating treatment in a Cell, only mass that enters from outside of a Cell’s own Cell net will be treated. This means that only mass that enters via a “Normal” (or “Previous-value”) link will be treated. Mass that enters via a “Coupled” link will not be treated. (We introduced the various link types and Cell nets in Unit 6, Lesson 11).

So we will create a “Normal” link now. To do so, click on the *Link Type* drop-list and select “Normal”:

After you do so (and press **OK**), specify a **Flow Rate **(using the Data element Treatment_Flow_Rate):

This is the rate at which water is entering (and leaving) the treatment facility. Close this dialog.

Before we create any more links, we are going to use an Integrator element to keep track of the cumulative amount of mass that we have added to the Treatment_Tank from upstream. Open the Integrator named Cumulative_Mass_Added that has already been set up for this purpose. Go to the **Rate of Change** field, select the default input (of zero), right-click and select **Insert Link…**. We are going to select the mass transfer rate from the Upstream_System to the Treatment_Tank (integrating this will produce the cumulative amount of mass we have added). To do this, you will need to expand several folders under the Upstream_System, as shown below:

We only need to select the first species (since all are identical). Select this output and press **OK**. Next press the **More **button on the Integrator dialog and check the **Rate of change applies to PREVIOUS timestep** box:

Why are we checking this box? Below, we are going to compare this to the amount of mass in Sink_Removed_from_System. A Cell with inflows and no outflow is mathematically similar to an Integrator. But there is an important difference. By default, the **Rate of Change** for an Integrator is treated as the constant rate of change ** over the next timestep**. However, pathways output mass flux rates that represent rates

*(and when accumulating mass, take this into account). So in order to compare the cumulative mass in Sink_Removed_from_System to the mass we are tracking in the Integrator, we need to make this change (to avoid a one timestep discrepancy).*

**over the previous timestep**Close the Integrator dialog so we can create the other mass flux links.

Open the Treatment_Tank dialog and go the **Outflows **tab. Now we are going to create two different mass flux links from the Treatment_Tank. First, we are going to create an advective mass flux link from the Treatment_Tank to the downstream system (represented by Sink_Downstream_System). This will represent the treated water leaving the treatment facility. We’ve created advective mass flux links many times before, so you should be able to do this easily. Press **Add Outflow**. You will be presented with a dialog for which pathway to link to. Select Sink_Downstream_System and press **OK**. The following dialog is displayed:

In this case you can accept all of the defaults and just press **OK**. After you do so, specify a **Flow Rate** (using the same Data element Treatment_Flow_Rate that we used for the inflow into the Treatment_Tank):

Now we need to simulate the treatment process. To do this, press **Add Outflow** again. You will be presented with a dialog for which pathway to link to. Select Sink_Removed_from_System and press **OK**. The following dialog is displayed:

The default is to create an advective outflow (of Water). But that is not what we want to do here. To create one of the specialized mass flux links, we click on the **Medium **drop-list to display the other choices:

The drop-list displays Water (the only medium shared by both Cells), and then three choices for the specialized mass flux links. We will select “Fraction_of_inflows”. When we do so (and press **OK**), the dialog looks like this:

We now must specify a **Fraction **for this mass flux link. This represents the fraction of mass entering that will be removed (treated). That is, it is the treatment efficiency. This must be a dimensionless vector of species. Enter a link to the existing Data element for this input (Treatment_Efficiency) and then close the Cell dialog.

Your system should now look like this:

Note the difference in the influences. The two links ** from **the Treatment_Tank are Coupled links (as indicated by the small dot at the beginning of the influence). The link

**the Treatment_Tank is a Normal link (there is no small dot at the beginning of the influence).**

*to*Now go to the Inputs container and look at the Treatment_Efficiency Data element (that you specified as the Fraction for the “Fraction_of_inflows” link):

As can be seen, the treatment is ineffective for A (it does not remove any incoming mass), but removes 90% of B and 99% of C.

Before we can run this model, we need to make one additional change. Return to the Mixing_Cells Container. A Time History Result element has been set up to view the amount of mass leaving the treatment facility, and now we need to finish that. Open the element and press **Add Result…** We are going to select the mass transfer rate from the Treatment_Tank to the Sink_Downstream_System. To do this, you will need to expand several folders under the Treatment_Tank, as shown below:

Select this output and press **OK**. Finally, delete the **Label **completely (this will remove the output name from the legend and only show the vector item, simplifying the chart):

Close the dialog and run the model. After doing so, open the Mass Leaving Treatment Result element again to view the chart:

In order to understand this result, recall that the Incoming_Concentrations from the Upstream_System Cell are 10 mg/l for all three species for the first 50 days, and 20 mg/l afterward and the flow rate is constant and equal to 100 m3/day. This means that the three species are entering treatment facility at a rate of 1000 g/day for the first 50 days, and 2000 g/day afterward.

So what we see in this chart is that 0% of the incoming A is removed, 90% of B and 99% of C. Because it takes about 5 days for the treatment tank to turnover (the volume is 500 m3 while the flow rate is 100 m3/day), it takes a bit of time for the concentration in the tank to reach a steady state at the beginning of the simulation and when the incoming concentration changes.

Another way to look at this is to plot the cumulative amount of mass entering the treatment tank and the cumulative amount treated. This is plotted in the Cumulative Mass Removed (which plots the cumulative amount of mass in the Sink_Removed_from_System Cell, as well as the cumulative amount added as represented by the Integrator):

Again, we see that none of A is removed, and more C is removed than B. If you view the **Table **(rather than the **Chart**), you will see that at any point in time 90% of B is removed and 99% of C is removed.

Two points regarding this specialized mass flux link should be noted:

- The fractions (treatment efficiencies) must be non-negative (a negative value will result in a fatal error).
- The fractions do not have to be constant. Just as flow rates for advective mass flux links can change with time, the fractions for Treatment mass flux links can change with time, or indeed with any variable, such as concentration (for a treatment process that is sensitive to concentration).

Finally, before leaving this model and this Lesson, let’s look at one more thing. Double-click on Concentration After Treatment:

This displays the concentration that is leaving the Treatment_Tank and moving downstream. We see that the concentration varies (based on the incoming concentration), and this is what we would expect, as the Treatment mass flux link is removing a specified fraction of the incoming mass.

Note: A completed version of this model, named ExampleCT16_Treatment_Complete.gsm, can be found in the “Examples” subfolder of the “Contaminant Transport Course” folder.

Although this may be appropriate for some types of treatment processes, there are other treatment processes that would not work this way at all. In particular, treatment processes that rely on precipitation reactions may output a fixed concentration for each species. GoldSim does provide a way to simulate such a treatment process (it is one of the options at the bottom of the Medium list, named “Precipitate_transfer_rate“):

However, use of this method requires us to create local solubility limits (i.e., solubility limits that vary depending where you are in the model). We will briefly discuss this specialized mass flux link when we discuss spatially variable solubilities in Unit 12.