Hello developer,
When I changed the reaction rate equation from this
to that
it reported an error.
Can you help me check it? Thank you very much!
fluid_bed_tfm_2d_2023-11-30T224330.136394.zip (106.3 KB)
You will divide by zero when the void fraction is one, i.e in cells where there is no solids. You should not be dividing by (1 - ep_g)
Practice “defensive programming”.
To avoid zero-division errors, always check the denominators before you do the division. Instead of
result = (some complex expresson) / (some other complex expression)
do
num = some complex expression
denom = some other complex expression
if (denom .ne. 0) then
result = num / denom
else
do something else
endif
Same goes for logs, square roots, etc.