Flow module

Discussion about simulations using the MICRESS Fluid Flow Module
Post Reply
Posts: 15
Joined: Fri Feb 07, 2014 10:27 am
anti_bot: 333

Flow module

Post by mogeritsch » Wed Mar 22, 2023 6:51 am

To All,

In my simulation, I get the following error message

WARNING, Flow: continuity not converged 3.232E-02 > 1.000E-02 /s

What do I have to change in my simulation so that the "divergence criterion for continuity equation"n is fulfilled?

Thanks in advance


Attached the selected Flow solver data

# Flow solver
# -----------
# (*) marks default settings for options
# Selection of the Flow-Solver:
# combined|separated|piso [verbosity <lvl>]
# [ steady_[re]start|ana_[re]start [pre_iter <it>]|readfrac <file> ]
combined verbosity 0
# Time stepping in Flow-Solver: fix <tstep[s]>
# or: cfl <CFL-number> [first <tfirst>] [max <tmax[s]>] [min <tmin[s]>]
fix 0.05
# Convergence criterion for impulse eqn. (absolute) [mue_m/s]
# (real) [warn(*)|nowarn]
# Max. number of iterations for linear solver:
# (int) [bicgmr2(*)|bicgsafe|bicgstab]
# Convergence criterion for pressure eqn. (absolute) [Pa]
# (real) [warn(*)|nowarn] [adapt(*)|noadapt]
# Divergence criterion for continuity equation [1/s]
# (real) [warn(*)|nowarn]
# Max. iterations of the flow solver
# Factor for underrelaxation of pressure 0.0 < alpha < 1.0

Posts: 3
Joined: Mon Jun 06, 2016 11:56 am
anti_bot: 333

Re: Flow module

Post by ralf » Wed Mar 22, 2023 4:23 pm

Hi Johann,

This warning shows the largest error (in this case of the continuity equation) between two intermediate outputs. If this warning only occurs during the first iteration, or in a few iterations at the start while improving, it's not a big concern. It just indicates that the criterion was not met in at least one flow solver time step. In many simulations imbalances are largest at the start, and numerical convergence rapidly improves after that while a more steady state of fluid flow is reached. This typically leads to high numbers of linear solver steps at the start of a simulation.

If the warning occurs regularly and the divergence is not decreasing or even increasing, the numerical parameters of the flow solver should be tweaked to improve the situation.
For more information in the screen output the verbosity parameter should be increased to see what is happening, in general verbosity 2 is a good starting point. See https://docs.micress.rwth-aachen.de/7.1 ... parameters for a description of all verbosity levels.

verbosity 2 shows if and how fast divergence improves from one flow solver iteration to the next.
- If divergence doesn't improve at all or only slowly, it's likely best to choose shorter time steps.
- If divergence improves only up to a point it can help to choose a stricter pressure criterion, especially if the number of linear solver steps is low.

Relaxing the divergence criterion can be considered if it was chosen very strict, but a badly converged divergence adversely affects advection, and since subsequent flow solver time steps start from a larger divergence error, the performance improvement of the flow solver is often small.

In some cases convergence and performance can be improved by a different choice of boundary conditions with similar effect.

The in file shows a very low number of iterations for the linear solver. I would typically recommend a value of 300. The linear solver will stop when the pressure criterion and the impulse criterion are met. The linear solver will often reach a high number of iterations in the first flow solver steps, but once the flow simulation reaches a more steady state the linear solver will converge quicker.

The verbosity 2 output can also help with the choice of numerical parameters for the impulse equation and the number of flow solver iterations. It should be kept in mind, that the start of a simulation is often untypical.

verbosity 4 allows tracking of the linear solver iterations and shows how fast pressure and impulse converge, The number of iterations for the linear solver should be chosen high enough to allow convergence of pressure and impulse with few flow solver iterations during the very first time steps. In later time steps the number of linear solver steps should not reach that limit.

An approach with a low number of linear solver steps but a high number of continuity iterations can in some cases improve performance, but one should check with verbosity 2 that convergence of the continuity improves from one continuity iteration to the next.

After setting the numerical parameters for the flow solver one should set verbosity 0 again to reduce the output.


Post Reply