Error occure after compling

Dear Expert,
I compiled the user.drag with debug compiler. The compile is successful but the simulation is not starting, The following error is coming.
could you suggest to me how can i remove it?
Error from D:/MFIX Simulation/Emms drag model/New folder/usr_drag.f:94
Error: Solver crash!
The MFiX solver has terminated unexpectedly
Error information:
float divide by zero in drag_usr_
at D:/MFIX Simulation/Emms drag model/New folder/usr_drag.f:94

PFA debug file here.
lungu3_2024-02-17T180848.660429.zip (139.1 KB)

Dear Expert,
I am eagerly waiting for your reply.

Go to line 94. The error message says there is a division by zero. Must be when RE is zero.

On line 106 there is a commented out test to treat the case when RE is zero. Uncomment and move it before line 94.

Dear Jeff,
Thank you for the response. The simulation is running, but the issue is that the bed is not expanding and the value of solid volume fraction remains steady throughout each time step with minimal variations. Can you suggest what I am doing wrong?

lungu3_2024-02-20T151155.801805.zip (1.1 MB)

How does you fluidization velocity compare with the minimum fluidization velocity (are you well above minimum fluidization) ?
Does the bed fluidizes with other drag laws?

I took four times of minimum Fluidization velocity. Also, this works with others drag model.
I checked it, but this is not working on this drag model why?
You can review it.

This is beyond the scope of what I can assist you with. Others may have the ability to review your model. I encourage users to help each other when possible.

Dear Jeff,
Can you please tell me what changes should I make to the UDF so that I can monitor and store specific variables during the simulation, drag coefficients, and Hd?
Do I need to write in terms of reaction rates or user rates?
such as Reactionrate(IJK,1) = Hd or some thing else.

Dear Jeff.
Can you tell me right approach to monitor the parameters to modified udf. Such as rate(ijk, 6) = hd.

You can store cell data (typically in an IJK loop) into the ReactionRate array. This array was originally used to store reaction rate, but it can be used to store any cell data.

The first index is the cell index, typically IJK.
The second index is the variable index. You can store up to nrr variables per cell. Go to the model pane and set the ReactionRate array size to what you need (say 2 variables):

image

Lets say you have 2 local variables Hda and Hdb you compute inside an IJK loop. You can store their values with

ReactionRates(IJK,1) = Hda
ReactionRates(IJK,2) = Hdb

If you need to use/access ReactionRates anywhere else, use

use rxns, only: reactionrates

at the top of any subroutine.

To visualize the data in the vtk file, just add the ReactionRate to the list of VTK variables.

Please take a look at the tfm silane pyrolysis example (see usr_rates.f) to get more familiar with how it works.

Dear Jefff.,
I changed but the value is getting null. Please check it.
lpd_2024-02-24T180640.028194.zip (911.0 KB)

Dear Jeff.,
I tried to modify the reaction rates & numbers as you instructed, but I am unable to find to change the cell value in the designated location. Can you provide assistance with this issue?

Please elaborate, I do not understand your question/issue. Please provide as much information as possible with supporting graphs/images/snippets. What are you expecting to see and what are you getting instead?

We only have limited time and I need more info to get a chance to help. Again I encourage everyone on the forum to help when then can.