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-01-29 10:30:50

sua87
User
From: Bern
Registered: 2017-05-26
Posts: 21

CFL value adjustment

I have a set of simulations on the same mesh, where I enter water at different locations. All boundary conditions (standard inflows) are present in the same mesh. Each simulation runs on said mesh. Most of them run well. At some locations I get mass balance errors. This could have multiple reasons (geometry, various MatIDs in near surroundings of the boundary conditions, etc.). I use the dividing constraint to set a minimum of 4 cells per boundary conditions, most have 5 cells at the inflow. The added water varies from 0.x m3/s to > 5 m3/s. The scale of my project is not very detailed (~ 1:5000, hazard map), so I do not need a simulation that is extremely accurate.

My problem is, that I need to run the set of simulations on the same mesh, in order to correctly postprocess the data (it will automatically be summoned and transferred to shapefiles for a set of simulations). So if I change the mesh at a faulty boundary condition, I need to rerun all simulations on the mesh, which I'd like to avoid if possible.
I now try to get a more stable simulation by lowering the CFL, which does work and mass balance errors can be avoided. My question is: how low can I go in order not to distort the results? My standard value is 0.8, I could run most of the faulty simulations at 0.7 without a problem... I didn't find any explanations on the values of the CFL in the documentation.

Thanks for your thoughts and advice.

Offline

#2 2021-02-04 11:24:38

Raphael
User
From: Reinach (BL)
Registered: 2020-12-21
Posts: 5

Re: CFL value adjustment

Hi sua87

I think I had a similar problem. It was funny because I could run it with multi-CPU method but it gave a mass balance errors when using GPU method.
Maybe you could try multi-CPU method.
In my case it happened after the fist timesteps. At the end I increased the input for the first timesteps a little, that solved the problem and I could run it a lot faster using GPU.

Offline

#3 2021-02-22 18:26:54

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

Re: CFL value adjustment

Hi sua87,

I don't know if you are familiar with the CFL condition. It is a numerical condition needed to solve mathematical equations with numerical methods avoiding numerical instabilities.

Usually CFL numers < 1 increase the calculation's stability, thus avoiding calculation errors such as mass balance problems. The drawback is that your simulations will be slower. Basically, if you cannot reduce the size of your elements (as it is in your case), you could reduce the CFL number.

Unfortunately, as far as I know, there is not a simple equation or rule, to estimate the "best" CFL number for your simulations. Anyway, try to use it as a last resource if you cannot do anything else to increase the stability of your model.


What Raphael is describing is non-dependent on the CFL condition, it might be woth to take a look at. Generally speaking, instabilities may arise if you start your simulations from dry conditions, even worse if you have movable bed (morphology activated).

Offline

Board footer

Powered by FluxBB