I am trying to run a case that involves reactions and I have two solids. The reactions for the first group is working but I am not seeing any reactions in the second when I look the the VTU files in VisIt. The first group involves metal oxides and the second is coal. My coal reactions are not taking place. I will upload the mfx and user_rates.f files. I am running MFIX version 19.2.0fuel_reactor2dbc.mfx (30.2 KB) usr_rates.f (12.5 KB)
I put in print statements for the reaction rates for solid 2 in user_rates.f and the rates were not zero.
I tried another case where I moved all the solids compositions into Solid1 and all the reactions are working. Still wondering why I get no reactions for Solid2. If I wanted to run with a particle size distribution I would need more solids.
Looking at the mfx file you uploaded, the species equations for the second solids phase does not appear to be enabled. Specifically, I don’t see any entry for species_eq(2) = .True..
Loading your case file into the GUI, I see that the species equation is enabled (the box is “checked”), however this isn’t reflected in the mfx file. This might point to a bug in the GUI. If I disable, then enable the species equation for the second solids phase (then save), the input deck looks correct.
Thank you. I’ll give it a try as soon as my single Solid case has run. I am not familiar with all the mfx file syntax but I will put that in and watch for it in the future.
Note that the default value for SPECIES_EQ keyword is True, so it should be in effect for solids phase 2 even if not explicitly set in the input file. However it’s still a bit inconsistent that the value is listed for phases 0 (fluid) and 1 but not phase 2.
mfix/model/init_namelist.f
261 !<keyword dtype="LOGICAL" category="Run Control" required="false" locked="true">
d="true">
262 ! <description>Solve species transport equations.</description>
263 ! <arg index="1" id="Phase" min="0" max="DIM_M"/>
264 ! <valid value=".TRUE." note="Solve species equations."/>
265 ! <valid value=".FALSE." note="Do not solve species equations."/>
266 SPECIES_EQ(:DIM_M) = .TRUE.
267 !</keyword>
268
Solving solids phase 1 bulk density and species equations.
NOT solving solids phase 2 bulk density and species equations.
Looking in the mfix sources where this is printed, the message depends on the value of lneq, which is set up in the routine CALC_ODE_COEFF, in mfix/model/chem/stiff_chem_mod.f, line 358:
SUBROUTINE CALC_ODE_COEFF(lNEQ, IJK)
implicit none
INTEGER, intent(in) :: IJK
INTEGER, intent(out) :: lNEQ(NEQ_DIMN)
INTEGER :: M
LOGICAL :: USE_SOLIDS_ODEs
! Initialize.
USE_SOLIDS_ODEs = .FALSE.
lNEQ(2) = IJK
lNEQ(3:) = 0
! If there is little to no solids in the cell, then set the ODE
! dimension to gas phase only.
DO M=1, MMAX
IF(SPECIES_EQ(M)) THEN
IF(EP_s(IJK,M) > 1.0d-6) THEN
USE_SOLIDS_ODEs = .TRUE.
lNEQ(2+M) = 1
ENDIF
ENDIF
ENDDO
The per-phase volume fraction EP_S has to be greater than 1e-6 or else the phase is skipped: lneq(2) = 0
Adding a write statement to CALC_ODE_COEFF shows this is the case:
write(*, *) M, SPECIES_EQ(M), EP_S(IJK, M)
IF(SPECIES_EQ(M)) THEN
[...]
results in:
1 T 0.40000030398141967
2 T 4.9790266190745588E-007
That is, the SPECIES_EQ flag is set, but EP_S is apparently too small for the second phase.
You can change the EP_s limiter (1e-6) to a smaller value (say 1e-8) to activate the coal reaction. While it may introduce another issue. In a single cell, if the consumed coal mass per time step is larger than the coal inventory in a cell, the time step will decrease to a very small value to make it converge. You can adjust the reaction rate to bypass it if you want: reaction_rate_eff=min(inventory, reaction_rate).