Hi Jianwen, as I said, I’m not sure that switching primary variables will help as you still solve the same governing equation. But if you want to try I would recommend the suggested approach via modified volume variables.
If your reaction rate can get too large, I would rather make sure that your reaction rate is limited for low concentrations. In the source term function you have access to the current concentration and you can give the the time step size to the problem so you can compute a limited rate. (Or use a type of regularization) If this only happens due to large step sizes it might also help to use some line search approach in the newton (e.g. Newton.UseLineSearch = true). Best wishes Timo On 28 Dec 2024, at 21:29, Jianwen Du <[email protected]> wrote: Hi Timo, Thanks for your reply. I used a direct solver (UMFPack) and still encountered the same issue. I then switched to different preconditioners (Jacobi, Gauss-Seidel, ILU, SSOR, and SOR) but the problem persisted. I noticed that the direct solver worked fine till approximately 2 minutes of computation. It seems that it can continue calculating by adjusting the time step, but the issue reoccurs later. Well, for the solvers with preconditioners, the problem arises sooner, at time 0.04s. For reference, the initial time step was 0.001s. So I feel it's the system I'm trying to solve that may have led to the matrix degenerate. The goal of my system is to solve for the concentration of species and the volume fraction of minerals. The system involves reactions, including both mineral dissolution and precipitation. From what I’ve noticed, it seems that the calculated reaction rate sometimes exceeds the concentration of some species, potentially resulting in them being non-positive. This may lead to errors in the calculations. To resolve this, we found an alternative approach: instead of solving for the species concentration x directly, we solve for the logarithm of x (log x), see attached. We think this ensures that even if the logarithmic value of x turns out to be negative, the concentration remains positive, preventing any negative values in the concentration calculations. Best, Jianwen -- Ph.D. student Hydrology and Atmospheric Sciences University of Arizona [email protected]<mailto:[email protected]> <Mayer - PhD dissertation - section4.3.pdf> _______________________________________________ DuMux mailing list [email protected] https://listserv.uni-stuttgart.de/mailman/listinfo/dumux
_______________________________________________ DuMux mailing list [email protected] https://listserv.uni-stuttgart.de/mailman/listinfo/dumux
