Hello, everyone. I’ve noticed that when “Disable fluid solver (pure granular flow)” is enabled, the system doesn’t seem to call ‘USR3_DES’ or “USR0_DES.” How should I modify the code to make this work?
Did you enable UDFs in the model pane? USR0_DES should be called once at the beginning of the run and USR3_DES should be called once at the end of the run (10. User-Defined Functions — MFiX 26.1 documentation).
Thanks for Jeff’s reply, I did enable it, I’m using version 24.4.1. When I unchecked “Disable fluid solver (pure granular flow)”, the issue was resolved. So is this a problem with the call mechanism?
I am not sure, it works for me, I just tried with 24.4 and 26.1. I took the conveyor tutorial, and added a simple print statement in usr0_des and usr_3_des and both got printed out. (I assume you rebuilt the solver after editing the UDFs). Please feel free to attach your setup if you want someone to take a look. I might be a good idea to upgrade to 26.1 too.
I used the “rotating_drum” example. When I checked the “Disable fluid solver (pure granular flow)” box, usr3_des did not print “ASD.” However, when I unchecked it, MFIX printed “ASD.”
rotating_drum.zip (32.1 MB)
I see the “ASD” being printed out at the end (I disabled the fluid solver):
Do you see it in the rotating_drum.stdout file?
It appears in the file you sent but this must be with the fluid solver enabled because it shows up many times:
ASD
ASD
ASD
ASD
ASD
ASD
ASD
ASD
======================================================================
Final simulation time = 0.0041 s
Total CPU used = 2.591 s
Total CPU IO used = 0.0066 s
Total wall time used = 2.561 s
======================================================================
You can also go to Output>Residuals and check the box “Display Residuals”, which gives you a more verbose output. The GUI tries to trim down some content but I cannot explain why you don’t see the print statement while I see it.
Thank you for your response, Jeff. I carefully reviewed the code and found that in a pure DEM simulation, the “USR0_DES” and “USR3_DES” subroutines are only called once.


