I assume you are referring to
benchmarks/tfm/ParallelBenchmarkCases/B_O3_06
I’m a bit puzzled - B_O3_06 has a usr_rates.f
not rrates.f
When I load that case in the GUI I get:
The CGS system of units is deprecated in MFiX so the GUI tries to convert units when loading CGS cases. Values in the project file (mfix.dat
or *.mfx
) can be easily converted, but UDF code cannot, which is why this warning is printed.
You could try to run without the GUI (making sure to use an unmodified copy of mfix.dat
that has not been converted to SI) but your results are not guaranteed to be correct. I suggest that you allow the GUI to convert the case to SI, and try to fix the UDF code yourself.
Looking at the usr_rates.f
which is included with B_O3_06
it’s quite simple:
! Reaction specific variables:
!`````````````````````````````````````````````````````````````````````//
DOUBLE PRECISION c_O3 ! Ozone concentration mol/cm^3
! PhaseChange: O3 --> 1.5O2 (mol/cm^3.s)
!---------------------------------------------------------------------//
c_O3 = (RO_g(IJK)*X_g(IJK,O3)/MW_g(O3))
RATES(Ozone_Decomp) = (ONE - EP_g(IJK)) * USR_C(1) * c_O3
This is a very simple constant-rate reaction where the reaction rate is specified by the keyword USR_C(1)
(which can be controlled through the “Advanced” pane:
Note that MFiX uses kmol
for amount of substance, rather than the SI base unit of mol
(FAQ), and kg/kmol
for molecular weight.
After changing to SI, the ozone concentration c_O3
will have units of kmol/m³
instead of mol/cm³
. 1-EP_g
is dimensionless, so this shows the coefficient USR_C(1)
must have dimensions of 1/s
(since the computed reaction rate is has units of kmol/m³s
or mol/cm³s
depending on SI or CGS). So USR_C(1)
does not need conversion.
We’ve gone from the inputs being g/cm³
and g/mol
to kg/m³
and kg/kmol
, but we’re returning kmol/m³s
instead of mol/cm³s
, so the conversions cancel out.
So I think nothing requires converting at all, except the comments in usr_rates.f
.
However, as with all the “legacy” tutorials and benchmarks, we haven’t tested these in a long time and there are no guarantees that they will run or produce correct results with the most recent MFiX code. That’s why they have been demoted to “legacy” status.