Des_usr_var_size in particle_input.dat

Hello, everyone! I try to using particle_input.dat in my simulation. Because the simulation have reaction and user_defined output, so I have to modified the particle_input.dat.
the original file is such that:


and I changed the temperature and species to make sure it worked in the simulation of the reaction :

and my question is that I defined the des_usr_var_size=7 in MFIX GUI, How should I changed in the line:User_Scalar: T (Ignored if no user scalars are defined)

First, let’s look at the line for species:

Species: F 1.0

would mean you only have one species and you set the mass fraction to 1.0. I am guessing you have more than one species if you have reactions. Say you have three species, that line should look like:

Species: F 0.8 0.15 0.05

This will assign a mass fraction of 0.8 for species 1, a mass fraction of 0.15 for species 2, and a mass fraction of 0.05 for species 3 (same for all particles). You will need to adjust those numbers based on the number of species and actual initial value you want.

Now for the user scalar: You can leave the line as is:

User_Scalar: T (Ignored if no user scalars are defined)

and then add 7 columns to the right of the density column to define the 7 user scalar values for each particle (you could define a different value for each particle).

If all particles start with the same user scalar values, then you can use something like

User_Scalar: F     0.1  1.2  2.0  -1.5  3.5  0.01  10.8

(change the actual 7 values to fit your need).

My recommendation is to use MFiX 22.1. It has a better data check and will give you more details about what information you need to provide in case there is an error in the particle_input.dat file.

2 Likes

Hi, Jeff! Thanks for your reply. And I have another question that if I have two solid phases, and each phase has more than one species and temperature, for example, solid 1: a mass fraction of 0.8 for species 1, 0.2 for species 2, initial temperature 873K; solid 2: a mass fraction of 0.7 for species 3, 0.3 for species 4, initial temperature 273K, how can I define that in the particle_input.dat?

The particle data structure carries the maximum number of species among all defined phases. This means if solids phase #1 has 2 species and solids phase #2 has 3 species, then we must specify 3 species for all particles, including phase 1 particle. In this case the third species in phase 1 is meaningless and its mass fraction should be set to zero.

Here, based on your description, I am assuming both phases have 4 species. You cannot use a uniform distribution for temperature nor species, so you will need to enter the data for each particle.

Set:

Temperature T 
Species: T

so the temperature and species are read for each particle. Then for each particle, in addition to the other data (I don’t know if you need to specify diameter, density or velocity), you will need to specify temperature and all 4 species.

If I assume 3D geometry, diameter and density is not the same for phases 1 and 2, initial velocity is zero for all particles, and you don’t have user scalars:

Coordinates:     T          Must always be T
Phase_ID:        T          1
Diameter:        T          0.004
Density:         T          2700.0
Velocity:        F          0.0 0.0 0.0         
Temperature:     T          (Ignored if energy eq. is not solved)
Species:         T          (Ignored if species eq. are not solved) 
User_Scalar:     T          (Ignored if no user scalars are defined)

Then the data will have 11 columns:

Columns 1-3: x, y, z coordinates
Column 4: phase ID (1 or 2)
Column5: Particle diameter
Column 6: Density
Column 7: Temperature
Column 8-11: Species 1, Species 2, Species 3, Species 4

Thanks for the detail answer, I totally understand!