Different results using two versions

Hi @cgw, @jeff.dietiker,

Using MFiX-TFM versions from 2013 and 2021, I simulated a pseudo-2d FB based on the well-known experimental data of Laverman. However, the results are different, and I would suggest that the 2013 version produced better results. Even though the units are different, I double-checked every value and found that the values used in the simulations were consistent. I have also reviewed the 2013 version README file and checked all the keywords including “savage”, “friction” , … So, I can say that the models are also consistent.
I updated the constant values in the Princeton model and ran the 2021 simulation. As you can see in the attached file, the 2021 version’s asymmetry of the time-averaged axial velocity profile at h=10.5 cm on the walls is the first immediately noticeable difference. Please note that the time-averaging has been done over 90 seconds after neglecting the 10 initial 10 seconds of the simulation. It really matters to me to pinpoint the source of discrepancies and I would be very grateful if you could explain to me why I was unable to get the same results. In case you need to modify any parameter, I have access to some computational resources to run the modified case.
The 2013 modified subroutines and both input files are provided in case you need to check the modifications in the older version. Please let me know if you need further information.
2013-1.zip (63.8 KB)
2021.mfx (12.8 KB)
Vs105-10100-2layer-rest_effect

Thanks,
Mohsen

Can you try any versions from between 2013 and 2021 to pinpoint when the results changed?

Charles,
I have tested 2019 version of the code and the results were as the 2021 version. I remember that I tried the 2013 version without the modified subroutines and I got different results. So, I think that the modified subroutines make the difference. I tried to implement them on 2021 version but as the subroutines have changed I could not do it completely. As I mentioned before, the modifications are small and traceable(most of the modifications are not related to this case as they aimed to calculate the stress work on the walls.)
Yet, I am really intrigued to address this issue and I could run whatever you suggest exactly.
Thanks,
Mohsen

1 Like

Since this involves code modifications that you made, there’s only a limited amount of help we can provide. We test MFiX regularly to make sure the results are consistent.

I suggest you apply your “modified subroutines” to the new version. What was the obstruction to doing so?

The issue is that several subroutines have been merged, and I was unable to locate the relevant code lines in the version for 2021. However, the 2013 version only has a total of less than 105 lines that have been changed. As you have developed this code, I though you might be intrigued to find the issue. To determine the one subroutine that led to the significant improvement, I can use the 2013 version of the code to examine the impact of each individual modified subroutine on the results. I suppose you will be better able to direct me after that.
Thanks,
Mohsen

The ratio (intriguing things to investigate) / (available developer hours) is pretty high.

We do our best to reply to all questions on this forum but simply cannot do an in-depth investigation of all user-written code. Thanks for your understanding. I am interested to hear what you find.

You are absolutely right and thanks for your attention! I will update you in less than a week.

Thanks for sharing your results. This appears to be the same topic as Error in MFiX results - #11 by mohsenclick

A few comments/suggestions:

  1. It is misleading to say mfix-2013.1 and mfix-2021.4 don’t give the same results because you are not actually using mfix-2013.1, it is a modified version. If you are still in touch with M. R. Haghgoo, please inquire if the code was modified to fix a bug or to improve the model.
  2. The first step would be to run the unmodified mfix-2013.1 version and compare with the unmodified 2021.4. I believe you will do this next.
  3. The asymmetry you see with 2021.4 could very well be a bug. It could also be that it takes longer to reach pseudo-steady state with the original code than with the modified code.
  4. Have you tried to run a 2D simulation? This may be faster to troubleshoot.

@jeff.dietiker
I have discussed this matter with Reza Haghgoo. He admitted to me that he made several modifications without intending to enhance the results or fix any bugs as he sought to compare the code with the TFM formulation. Additionally, he said that he had developers’ approval before implementing any changes after consulting with them. They utilised an email-based forum, as far as I know. He was also quite intrigued by how much the modifications improved the results. I’ll run the case using the original 2013 version before adding the subroutines one at a time to observe how they influence the results. My studies show that the bed returns to its steady state after a few seconds, hence even 60 seconds of simulation should be sufficient for time-averaging.
I will also use 2D simulations to reduce the computational cost.
Thanks

Do you know what version of MFiX Reza used in A comprehensive assessment of different wall boundary conditions on the simulation of bubbling fluidized beds - ScienceDirect and was the Johnson-Jackson BC the original one in MFiX or modified? The velocity profile is fairly symmetrical.
Are you extracting the velocity profile based on Eq. 7 of the paper? If so how are you doing this?

All the modified subroutines have been provided to me by Reza, and I attached them as a zip file to this thread. The mfix.dat file is exactly the file that has been run for the JJ BC part of that paper. Reza used mfix_2013-1.
As I mentioned, most of the modifications were to extract stress work on the wall for another study (neglect all the changes that are tagged to calculate work and used reactionrates() to write out the data) and only less than 20 lines are related to this simulation as far as I can see.

Changes to the implementation of the Princeton model:
constant_mod.f: Changing the value of D_Pc from 5d0 to 3d0.
calc_k_cp: the extrapolation in the Princeton model has been modified. I think it has been implemented in newer version of MFiX.
calc_mu_s.f & calc_u_fric.f: modification of the frictional stresses

Boundary-related modifications:
calc_u_fric.f: BC modification (I could not find the relevant code lines in 2021. However, they have been implemented in 2016 version of MFiX.)

Granular energy:
source_granular.f: change in the numerical discretization of the exchange of fluctuation energy due to interphase momentum transport

Sorry but I forgot to mention that I have extracted the velocity profile based on the equation 7 in the paper.