Pre-assigning particle locations at start of run

My model takes 150 seconds at the start of a run to build a pile of particles I require for the rest of the run.

I wondered if there was a way to pre-assign the particle locations at the start of the run to the locations they are at at 150s so I could save this time when running the model?
Or is there an easy way that I could put in a very high mass flow rate at the start of the run to build the pile and then after this point reduce the mass flow rate?

Is it a granular flow? If not, you can settle the particles by running a granular flow simulation up to 150s and save the particle_output.dat at the end. Please see Getting particle data into csv files straight from mfix - #4 by jeff.dietiker

How many particles do you have initially in the system?

It’s a DEM model. I am unsure how many particles initially as it constantly inputs particles from the top through the whole run.

I have found that I need a file particle_input.dat, but how exactly do I create this file?

I understand it is DEM. By granular flow I meant no gas phase (RO_G=0.0). If it is not a granular flow (there is a gas phase), and you need to settle particles, you can run a granular flow simulation until particles settle. This will be much faster than settling particles along with a gas phase.

I am guessing you have zero particle at time=0 and you use a mass inlet to drop particles from the top. You can also seed particles in an Initial Condition region. They won’t be packed but this should be faster than using a mass inlet. Then use Getting particle data into csv files straight from mfix - #2 by jeff.dietiker to save particle_output.dat at the end of the run. Rename this file to particle_input.dat and use it for your new simulation.

In general, once you have the particles position, you can create a particle_input.dat using the format described in 8.4. Frequently Asked Questions — MFiX 20.4-dev documentation

1 Like

I have used the method you described and have managed to set the initial position of the particles using the particle_input.dat file. However this includes the stream of particles coming into the inlet, does this matter or is there a way to not include these so it is just those in the pile?

My aim with this is to use a high input rate to position the particles, the commence a run at a much lower input rate with the particles already in position.
Is this possible to do by just reducing the mass inflow rate?

I can think of several options:

  1. Once you have the particle_input.dat file, you can always edit it and remove particles you don’t want. You may need to write a script or use Excel to remove particles based on their height. It could also be as simple as specifying a lower particle count on line 20 of this file. If you are lucky, the particles in the vertical steam will be written last .i.e. at the bottom of the file. If you have 20,000 particles in the file and set the number of particles to 15,000, the last 5,000 lines in the file will be ignored.
  2. Run a first simulation with high flow rate until completion. Lower the flow rate, change the end time of simulation, and run another simulation as a restart>resume. Be careful not to delete the files ( do not reset the simulation, only change the flow rate and end time). This won’t get rid of the vertical stream of particles, unless you use the next trick.
  3. You can set a start and end time for the mass inlet. In the BC pane, go to the transient tab, and set the mass inlet stop time to something less than the simulation time. This will turn off the BC at the specified time (there may be a slight delay because we seed particles in a staging area above the BC plane). This may be the better option for you. This can be used if you save particle_output.dat or if you do a restart described in 2).

1 Like

Thank you so much for your help, this has now worked for me.

Could you please confirm if a mass inlet start time other than the default ‘zero’ is possible; for instance, if I have two mass inflow boundary conditions (say, bottom and left wall), can I choose to impose transient condition on either of these two by choosing a non-zero start time.

I tried but it gets triggered at default time ‘zero’, apparently, overriding the ‘bc_mi_start_time’.