Question about source term implementation in solve_species_eq.f

Dear MFiX developer, when I’m reading through the MFIX Documentation Numerical Technique and the corresponding source code, I got a question as below:

By referring the numerical documentation, I learned that the central coefficient and source term can be expressed as:

My question is why phi_p, which is an unknown variable to be solved, enters the source term?

Looking forward to your reply!

This issue is also already discussed in the numeric guide you have been referencing. The term you are noting arises from subtracting the discretized form of the continuity equation multiplied by species mass fraction from the discretized species conservation equation. See equation 3.24. Essentially the term either adds to the center or the source depending on the sign of the interphase mass transfer; it if it is positive the term adds to the center coefficient and if it is negative it adds to the source.

Maybe I didn’t make my point clear enough. My real confusion is: for a linear system of Ax=b, the unknown variable x_i should not appear in the right hand side vector b, but in here the unknown variable phi_p enters the vector b and the linear system may be expressed as:
image
and the source term in the code is:
image

In my knowledge, the iteration method as Jacobi Method solve the linear system in the way as:
image

in which the center unknown x_i is always in the left hand side of the equation (j /= i). However, in MFiX the center unknown phi_p is in the source term and the iteration can still by performed. Is there any theory background that I can follow to understand this trick?

Thank you for your reply!

If you read the documentation around this term I think you would find a greater understanding of the reason for the treatment, which is why I directed you there. I’ll quote directly: “Including this term in the source term would slow convergence, and including it in the center coefficient would destabilize the iterations when negative. Therefore, the term is manipulated as follows so that its contribution to the center is nonnegative.” For more discussion refer to Patankar (1980) book regarding Rule 3 and source term linearization. That said, as mentioned in the same numeric document, the term arises here as 1) a result of manipulation to satisfy Rule 4 of Patankar (1980) and 2) the multiphase flow form of the continuity equation resulting from -interphase- mass transfer. When this particular term ends up a source, it is treated ‘semi-implicit’ in that it is updated every outer iteration of the solver (once all needed equations are solved once in their iterative and generally segregated fashion) as opposed to just every time step. If you do not understand what I’m talking about here then you might want to look more deeply at these materials or maybe others can guide you.

1 Like

Thank you very much! You really cleared up my confusion.