Hi Raymond. Please provide more detail than “cannot calculate”. What behavior are you expecting and what are you seeing?
I compiled your UDF and ran the case, it runs fine for me but produces this warning message:
mfix - WARNING - velocity higher than maximum allowed velocity: 10.000 (to change this adjust the scale factor MAX_INLET_VEL_FAC)
Unfortunately, the warning message is showing up in the terminal you start MFiX from, instead of being displayed within MFiX. I will fix this.
Regarding the inlet velocity, please see this post
– Charles