This works perfectly. I also want to add user-defined functions for the Arrhenius rates as a function of the temperature.
I looked up in the user guide, MFiX-User_Guide.pdf (29.9 MB) , for tutorials on the same. The tutorials demonstrate how to use UDFs in specific cases, but they don’t provide sufficient details on the structure of the Fortran UDF files themselves. For example, it’s not clear what keywords, subroutine templates, etc., are required when creating a new UDF (e.g., for defining Arrhenius rates as a function of temperature). A bit more detailed explanation of how to construct a UDF file from scratch would be very helpful.
The Arrhenius rates are already a function of temperature. You just need to give the related coefficients, like A and Ea. The documentation of MFiX (4.14.4. Implementation of CHEMKIN mechanism in MFiX — MFiX 25.2 documentation) gives all the details about how the reaction rates are calculated in MFiX based on the coefficients from the users.
If you want the coefficients, like A or Ea, to be a function of temperature, you do need to use UDF instead of the built-in CHEMKIN ability in MFiX. MFiX has some tutorials for reacting flows. After opening MFiX GUI, go to “New project” and choose the reacting cases, like “2DTFM silane_pyrolysis” or " 3D PIC silane pyrolysis". Those tutorials have the UDFs, usr_rates.f or usr_rates_des.f for the reactions.