Problem in setting initial angular velocity of GSP particles

Hello, developers! I have some problems when I set the initial angular velocity of glued-sphere particles(GSP) in MFIX-24.1.
1.I tried to simulate irregular particles with the MFIX-GSP model. I read the read_particle_input.f file and added the definition of Quaterion to the file based on particle_input.dat version 2.0, but it cannot be read successfully. Do you know where the mistake is?
2. Since the particle_input.dat file was unable to set the initial angular velocity of the particles, I tried to initialize the initial position, velocity, angular velocity, and angular moment of the particles in the usr0_des.f file. But the angular velocity doesn’t seem to have an effect on the particles. Do you know where the mistake is?
Thank you!! (27.7 MB) (28.1 MB)

Hi. I will take a closer look at this, but for starters let me point out that you need to be using particle_input.dat version 3, not version 2. (We are planning to consoldiate the particle_input.dat versions in the next MFiX release.)

The best way to get an example particle_input.dat is probably to run a short simulation and Save particle positions at end of run

1 Like

Thanks, I replaced the particle_input.dat file with version3.0 according to your suggestion, but it still can’t work. The error message and file are as follows:

particle_input.dat (2.0 KB)

Also, may I know how to initialize the initial angular velocity of the glued-sphere particle?

Hi @libingchen

It looks like we have (at least) two issues here. One is setting the initial angular velocity. It seems that the particle_input.dat/particle_output.dat file includes linear velocity but not angular. As mentioned previously, the next MFiX release will have improved facilities for importing/exporting particle data. For now I think your best bet is to initialize the angular velocities in usr0.f or usr0_des.f. UDF reference

The second problem is the zero division error in drag_gs.f. As always, you will get more detailed error information if you can run on a Linux host. However I am not able to reproduce this failure with the files you provided - I get a different error,

Error: There exists a NORMAL particle in a GHOST cell.

Can you please re-upload your files so I have the current version of everything? Go to the main menu, select “Create bug report” and upload the resulting ZIP file here. Thanks!

1 Like

Thanks! I have created the bug report ZIP file, and upload the complete file named
Also, I have tried to initialize the angular velocity in usr0_des.f and outout “glue omega_usr0_des.f” in usr0_des.f. To validate if I have successfully initialize the angular velocity, I also output “omega x,y,z” in cfnewvalues.f. Unfortunately, the two outputs do not match, meaning that the angular velocity initialized in usro_des.f does not take effect in the particle motion. I reupload the complete file named, would you please take a look? (28.0 MB) (28.1 MB)

Hi @libingchen

As for problem1.1, I’m sorry for the confused but the version of particle_input.dat for gluedsphere model is version 2.0. There are also a few things I need to mention here:

  1. Currently, you have to explicitly write every variables in the line instead of using Default Value, so put everything as “T”. Using Default values will create some error in the future and we are working to fix the issue.
    2 If you want to use the particle_input.dat, so please make sure gener_part_config = .False.. In the .mfx file, in your case, is the fb_gsp.mfx, make sure assign numbers to “NGluedParticles” and “Particles”, in your case, they are 1 and 64, respectively. Lets say each gsp have 64 component spheres, so the particles = NGluedParticles64. This “particles” should also equal to “TotalComponentSpheres” in your particle_input.dat.

I attached both the particle_input.dat and fb_gsp.mfx files for your reference.
particle_input.dat (2.2 KB)
fb_gsp.mfx (13.6 KB)


Sorry for my mistake! I thought we used V3 for GSP. Thanks for the correction.

1 Like

To be clear, the quaternion in particle_input.dat specifies initial orientation, not angular velocity. So the question of how to initialize particle angular velocity remains open.

1 Like

As for problem2:
First of all, if you want to assign the initial angular velocity, you need to modify the usr0.f instead of usr0_des.f.
Then, I checked your files, you put the output of omega X,Y, Z at the end of the GSP_CFNEWVALUES_vfull subroutine. The mfix updated the rotation of gsp two times in a single solid time step, they are in “GSP_CFNEWVALUES_vhalfxfull” and “GSP_CFNEWVALUES_vfull”. SInce your case does not have torque and angular momentum, with the current rotational update scheme, the omega after updating will go to 0. If you want to check if values are matched, you need to write the output at the beginning of “GSP_CFNEWVALUES_vhalfxfull”.

I attached usr0.f and screenoutput.dat files for your references, if you open screenoutput.dat (I ran this in a single time step), you will see the initial values matching with output in cfnewvalues.f.

Again, our team is currently working on improving the mfix-gsp model, we will try to fix any bugs associate with it as soon as possible. Let me know if you have any other questions.

Thank you for being interested in MFIX-GSP model!

cfnewvalues.f (33.5 KB)
usr0.f (2.6 KB)
screenoutput.dat (4.0 KB)


Thank you very much!! I have successfully used the particle_input.dat on my Desktop as well as the initialization of the angular velocity! Thanks again!