# Ecotracer with Ecosim: tips for dynamic environmental contaminant concentration

19 views

### Thomas Seyer

Jul 17, 2023, 10:29:52 AM7/17/23
to EwE users
Hello everyone,

Here are few recommandations for people struggling to set a dynamic environmental contaminant concentration. They  are the result from the help I received from Kieran Tierney, University of Strathclyde.

Context:
I wanted to simulate an accidental release of radionuclides on the southern coast of France (some kind of Fukushima scenario). I had a geochimical model to calculate the corresponding concentration in my modelled area, which are caracterized by a huge increase the first month (so right at the first time step), followed by a rapid decline, due to physical transport out of the area.

The problem was how to drive the environmental concentration without being able to directly force that variable (you can only force the inflow rate).

First, lets clarify a few things:
-you can force the inflow rate through a forcing function. You have to build that function first in Ecosim/forcing function. The easiest way is to use the "Values..." button and copy/paste the values from an excel sheet.

-the values of the forcing function are relative to the Base Inflow Rate, so 0.5 in the function means half of the base inflow rate for that time step.

-to associate the forcing function to ecotracer, you have to select it in the drop-down menu "environmental inflow forcing function"

Now, as one can only drive the inflow and not the loss (this value is static), it is not straightfoward to drive the environmental concentration. To do so, one method is to set the loss high enough to remove everything at each time step and set your inflow to the exact environmental concentration you want at that time step. I will explain how to do that below but first, keep in mind that it is based on the assumption that the amount of contaminant taken by the groups is small compare to the environmental concentration (by "erasing" the previous concentration with a high loss, you are loosing the information of how the uptake by the groups impacted your envrionmental concentration).

So, the loss should be set to 1000 to remove everything in one time step (counter intuitively, not 12 ; it is related to the number of default sub time step of Ecotracer, which is 1000).
The base inflow rate can be set to your expected environmental concentration value at step one x1000 (x1000 is necessary to be scaled with the loss of 1000, which would otherwise lower you final value). Choosing the base inflow rate according to your first value isn't mandatory, but it makes the values of the forcing function clearer.
The forcing function values are calculated as follow: the expected environmental concentration at time N x 1000 / base inflow rate. In other terms, the expected environmental concentration at time N /  the expected environmental concentration at time 1.