I am currently working on a simulation using the two-fluid model in MFIX.
I am trying to analyze the detailed behavior of my simulation to better understand the underlying physics. I’d like to know if there is an efficient way to quickly obtain the values of each term in the two-fluid model equations for every grid cell in my computational domain. I am particularly interested in understanding the contributions of individual terms (e.g., pressure gradient, viscous stress, inter-phase interaction terms) within each cell. I have looked through the MFIX documentation and user guides but haven’t found a straightforward way to achieve this.
Any suggestions or guidance from the community would be greatly appreciated!
I understand that my previous post might not have received the attention I was hoping for, but I really need some help with this issue, so I thought I’d follow up and explain my situation a bit more.
Several days ago, I posted about a problem I encountered during a simulation I was running. Everything was going smoothly, and the system had reached a statistical steady state. The results were looking good and consistent, which was great. However, out of nowhere, the simulation suddenly diverged. It was like everything went haywire in an instant, and I couldn’t figure out why.
I’ve been scratching my head over this for quite some time now. I’ve checked my code multiple times, reviewed the parameters, and even tried to backtrack to see if there was some hidden issue that triggered the divergence. But so far, I’m still at a loss. This unexpected behavior is really puzzling and is holding me back from making further progress.
To get to the bottom of this, I’m planning to examine each component of the equations in the grid cells to further assess the cause of the divergence. I strongly suspect that either the mass or momentum equation suddenly became non-conservative at some point, leading to the simulation’s instability. By identifying which term caused the problem, I hope to pinpoint the source of the issue and find a solution.
So, I’m reaching out again to see if anyone has any thoughts or suggestions. Even if it’s just a small hint or a direction to look into, it would be incredibly valuable. I’d be more than happy to provide more details about the simulation setup, the parameters, or any other information that might be relevant.
Thanks in advance for any help you can offer. I really appreciate it!
I proposed things to try (tighten the residual tolerance, switching to first order scheme) to help trouble shooting the issue in the other post.
As far as “an efficient way to quickly obtain the values of each term in the two-fluid model equations for every grid cell”, you will have to go in the code and spend quite a bit of time to decide which terms you want to look at. You can start with ‘iterate.f’ and 'solve_vel_star.f` and follow the iterative scheme. Then if the data is in an array with cell index IJK, you can save it into a vtk file by modifying vtk_out.f. However, I doubt this will help much, due to the instability occurring at random time and the fine mesh.
My suggestion is still to play with the numerics tolerances, try first order, or coarsen the mesh a bit.