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 2021-07-22 09:38:41

maarnold
Advanced_User
Registered: 2014-09-13
Posts: 28

Massbalance Problem how to fix elements

Hi all,

I ran BASEMENT in debug mode and was able to identify the elements, that cause problems.
How do you fix the mesh / elements? I adjusted the breaklines, max. area etc. but was not able to get rid off the massbalance warning.

Cheers

Mathias

Offline

#2 2021-07-22 13:51:27

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

Re: Massbalance Problem how to fix elements

Hi Mathias,
does it happen at a boundary/internal boundary? Are the elements very steep?
Best
Matteo

Offline

#3 2021-07-22 13:56:03

maarnold
Advanced_User
Registered: 2014-09-13
Posts: 28

Re: Massbalance Problem how to fix elements

Hi Matteo

I managed to get rid of the error at the boundaries. However some elements with massbalance problems remain in the river section. Unfortunatly the river is quite steep. I have tried to refine the mesh but to no avail. Do you have any other suggestions?

Mathias

Offline

#4 2021-07-23 14:20:17

Lukas Vonwiller
Developer
Registered: 2014-09-04
Posts: 127

Re: Massbalance Problem how to fix elements

Hi Mathias

Another possibility to get a more stable solution is to reduce the CFL number. However, be aware that you gain stability at the cost of accuracy!

hope this helps!
cheers, Lukas

Offline

#5 2021-07-26 10:48:54

maarnold
Advanced_User
Registered: 2014-09-13
Posts: 28

Re: Massbalance Problem how to fix elements

Hi Lukas

Thanks for your input. I managed to simulate my model with multi cpu by disabling the safe mode. The mass balance problems remain in the first few time steps. However the results seem to be reasonable. Can someone explain the safe mode? I didn't find any information in the manuals.

Thanks!
Mathias

Offline

#6 2021-08-10 16:36:15

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

Re: Massbalance Problem how to fix elements

Hi Mathias,

I made something that is quite handcrafted, but for the time being it worked out.

I had one very steep element "behind a corner" (imagine a spike, this element would be the back of the spike). Here my solution:

  1. Open the xdmf file with ParaView

  2. Identify the element ID in ParaView (ParaView numbers the elements from 0 to N, BASEMENT from 1 to N+1)

  3. Open HDFView, go to RESULTS/CellsAll/HydState and double click on the last time step

  4. Find the element, using the ID found out at 2.

  5. modify the water surface elevation (first column) just by adding the mass-balance-problem value to the wse

  6. save the h5 result

  7. re-run the simulation from that time step

I know it is not the best solution, but if the mass balance problem is just "numeric noise" it goes away with this hard-coded correction. If it is due to other problems (wrongly set boundary condition) it would not go away.

Again, one should find other solutions, but if nothing works, one can have a working simulation with this workaround.

Last edited by Matteo Facchini (2021-08-10 16:37:24)

Offline

#7 2021-08-12 09:42:31

maarnold
Advanced_User
Registered: 2014-09-13
Posts: 28

Re: Massbalance Problem how to fix elements

Hi Matteo,

Thanks for sharing your solution! I'll keep it in mind... as a last resort :-)

Cheers!

Offline

Board footer

Powered by FluxBB