I get the warning Warning: The sum of mass fractions is not equal to one.
periodically. What is the likely causes for this??
is this a numerical convergence issue? or a mass balance issue?
I am using TFM, a single mono-sized particle, char combustion/gasification reactions written in the user defined subroutines (based on combustion tutorial).
See typical output below.
thanks
Greg
INFO check_data_30.f:373
Time = 1.0664
Warning: The sum of mass fractions is not equal to one.
Statistics of sum of gas species mass fraction
Minimum sum of X_g= 0.99087
Maximum sum of X_g= 1.0023
Sum of X_g No of Cells Distribution
<0.9 0 0.0000
0.9 - 0.99 0 0.0000
0.99 - 0.999 40 0.51948E-01
0.999 - 0.9999 80 0.10390
0.9999 - 1.0001 462 0.60000
1.0001 - 1.001 118 0.15325
1.001 - 1.01 70 0.90909E-01
1.01 - 1.1 0 0.0000
This information is provided mainly as a sanity check while running reacting flows. If you want a tighter spread around unity, you could decrease you time step size, and tighten your convergence criteria. That said, the numbers you show here appear reasonable. If you start seeing a lot showing up in the 0.9-0.99, it could indicate a problem with your setup. It could be anything from a mis-match of numerical settings to issues with the mesh.
If you want to strictly force the summation to one, you can write a UDF to set the volume fraction of an inert species (like N2 for gas) as one minus the sum of the other species. This is similar to what many commercial codes do, where only N-1 species equations are solved with the Nth calculated as the remainder.
Thank you very much for your explanation — it was very helpful.
I was wondering if you could kindly let me know which source file(s) in MFiX I should modify in order to implement this approach? I’m planning to use a UDF to set the volume fraction of an inert species (e.g., N2) as the remainder (i.e., 1 minus the sum of all other species’ volume fractions), and I’d like to make sure I’m editing the correct part of the code.
Any guidance or suggestions would be greatly appreciated.