MRN: tracer output

MOHID Land forum. Questions and discussion related to MOHID Land
cyrilgarneau@gmail.com
MOHID Beginner
Posts: 19
Joined: Tue Oct 18, 2011 12:28

MRN: tracer output

Postby cyrilgarneau@gmail.com » Tue Sep 11, 2012 12:03

Hi,

I'm building a River Network in order to model tracers reacting to various hydrodynamic situations.

My problem is that I am unable to inject a tracer (dissolved calcium) through the Discharge module. At the moment, I can impose an initial concentration along the river, but in dynamic simulation, this concentration is not affected by the tracer discharges I add to the river.

My "Drainage_Network" file contains the following added property:

Code: Select all

<beginproperty>
  NAME                          : dissolved calcium
  UNITS                         : mg/l
  DESCRIPTION                   : generic traceur
  TIME_SERIE_COLUMN             : 3
  TIME_SERIE                    : 1
  DISCHARGES                    : 1
<endproperty>


And my "Discharge" file contains the following:

Code: Select all

<begindischarge>
NAME                          : AddedTracer
DESCRIPTION                   : Low Waters
SPATIAL_EMISSION              : Point
NODE_ID                       : 30
DATA_BASE_FILE                : ..\GeneralData\BoundaryConditions\Tracer.dat
FLOW_COLUMN                   :  2
  <beginproperty>
    NAME                          : dissolved calcium
    UNITS                         : g
    DESCRIPTION                   : generic traceur
    TIME_SERIE_COLUMN             : 3
    TIME_SERIE                    : 1
    DISCHARGES                    : 1
  <endproperty>
<enddischarge>

And of course, my discharge input has its three columns (Time, water discharge, tracer discharge).

Did I forgot something?

Thank you for your help.

Cyril Garneau

davidbrito
MOHID Advanced user
Posts: 187
Joined: Thu Jan 01, 1970 00:00

Re: MRN: tracer output

Postby davidbrito » Thu Jan 03, 2013 12:14

Hello Cyril,

I think you already solved the problem but for other users, you need to activate DISCHARGES : 1 in DrainageNetwork input file (it will read discharge file) and inside the property (it will read the discharge property block).

Just as reminder
in property definition in DrainageNetwork file:
TIME_SERIE_COLUMN : 3 has no use since there is no time serie file associated
in property definition in Discharge file:
TIME_SERIE : 1
DISCHARGES : 1
have no use since discharge module does not handle time serie outputs and it knows that it is a discharge.

David

epelde.ane@gmail.com
MOHID Advanced user
Posts: 172
Joined: Thu Jan 01, 1970 00:00

Re: MRN: tracer output

Postby epelde.ane@gmail.com » Thu Apr 11, 2013 12:57

Hello all!

I wanted to simulate an aport of a solute to the river, and to do so I have created a time series with the columns of date, flow and concentration.
After many proves I dont manage to do it so I think I´m missing something. I post here my files so that maybe you can see something.

drainage network:
...
discharges: 1
...
<beginproperty>
NAME : nitrate
UNITS : mgN/l
DESCRIPTION : nitrate
DISCHARGES : 1
ADVECTION_DIFFUSION : 1
DEFAULTVALUE : 0.0
ADVDIFF_MOLECULAR_DIFF_COEF : 0.0
ADVDIFF_METHOD_H : 1 !UpwindOrder1 = 1. UpwindOrder2 = 2. UpwindOrder3 = 3. P2_TVD = 4.
!CentralDif = 5. LeapFrog = 6
ADVDIFF_METHOD_V : 1 !UpwindOrder1 = 1. UpwindOrder2 = 2. UpwindOrder3 = 3. P2_TVD = 4.
!CentralDif = 5. LeapFrog = 6
OUTPUT_HDF : 1
TIME_SERIE : 1
<endproperty>


discharges file:


<begindischarge>
NAME : Node 325
DEPTHBYGRID : 1
NODE_ID : 325
DATA_BASE_FILE : ..\General Data\field data\nitratepulse.srm
FLOW_COLUMN : 2

<beginproperty>
NAME : nitrate
UNITS : mgN/l
DESCRIPTION : nitrate
TIME_SERIE_COLUMN : 3
<endproperty>
<enddischarge>

davidbrito
MOHID Advanced user
Posts: 187
Joined: Thu Jan 01, 1970 00:00

Re: MRN: tracer output

Postby davidbrito » Thu Apr 11, 2013 13:22

Hello Ane,

It seems that you have all needed.

You do not have in DischargesX:
DEFAULT_FLOW_VALUE : 300
and in the property:
DEFAULTVALUE : 19.9

but they are not needed since your are giving it as timeserie. If they were constant the model would ask for them.

Just check that in Drainage Network you have DISCHARGES : 1 (caps lock)


So first you need to check if the flow is realy entering the river.
So put a timeserie before and a timeserie after the discharge and see if it has the increment of flow by the discharge.
If this is working than you can look to the saem place to the concentrations.

Best regards,
David

epelde.ane@gmail.com
MOHID Advanced user
Posts: 172
Joined: Thu Jan 01, 1970 00:00

Re: MRN: tracer output

Postby epelde.ane@gmail.com » Thu Apr 11, 2013 14:21

hello david,

Discharges keyword in drainage network is in capital letters, yes.

But it seems it´s not reading the discharge. It reads if constant value but something fails with time serie. Just in case, I post it here :)

NAME : Station Name
COORD_X : 0
COORD_Y : 0
SERIE_INITIAL_DATA : 2008 1 1 0 0 0
TIME_UNITS : HOURS

hours flow nitrate
<BeginTimeSerie>
0 0 0
119.99 0 0
120 3 10000000000
120.001 0 0
1000 0 0
<EndTimeSerie>


Thanks!

davidbrito
MOHID Advanced user
Posts: 187
Joined: Thu Jan 01, 1970 00:00

Re: MRN: tracer output

Postby davidbrito » Thu Apr 11, 2013 15:52

you are placing a discharge between
05-01-2008 23:59:24
and
06-01-2008 00:00:04

if the model time instants get to before the first date the flow is zero and if they get after the second date the flow is also zero.

So only with much luck the model could get in a 40 second window and do the discharge.

If you did not narrow the values to zero just before and after, the model would start interpolating from zero to the value in the discharge and after.
Or you could force the model to use the data values in a "stair" way (from one data to the other maintain the value) with the keyword
USE_ORIGINAL_VALUES : 1

I would suggest do a discharge in any of these ways and try.

All the best,
David

epelde.ane@gmail.com
MOHID Advanced user
Posts: 172
Joined: Thu Jan 01, 1970 00:00

Re: MRN: tracer output

Postby epelde.ane@gmail.com » Fri Apr 12, 2013 08:32

Hi!

I´ve let the model more time to consider the discharge and I changed the node to prove this in other node (I think I had a problem with the node, sorry), and now its working with a discharge like (and without using USE_ORIGINAL_VALUES):

hours flow nitrate
<BeginTimeSerie>
0 0 0
120.9 0 0
121 15 100000000000
121.1 0 0
1000 0 0
<EndTimeSerie>


The thing is that it is not considering yet the nitrates.. dont know why but in the log, all the time I get:

Discharge : Node 325
----Num of Properties: 0

I think I have tried with everything (cte value, time serie..setting TIME_SERIE_COLUMN in the property block inside drainage network module as Cyril did, ---this is not needed, no?) but nothing.. tell me if you have any idea please!
thank you!

davidbrito
MOHID Advanced user
Posts: 187
Joined: Thu Jan 01, 1970 00:00

Re: MRN: tracer output

Postby davidbrito » Fri Apr 12, 2013 10:29

The model is not reading the property block inside discharge block because the sub block needs an extra < and > to make it a sub-block

Code: Select all


<begindischarge>
...

<<beginproperty>>
NAME                      : temperature
UNITS                     : C
DESCRIPTION               : discharged water temperature
CONSTANT_CONC             : 1
DEFAULTVALUE              : 17.0
<<endproperty>>

<enddischarge>


And this was also lacking in Cyrill original post.

Always check the new info that you are inputing with wiki. In this case:
http://wiki.mohid.com/wiki/index.php?title=Module_Discharges


Hope this helps,
David

epelde.ane@gmail.com
MOHID Advanced user
Posts: 172
Joined: Thu Jan 01, 1970 00:00

Re: MRN: tracer output

Postby epelde.ane@gmail.com » Fri Apr 12, 2013 11:53

oops..ok. the problem of the copy paste.. thanks a lot! :)

epelde.ane@gmail.com
MOHID Advanced user
Posts: 172
Joined: Thu Jan 01, 1970 00:00

Re: MRN: tracer output

Postby epelde.ane@gmail.com » Mon Apr 15, 2013 14:42

Hi all!

With the intention of simulating an aport of nitrates to the river, I have created a time serie in which the time step of the aport is short and the flow is little (big concentration in consecuence).
It is sth like:

Hours flow nitrate
<begintimeserie>
0 0 0
120.9 0 0
121 1.38e-4 50000000
121.1 0 0
1000 0 0
<endtimeserie>


Taking into account the duration of the discharge, flow and concentration, I´d be throughing around 2500 kg
I´ve done 2 simulations, one using USE_ORIGINAL_VALUES not active in the discharges block, and another having it active. In the node following the discharge I have the output of nitrates and I see the peak I get is quite similar in both simulations.

But, the problem comes when I try to calculate the total mass which has crossed the node just after the discharge.
What I do is, integrate the Q in the time step so that I get the water volume crossing in the time step and then, I multiply it for the concentration for the time step so that I get the mass of the solute crossing in each time step. So, summing all the values up, I should have a quantity close to the one injected, I´m not right?

With USE_ORIGINAL_VALUES: 0 I get around 1700kg, and with USE_ORIGINAL_VALUES: 1, around 1800kg.

So, should be the same value no matter the method used? And, how is it possible that the values are so different to the 2500kg injected? The GWflow to channels in the same node are positive, meaning that the water has gone from aquifer to the river and nitrates cant have been lost this way..

Any help to understand this, please??
Thanks!!

Jauch
Site Admin
Posts: 98
Joined: Thu Jan 01, 1970 00:00

Re: MRN: tracer output

Postby Jauch » Wed Apr 17, 2013 11:46

Hello Ane :)

I'm assuming that for the flow information, you are using the "channel flow.srn" time series... Am I right?

If so, Than your math will probably never give you the results you are expecting.

The reason is that most of the model output time series have "instantaneous" values. This means that if you set the output time for the time series to be hourly, for example, each value in the time series will be the instantaneous flow (in m3/s) at the last time step before the time to output happens. This for sure will cause problems if you use the value as if it was the flow for the entire period since the previous output (one hour before), because the flow can change a lot in the meantime, usually decreasing.

And this problem will happen independently of the method for the interpretation of the values in the time series, Original or Interpolated (the default method).

For concentrations, because the model will convert them to mass, you always should use USE_ORIGINAL_VALUES : 1
This will tell the model that the value to be used in a time step is the same as it founds in the input time series.

If you do not set this to 1, the values will be interpolated, and than the concentration will vary during the discharge period, which is unlikely what you want. Interpolation is used for variables like temperature, that you have values at specified times and the model needs to guess which value are in the middle. Usually, in these cases, we make a linear interpolation.

Regarding what you are trying to do, the best approach is to use this in Drainage Network input file:

Code: Select all

INTEGRATE_FLOW    : 1
INTEGRATE_FLOW_DT : 86400.

<beginproperty>
  INTEGRATE_MASS_FLUX    : 1
  INTEGRATE_MASS_FLUX_DT : 86400.
<endproperty>


The keyword INTEGRATE_FLOW will integrate the flow and is required when you want to integrate the mass of a property, that is done using the two keywords inside the block of the property. Each property you want to integrate the mass should have those two keywords. If you do not set INTEGRATE_FLOW_DT and INTEGRATE_MASS_FLUX_DT they assume the default value of 86400 (a day).

Both the flow and the mass are the ones that are LEAVING a node, so if you want to know how much flow and mass goes from node 10 to 11, you have to set the node 10 in the timeserieslocation file.

I think this will give the kind of answer that you are looking for. :)

Thanks for the information provided by David ;)

Eduardo.

Jauch
Site Admin
Posts: 98
Joined: Thu Jan 01, 1970 00:00

Re: MRN: tracer output

Postby Jauch » Wed Apr 17, 2013 11:49

Just to add a thing.

The mass that you are discharging to the river will not pass all to the next node, unless all the water also leave the node where the discharge is located.
So, it's probable that you will never have all the mass that you input pass to the next node, at least for short periods.

Eduardo

epelde.ane@gmail.com
MOHID Advanced user
Posts: 172
Joined: Thu Jan 01, 1970 00:00

Re: MRN: tracer output

Postby epelde.ane@gmail.com » Fri Apr 19, 2013 10:42

Thanks a lot David and Eduardo! :)
Ok, so I set the keywords you told me, integrating them at an hourly time step.

In the attached you can see, in blue the concentration in a simulation previous to using those keywords, and in red, with them (so the integrated mass).
I don’t understand two points here: Which are the units for integrated mass? Kg? cause in that case the value would be around 500kg? In that case the result is even smaller than the one I got integrating it separatedly..

And second, if the property block, inside drainage network module, is the following :

<beginproperty>
NAME : nitrate
UNITS : mgN/l
DESCRIPTION : nitrate
DISCHARGES : 1
ADVECTION_DIFFUSION : 1
DEFAULTVALUE : 0.0
ADVDIFF_MOLECULAR_DIFF_COEF : 0.0
ADVDIFF_METHOD_H : 1 !UpwindOrder1 = 1. UpwindOrder2 = 2. UpwindOrder3 = 3. P2_TVD = 4.
!CentralDif = 5. LeapFrog = 6
ADVDIFF_METHOD_V : 1 !UpwindOrder1 = 1. UpwindOrder2 = 2. UpwindOrder3 = 3. P2_TVD = 4.
!CentralDif = 5. LeapFrog = 6
OUTPUT_HDF : 1
TIME_SERIE : 1
INTEGRATE_MASS_FLUX : 1
INTEGRATE_MASS_FLUX_DT : 3600
<endproperty>


then, I´m just taking into account the advection, no? and not diffusion. So, how is it possible that the blue line representing the concentration of a solute (in a discharge with a length of 0.1h) has that tile?

And, regarding your last post, you say: “The mass that you are discharging to the river will not pass all to the next node, unless all the water also leave the node where the discharge is located” if this was the reason for not recovering all the mass, the concentration peak (blue line) would be a peak but a very long tile, no? if the tiles reaches value of 0 that means that all solute has crossed, no?
Attachments
peak.png
peak.png (26.44 KiB) Viewed 4523 times

davidbrito
MOHID Advanced user
Posts: 187
Joined: Thu Jan 01, 1970 00:00

Re: MRN: tracer output

Postby davidbrito » Tue Apr 23, 2013 11:44

Hello Ane,

you are showing in the picture concentration or mass or both?

mass integrated is in g/s so for hourly you will have with 500g/s or 1800kg in one hour.

Always, always remember that MOHID Studio for visualization purposes interpolates between points so the lines may not be such has that.
In the case of the red line probably it has only one point different from zero and MOHID Studio just linked the other zeros to that value and you see a triangle when is is only one dot different from zero.

the results can not be the same with USE_ORIGINAL_VALUES zero or 1. This is very important to understand what this keyword does. Value zero means that it will interpolate in between data points so performing as when you see the time series in MOHID Studio that it interpolates between points just for visualization. The value one means it will use (in between data points) the next value, so doing a ladder distribution.

Hope it helped.

Best regards,
David

epelde.ane@gmail.com
MOHID Advanced user
Posts: 172
Joined: Thu Jan 01, 1970 00:00

Re: MRN: tracer output

Postby epelde.ane@gmail.com » Tue Apr 23, 2013 13:15

Hi david :)

Ok, so 1800kg is the same amount I got before using integrate related keywords (using USE_ORIGINAL_VALUE in the discharge data, I think is better using this ON, since I know the amount I´m introducing, no? I know the exactly amount between each data step.. ok.

But, it seems normal to you that with the discharge created (posted on 15 april) and with a mass of around 2500kg, a node down stream I only recover 1800 kg?

And, is it normal that the blue line in the picure (representing concentration) without considering diffusion has a tile?

Thanks!!


Return to “MOHID Land”

Who is online

Users browsing this forum: No registered users and 1 guest