User Forum of Software BASEMENT

BASEMENT
Basic Simulation Environment for computation of environmental flow and natural hazard simulation
Laboratory of Hydraulics, Hydrology and Glaciology (VAW)
ETH Zurich
Basement_Logo

You are not logged in.

#1 2019-09-24 15:50:24

dp
User
Registered: 2019-09-24
Posts: 3

Mass balance problems

Hi,

I am using Basment for rainfall-runoff simulations over a large, hilly area and run into dozens of "mass balance problems" which result into an abortion of the simulation:
MASS BALANCE PROBLEM: h = -0.000461048 < 0.0
MASS BALANCE PROBLEM: h = -0.000461048 < 0.0
MASS BALANCE PROBLEM: h = -0.000579809 < 0.0

Some infos about the model setup:
Rainfall is fed in by the source-option into the model and there are no other boundary conditions (neither inflows nor outlfows) applied.

Are there any possibilities to handle this problem? Thanks for your help in advance,
David

Last edited by dp (2019-09-24 16:02:37)

Offline

#2 2019-09-25 07:45:55

Matthias Bürgler
Developer
From: Zürich
Registered: 2019-04-04
Posts: 150

Re: Mass balance problems

Hi David

You can identify the region with mass balance problems with the "debug mode" by running the simulation with the flag "-debug". This could help you to further identify the problem.

Do you have any negative sources in your model and what is your minimum water depth?

Best regards
Matthias

Offline

#3 2019-09-25 13:22:24

dp
User
Registered: 2019-09-24
Posts: 3

Re: Mass balance problems

Hi Matthias,

thanks for your help!

The minimum water depth is 0.005 m and there are no negative source values. For the rainfall input I use the option "distributed" and for data "100". According to the manual, the data value is interpreted as mm/h. However, the tooltip-info says mm/s. Since the input of decimal places is restricted, I guess it is mm/h, isn't it?

However, the error-message is as follows:
-> ERROR in kernel_GLOBAL_Update... MASS not conserved
-> ... unfortunately BASEMENT is killed!

Thanks,
David

Last edited by dp (2019-09-25 15:02:19)

Offline

#4 2019-09-25 22:30:41

dp
User
Registered: 2019-09-24
Posts: 3

Re: Mass balance problems

turning off "safe mode" was the solution. everything is fine now :-)

thanks again for your help, Matthias!
Best,
David

Offline

#5 2019-10-17 13:47:35

qtheiler
User
Registered: 2015-07-30
Posts: 60

Re: Mass balance problems

Hi,

You have spoken about debug mode. Is there any option to run the debug mode from the Graphical interface? If I run my model from the terminal, how I'm supposed to write? like
$ ./BMv3_BASEplane_seq -f simulation.json -r mySim_run.h5
-o mySim_run_results.h5 -p -debug

The results of the problem will be on the terminal for the element with problem of mass balance?

Cheers,

Offline

#6 2019-10-18 13:08:41

Matthias Bürgler
Developer
From: Zürich
Registered: 2019-04-04
Posts: 150

Re: Mass balance problems

dp wrote:

turning off "safe mode" was the solution. everything is fine now :-)

This only turns off the error message, but does not solve the mass balance problem.



@qtheiler: Running in debug mode is only possible via the terminal with the flag --debug (or -d):

$ ./BMv3_BASEplane_seq -f simulation.json -r mySim_run.h5
-o mySim_run_results.h5 -p --debug

Best regards
Matthias

Offline

#7 2020-11-29 23:06:33

isabo
User
Registered: 2020-11-03
Posts: 6

Re: Mass balance problems

Hi,

My situation is similar to David’s: simulation of rainfall for a small area without boundary conditions causes mass conservation errors when increasing the simulation time or output timesteps. I was wondering why this is the case…
is the reason for this error typically rooted in the mesh? how can you prevent it from happening, if possible?

My second concern is about running in debug mode to detect the trouble causing cells. I tried debugging my simulation.json with a batch file (for Windows), but it doesn’t actually recognise the commands you suggested in the user manual (-f, -r, -o,..). I must be missing the point here:

START C:\"Program Files"\BASEMENT_31\bin\BMv3_BASEplane_cuda.exe
-f C:\"Program Files"\BASEMENT_302\batch_file_debug\input_simulation\simulation.json
-r C:\"Program Files"\BASEMENT_302\batch_file_debug\input_simulation\mySim_run.h5
-o C:\"Program Files"\BASEMENT_302\batch_file_debug\output_debug\mySim_run_results_debug.h5 -p --debug
PAUSE 

Thanks a lot and kind regards,
Isabel

Offline

#8 2020-12-01 10:26:30

isabo
User
Registered: 2020-11-03
Posts: 6

Re: Mass balance problems

Hi again,

Decreasing the CFL-value to a much lower level for a more stable calculation did the trick for me... smile

Cheers,
Isabel

Offline

#9 2020-12-21 12:27:32

Matteo Facchini
Developer
From: Trento
Registered: 2014-09-05
Posts: 281

Re: Mass balance problems

Hi Isabel,

just out of curiosity: do you have the DIRECTION module active?

Cheers
Matteo

Offline

Board footer

Powered by FluxBB