Automatically Switching Discrete Schemes for Improved Convergence and Accuracy

Hi everyone,

I’m currently working on a simulation in MFiX where convergence is a bit challenging, especially during the initial stages. As Dr. Dietiker have mentioned before , using a lower-order discretization scheme (like first-order upwind) can help stabilize the solution early on.

However, I’ve also noticed that first-order schemes are not accurate enough to properly capture bubble dynamics, which are important in my case. On the other hand, higher-order schemes provide better accuracy but tend to cause instability or slow convergence at the beginning of the simulation.

So, I 'd like to know whether there is a built-in or recommended way in MFiX to automatically switch between different discretization schemes during the simulation. For example, starting with a first-order scheme to ensure stability and then switching to a second-order scheme after a certain number of time steps or once the solution has stabilized?

If this kind of switching isn’t directly supported, does anyone have experience implementing such functionality via custom modifications to the input file or source code?

Any suggestions or pointers would be greatly appreciated!

Thanks in advance,

So you are trying to identify something measurable of when to do this switching? I think many are happy to do the switching manually either just by looking at the results or some monitor points.

Hi,

Thank you for your reply. I noticed that my simulation tends to become unstable at the beginning, but this issue can be resolved by starting with a first-order scheme and then switching to a higher-order scheme once the solution stabilizes. Since I’m running the simulations on SLURM, it would be more convenient to automate the switching of schemes using a UDF. Do you have any suggestions or experience with implementing such an approach?

Thanks again!

Best regards,

I don’t think you can change this during the run, but @jeff.dietiker would probably know the exact answer. One other way would be to prepare two .mfx-files, where the only difference is the scheme, and maybe the max runtime. You then just resume the second based on the first, which you can set to stop after a given time, I think you would be able to do both using SLURM.

You may be able to use the pause/resume feature if you are running from the GUI. Start the simulation with FOUP, let is run for a while. The press the pause button
image
(between the play and stop buttons)
image
This will keep your job in the queue. You can change a few simulation parameters, like the simulation end time, bc inlet velocity. You can also change the discretization scheme. Go to Numerics> Discretization pane and change the scheme to Superbee. Save the file and press the play button to resume the simulation.

2 Likes