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 2014-11-05 10:57:58

LydiaSeitz
User
Registered: 2014-09-08
Posts: 18

Updating grid to V2.4 does not work

Hello everybody,

I recently updated Basement to version 2.4 and now one of my 1D grids (created with V2.3) does not work anymore. 
The following error message pops up as soon as I try to load it into the 1-D Grid editor:

"A fatal error occurred:
a1<=a2
in file:BASEtools\BaseTools.cpp on line 45
Version: 2.4R1692, compiled at Sep 10 2014, 11:16:20

We are sorry, but BASEMENT must be terminated now."

I can still open the grid with the 2.3 version without any problem. All other grids who were created with V2.3 are working with the new version except this one.
I compared the files from the working and the not-working one in an editor, but I can´t find any differences. After trying different single cross sections within the file I found one cross section which is not working. As soon as I delete it everything works fine. But I can´t find any difference to the other cross sections.

Do you have any idea about that problem or any hint what I could try next?

Hope to hear from you soon!

Cheers, Lydia

Offline

#2 2014-11-05 11:16:32

Christian Volz
User
Registered: 2014-09-04
Posts: 31

Re: Updating grid to V2.4 does not work

Hello Lydia,

thanks for your report of this bug. I think we cannot track the error, without having more details. If it is possible, please send me your grid file with the problematic cross section. I will take a look at it as soon as possible.

Best regards
Christian

Offline

#3 2014-11-05 16:08:18

Christian Volz
User
Registered: 2014-09-04
Posts: 31

Re: Updating grid to V2.4 does not work

Hi Lydia,

I have checked your 1D grid file, and found two unrelated problems:

- you have defined 3 soils within each cross section. You have always named two soils with the same "index = 2". This is problematic, since each soil should have an unique index. This may lead to an undefined behaviour, because it is not clear which of the two soils is attributed by the index of 2. Please use unique soil indices instead.

- the error is caused by another problem. You defined the soil by using the "range" tag. This tags expects the left and right coordinates of cross-section nodes to be specified. BASEMENT then searches for these coordinates within the cross section. In your case, at the specific cross section a problem is caused due to round-off errors: you did not specify the exact coordinate ("2.9996616473") but a rounded coordinate ("3"). In this particular cross-section, the difference between these two coordinates was too large, and the program failed to find the corresponding node coordinate. This led to subsequent errors and finally to your error message. There are two easy solutions: you either specify the exact coordinates or you use the "slice_indexes" tag instead of the "range" tag to define the soil range. Using the latter option, you circumvent such round-off errors by specifying the indeces of the nodes (the nodes of a cross section are ordered ascending from 1 to n, with n = number of cross section nodes).

Unfortunately the error message was not very helpful to find this problem. We aim to improve this aspect with respect to the next release. Finally, please note, that there are not many applications of BASEMENT with multiple soils up-to-now. Most morphological models use only a single soil. This feature should work, but it may be less thoroughly tested than other features. Perhaps you want to start with just 1 soil in your model. If the model works, you may try to switch to multiple soils, if it is required for your type of application.

Best regards
Christian

Offline

#4 2014-11-05 17:45:14

LydiaSeitz
User
Registered: 2014-09-08
Posts: 18

Re: Updating grid to V2.4 does not work

Hi Christian,

thanks a lot for your help! OK I will try the "slice_indexes" and use only a single soil.

Cheers
Lydia

Offline

#5 2014-11-05 18:16:10

Christian Volz
User
Registered: 2014-09-04
Posts: 31

Re: Updating grid to V2.4 does not work

Short correction:
There are some errors in my explanation above. Actually, the coordinates in the range-tag are found, otherwise BASEMENT would show an error message. The range is checked using the "<" operator, which seems to lead to an overlap of soils in this special case, which is not allowed.

I recommend using the "slice_indexes". Here the extend of the soil is clearly defined without the above mentioned problems. However, my explanation was not correct. Actually, the slices (which are BETWEEEN two neighboured nodes) are numbered ascending from 1 to n, with n = number of cross section slices. To define the extend of the soil, you have to specify the indexes of the left and right SLICES (instead of NODES). Each slice is attributed uniquely to a soil and there must be no overlap.

br,
Christian

Offline

Board footer

Powered by FluxBB