Hi,everyone!
I am trying to do a cfd-dem simulation of a fluidized bed for supercritical water gasification of glucose for hydrogen production. My model is imported with ICEM drawn mesh and the size of 3D model is 309155 (mm), schematically shown below. The whole simulation is specified at 25MPa, inlet_scw inflow is supercritical water at 783K, inlet_feed inflow is feed at 300K, the feed consists of glucose at 10% and water at 90% (mass fraction), and the wall is isothermal wall at 873K. The physical properties of the mixture of supercritical water, glucose, and the gas produced by the chemical reaction are imported by the UDF. I used the usr_properties.f and usr_mod.f files to write the UDF, and the various physical properties are temperature dependent. The particles are 30,000 inert particles of 1mm diameter, which are not involved in chemical reactions, and are imported by the particle_input file. At present I have only opened the energy equation and fluid species equation, not yet the chemical reaction model, but I have written the udf of rate into it, otherwise I can’t generate the species.inc file.
The current settings like this will cause the DT to gradually decrease until it diverges. However, the program can run fine if the temperature of both inlets is set to the same.(both 300k or both 783k)
I have tried setting the various properties of each substance as constants in the udf, and the program runs very well at this time. I also tried to program the density of each substance as a constant in the udf, and other properties such as viscosity as a temperature-dependent udf, and the program also ran well. I guess there is something wrong with the UDF of density with temperature, but I can’t find what the problem is . Because it seems to me that I write the density UDF with the same structure as the udf of other properties, can you help me find the error?Thanks very much!
This is my file:
30_915_0316_2023-06-09T213137.975009.zip (32.8 MB)
Hi Jia, welcome to the MFiX forum.
Unfortunately there is an issue with modifying mod
files in the MFiX solver. While copying Fortran sources to the project directory for editing is the recommended way to make modifications, it turns out that due to a problem in the build script, any Fortran module
files (with mod
) in the name are not actually replaced - you are still getting the default modules from the master MFiX source dir.
This is a problem and will be fixed in the upcoming 23.2 release.
In the meanwhile -
bash$ conda activate mfix-23.1.1
(mfix-23.1.1)$ cd $CONDA_PREFIX/share/mfix/src
(mfix-23.1.1)$ cp eos_mod.f eos_mod.f.bak
(mfix-23.1.1)$ cp usr_mod.f usr_mod.f.bak
(mfix-23.1.1)$ cp <PROJECT_DIR>/*.mod.f .
then rebuild the custom solver. Be careful because your modifications to those two files will be picked up by any other solvers you build - put the .bak
versions back when you are done with this!
You may still see issues after you do this but at least you’ll be running the correct code. Sorry for the difficulty, and please let me know how this works out.
– Charles
I am able to reproduce the divergence, even after doing the above.
Before it fails, I also get a “velocity exceeds limit” warning:
Velocity exceeds limit: 20.000
in cell: I = 5 J = 54 K = 3
Epg = 0.42000 Ug = 0.31976 Vg = 20.058 Wg = -0.26170
To change the limit, adjust the scale factor MAX_INLET_VEL_FAC.
I do not have a solution at this time but note that the MAX_INLET_VEL_FAC
warning is often due to poor mesh quality - try searching the forum for that term.
– Charles