Water properties instability

MOHID Water forum. Questions and discussion around MOHID Water
melissacastera@gmail.com
MOHID User
Posts: 24
Joined: Thu Apr 19, 2012 18:48

Water properties instability

Hi Mohiders,

I am writing to you with the aim to solve some doubts about the water properties module and its functions, besides mohid's algorithm for solving advection-diffusion equations.

I am working with a large river, which is about 300 kms long. I have set up a 2D model, with variable mesh grid (200 and 400 meters). I have a time series discharge upstream, and a Tide serie downstream. The discharge includes a defined temperature and salinity. Because is fresh water, I set up Temperature as 20 Celsius degrees and Salinity as 0.01.
I had analysed two situations: one with no definitions in the Water Properties Module, and the other with Temperature and Salinity defined with same values as discharge. Results of the first case are ok, I can see the velocity field, but in the second case temperatures results are between -infinity and infinity.. How can this be possible? Why this could be?

A clew can be given by bathymetry shape. Well, I reduced the mesh's size as I only considered cells which depth are bigger than -1 meter. In this way, I reduced significantly basins from both sides of the river. With this format, the model does run!!!

This gives me the idea that the hydrodynamic equation (momentum) is more robust than transport equations, from the point of view of gradients of velocities or levels. (I am not sure of this)

I had read in one of the manuals that transport in the horizontal is determined explicitly, and because temperature and salinity values are determined with the transport equation, I think this could be a possible reason. Could it be?
If effectively the model determines explicitly both temperature and salinity, I do not understand why it does so, because I defined for both properties: ADVECTION_H_IMP_EXP : 0, ADVECTION_V_IMP_EXP : 0, DIFFUSION_V_IMP_EXP : 0 (with number 0 the model calculates properties implicitly)

Another question is about TVD (transport diminishing method). What is this about?

Please, I really need your help in this, as I am stuck with this and need results to go on.

I will appreciate any help,
thanks and regards,
Melissa

leonardo-karv@hotmail.com
MOHID Beginner
Posts: 11
Joined: Thu Jan 01, 1970 00:00

Re: Water properties instability

Hi Melissa,

can you post your WaterProperties' keywords here for both simulations? Maybe your boundary conditions (for temperature and salinity) wasn't set properly...

You made so many questions, I'll try to answer the others after...

melissacastera@gmail.com
MOHID User
Posts: 24
Joined: Thu Apr 19, 2012 18:48

Re: Water properties instability

Hi Leonardo,

Here is my WaterProperties module:

!Output Options
OUTPUT_TIME : 0 3600
TIME_SERIE : 0
TIME_SERIE_LOCATION : ..\General Data\TimeSeriesLocation.dat

REFERENCE_DENSITY : 1026
! Default= 1000 kg/m3 (codeplex)

<beginproperty>
NAME : temperature
UNITS : ?C
DESCRIPTION : No description was given.
INITIALIZATION_METHOD : CONSTANT
DEFAULTVALUE : 30
SURFACE_FLUXES : 0
DISCHARGES : 1
OUTPUT_HDF : 1
DIFFUSION_V_IMP_EXP : 0
SCHMIDT_COEF_V : 1.0
SCHMIDT_NUMBER_H : .01
<endproperty>

<beginproperty>
NAME : salinity
UNITS : psu
DESCRIPTION : No description was given.
INITIALIZATION_METHOD : CONSTANT
DEFAULTVALUE : 0.01
DISCHARGES : 1
OUTPUT_HDF : 1
DIFFUSION_V_IMP_EXP : 0
SCHMIDT_COEF_V : 1.0
SCHMIDT_NUMBER_H : .01
<endproperty>

And the discharge temperature and Salinity are 20 and 0.01 respectively.

I tried to solve this by reducing the DT from 30 seconds to 5 or 10 seconds but a strange error pops up saying error in recording HDF..

Melissa

melissacastera@gmail.com
MOHID User
Posts: 24
Joined: Thu Apr 19, 2012 18:48

Re: Water properties instability

Hello Leonardo,

I have made some further analysis about the model´s instability. Each try consists of changing only one thing from the original configuration:
- I reduced the DT and as a result was an error of recording hdf. (as I mentioned in previous message)
- I changed Schmidt_Background_V from 1x10E-8 (default by codeplex) to 1 and the results did not change significantly.
- I established SCHMIDT_NUMBER_H and SCHMIDT_COEF_V in 1 (previously the first one was 0.01) and the results did not change significantly.
- I established HMIN_ADVECTION and HMIN_CONVECTION = 1 and the results did not change neither. Previously they was not defined. By codeplex, the default values are 0.5 meters.
- I established DIFFUSION_H_IMP_EXP = 0 for both properties Temperature and Salinity (in WaterProperties Module) and the inestability delayed a little bit but happened anyway.
- I changed MINIMUMDEPTH from 0.1 to 0.5 meters and it run with no instability!!!

From this results I believe that because of the variability of bathymetry, and considering a situation where there is a positive discharge wave, velocities in cells varies from time step to time step. This quick variation could explain instability in the transport of the properties of temperature and salinity. But questions still remains:
- why is that the instability happened in the transport of properties (temperature and salinity) and not in the transport of momentum?
- why changing HMIN_ADVECTION and HMIN_CONVECTION did not the problem? Which is the difference between this variables and MINIMUMDEPTH?
- why is that the instability happened in the transport of temperature and salinity but density remain constant?, while by codeplex, I understand that density method by default is UNESCOState and it consists of density as a function of both temperature and salinity.

If you think that the instability could be explained by another factor, I will appreciate your warning.
Sorry for so many questions.

Cheers, Melissa

leonardo-karv@hotmail.com
MOHID Beginner
Posts: 11
Joined: Thu Jan 01, 1970 00:00

Re: Water properties instability

Hi Melissa,

I'm affraid the coefficients that you are changing is not the cause of your error. Taking a look into your study case I realized that you want to simulate a discharge of a river 'till the ocean (and how huge your river, 300 km!!!!!!), but taking a closer look at your keywords you're defining the same values of your discharges into the your open boundary (that would be and a estuary or the sea). So here it comes my suggestions:

- if the tidal wave don't reach the head of your river so you must close this boundary (I mean, close the cells that are in the open boundary and set the discharge next to it);
- define the values for your open boundary (estuary, sea...), you can define it setting constant values or time serie...
- I saw a great number of keywords that you don't need to set values, I'm sending you by email one of my WaterProperties' file of a river-sea simulation;

melissacastera@gmail.com
MOHID User
Posts: 24
Joined: Thu Apr 19, 2012 18:48

Re: Water properties instability

Hello Leonardo,

Thank you for your comments. Indeed, my domain is 300km long, flowing from north to south. In the upstream boundary, which is closed, I imposed a time serie flow as a discharge (Discharge.dat module). At the dowstream boundary (opened) I have measured levels (is not astronomic tide), and imposed them in the Tide.dat module.
To give you an idea, flows can vary from 600 m3/s (low flows) to 22000m3/s (very high flows), and the water is fresh water, so the salinity is very low. The instability errors appeared when I run with high and very high flows.
I took salinity value from bibliography for fresh water.

Regarding to your file, you recomment to use TVD method. What is it about?
You are imposing BOUNDARY_INITIALIZATION : EXTERIOR and BOUNDARY_CONDITION : 2. (Value imposed). What is the first condition about? In my case should I impose these two conditions?

On the other hand, by imposing MIN_VALUE : 0 and MAX_VALUE : 38.80, are not you obliging the results and not seeing a possible instability?

I noted that you did not defined Schmidt numbers. Why?

Thanks and regards, Melissa

leonardo-karv@hotmail.com
MOHID Beginner
Posts: 11
Joined: Thu Jan 01, 1970 00:00

Re: Water properties instability

Hi Melissa,

when you don't set the BOUNDARY_INITIALIZATION keyword this is set by the default (INTERIOR), and this means that your values set by default values to the salinity and temperature are set into the open boundary. In your runs you said for low discharges it runs fine, but you've took a look into your results? It is fine too?

Another thing, what the courant of your simulations?

- Yes, I think you must impose this two conditions: BOUNDARY_INITIALIZATION : EXTERIOR and BOUNDARY_CONDITION : 2
- I use the TVD (Total Variation Diminishing) just for the numerical scheme (I think it is the best scheme to solve hyperbolic equations)
- With the keywords MIN_VALUE : 0 and MAX_VALUE : 38.80 I'm not obliging the results, just put the min and max physical values, but it not influence the convergence of the model

Well,
let me know if my suggestions worked.

Regards,
Leonardo.

melissacastera@gmail.com
MOHID User
Posts: 24
Joined: Thu Apr 19, 2012 18:48

Re: Water properties instability

Hello Leonardo,

I followed your recommendations and made a run imposing BOUNDARY_INITIALIZATION=exterior and BOUNDARY_CONDITION : 2 as you said, besides the condition TVD for advection resolution.
The results show that the model assumes a certain value of temperature at the downstream boundary (open), around 12. I do not know from where the model took this value, because I did not define it.
Additionally some zones showed values higher than 30 and others lower than 20. These last ones not influenced by the downstream condition.
Maybe it would not be convenient that the model assumes that temperature as it influences the temperature field situated upstream. I really do not know and have no data of measured temperature or salinity. Do you agree?
Regarding salinity field, as I did not imposed maximum and minimum values, it showed instability (values from -infinity to infinity).

I made another test: considered the condition of TVD for advection resolution, but imposed BOUNDARY_INITIALIZATION=interior and BOUNDARY_CONDITION : 1. Also the model did not resulted stabilized.

The Courant number es = 4.602.

About the other runs with respect to average and low flows, I believe they are ok. However, I must warn you that now I am working with "warming" periods, so as to stabilize the model and then run with real data.

From what I explained above, could be assumed that the advection method or properties imposed at downstream boundary does not solve the instability problem?

Thanks and regards, Melissa

leonardo-karv@hotmail.com
MOHID Beginner
Posts: 11
Joined: Thu Jan 01, 1970 00:00

Re: Water properties instability

Hi Melissa,

I think this occours cause the model isn't reached the equilibrium. When you set boundary condtion exterior the value defined in the keyword default_boundary is imposed at your open boundary. Tell me what temperatures and salinities of your discharges and what value you're setting for the default boundary.

The simulation is working fine with these suggestions?

Can you send me some images?

Regards,
Leonardo.

melissacastera@gmail.com
MOHID User
Posts: 24
Joined: Thu Apr 19, 2012 18:48

Re: Water properties instability

Hello Leonardo,

The total period of the warming simulation is of 5 days. Shouldn´t it be enough for stabilization? A positive wave of high flows takes about 4.5 days in running all the river long (about 300km), from upstream to downstream.

The Discharge module is as follows:

!MODULE: Discharges
<begindischarge>
NAME : Test
DESCRIPTION : --
I_CELL : 838
J_CELL : 314
DEPTHBYGRID : 1
K_CELL : 1
!NODE_ID : 1
DEFAULT_FLOW_VALUE : 1500.0
DATA_BASE_FILE : ..\General Data\Boundary Conditions\flow_input_RU_a.txt
FLOW_COLUMN : 2

<<beginproperty>>
NAME : temperature
UNITS : ?C
DESCRIPTION : temperature
CONSTANT_CONC : 1
DEFAULTVALUE : 20.0
!TIME_SERIE_COLUMN : 3
<<endproperty>>

<<beginproperty>>
NAME : salinity
UNITS : psu
DESCRIPTION : salinity
CONSTANT_CONC : 1
DEFAULTVALUE : 0.01
<<endproperty>>
<enddischarge>

Sorry about my error, I did not have into account the default_boundary keyword in previous runs when I defined boundary condition as 2. Anyway, I do not have estimated or real data to impose as a boundary salinity or temperature.

By the moment the only configuration that worked was in which I changed MINIMUM_DEPTH in Hydrodynamic Module, and imposed a 0.5 meters value.
I attached a figure where you can see river´s morphology and bathymetry. Depths varies from 22 (depth below the hydrology reference level) to -10 meters (above reference level).
Flow direction goes from North to South. In the upper part of the river you can see a narrower stretch, where instability generally appear.

Do you need some pictures of the model running as well?

Thanks again, regards, Melissa
Attachments
Uruguay River.png (52.83 KiB) Viewed 9362 times

leonardo-karv@hotmail.com
MOHID Beginner
Posts: 11
Joined: Thu Jan 01, 1970 00:00

Re: Water properties instability

Hi Melissa,

What your grid step and how many cells you're setting the discharges?

More, what's your application (I mean, what you planning to do?). If you don't have a time serie of temperature and salinity at your river mouth, so
you must to enlarge your grid into the ocean 'till a place where the river discharge do not have importance and so you keep there the salinity and
temperature constant (generally the salinity does not change abruptly into the ocean).

Why you setting the the altimetry 'till 10m above the datum? What the amplitude of your rivers flooding?

Regards,
Leonardo.

melissacastera@gmail.com
MOHID User
Posts: 24
Joined: Thu Apr 19, 2012 18:48

Re: Water properties instability

Hello Leonardo,

The cells size is variable: 200 meters and 400 meters. The smaller size is applied to the half top stretch of the river, because it is much narrower there.
The discharge is imputed in only one cell, at the upstream boundary, uniformly in all depth.

The aim of the project is to study how a pulp mill discharge affects the river. It is situated about 10 km upstream the transition where the river is narrow and turns much wider, and 90 km upstream from the downstream boundary.
So, after obtaining a calibrated hydrodynamic model I will set the temperature discharge of the pulp mill, and also analyse the plume of a conservative tracer with Lagrangian module.
The downstream boundary of the domain, continues to Rio de la Plata, and then turns into the ocean. So, the salinity transition you are talking about is this estuary.

I considered 10 meters, because at the zone of the plant, the maximum historic level is around 3 meters above the reference level. When I run with the bathymetry with a maximum depth of 1 meter, the flood margins are not considered as computable cells and there is no problem of instability.

In last message, I mentioned the period simulated wrongly. Really, it is about 7 days.

Thanks and regards, Melissa