DEM particles settling in fluid: Divergence issues and DTSOLID > DT

Hey there,

I am having issues with running a DEM simulation that is submerged in a water-like fluid. I have a simple setup of particles, read in from a user created particle_input.dat file, that should settle in the fluid. The problem is that simulation fails to converge (i.e. throwing the warning ‘Dt<DT_MIN’), unless I set DT_MIN = 10^-9 s. This puts the fluid time step much smaller than the solid time step (DTSOLID ~ 10^-7 s). This seems strange to me and will lead to fairly unfeasible computation times for the problem at hand. Note that the simulation runs in a manner that I would expect when I decrease the particles’ normal spring constant OR the density of the fluid. This makes me think there is some issue that is related to the fluid and/or solid timescale.

I guess my question is: is there anything physical that is requiring me to set this fluid time step so small, or are there some computational considerations that I am missing?

Here are the files to reproduce the problem:
particle_input.dat (554.9 KB)
dem_rheology_wet.mfx (29.8 KB)

Thank you in advanced.

Best,
P

dem_rheology_wet.mfx (22.9 KB)

Does this work for you? I got it to work with dt=1e-3. (I used mfix-21.3; but it also runs well with 20.4.1)

I modified many things initially (fluid timestep, fluid normalization, discretization scheme, the max velocity, disable the detect stall etc) and it did not work, then somehow it worked after enabling automatic particle gener and disabling it. I then iteratively tried to come back to your initial .mfx setup and it kept working. My point is that there must have been some tiny mistake, but since the files are organized differently a diff command does not pick it up.

Thanks Eric. It’s nice to see users helping each other on the forum.

A few comments:

  1. The .mfx files are organized differently because of the template used to write the file. At the top of Patrick’s file you can find:
#! Template used to format file: "detailed"

This is controlled in the “Settings” menu

Unfortunately, the documentation on this is a bit lacking. The MFiX file template controls how the .mfx file is written. I prefer the standard template which is concise, and does not show certain keywords if they are at their default settings. The detailed template was created at the request of some users at NETL who wanted to see these things explicitly. You can also write your own “custom” template but the documentation for the template languate also remains to be written.

Loading Patrick’s case and re-saving it with the “standard” template makes it easier to compare the two versions, since the format will be the same. (see #4 below)

  1. Another strategy I find useful for comparing text files that may be written in different order, with different indentation, etc is:
#  sdiff -W <(sort file1.mfx) <(sort file2.mfx) | less

sdiff produces side-by-side diffs. -W tells it to ignore all whitespace-only changes.
The <(sort file) is an example of “process substitution”, it’s an advanced Bash feature which is somewhat like backslash expansion, but produces a file handle instead of a string. The command inside the parens can be any Unix command, e.g grep. The same result can be achieved using temporary files but I find the process-substitution method cleaner.

  1. There is rudimentary Git integration in the MFiX GUI, in that every time you save the file it’s checked into a local Git repo with an incrementing version number. This can be seen in the History pane. There isn’t yet a lot of functionality build around this in the GUI, other than the ability to view changes, but if you know Git you can use Git commands in the project directory.

  2. Let’s look at the diff in detail:

After re-saving Patrick’s file with the ‘standard’ template:

# sdiff dem_rheology_wet_przelak.mfx dem_rheology_wet_breard.mfx > diff.txt

You can also specify -s, --suppress-common-lines to sdiff but I chose not to do so in order to preserve context.

Looking at the output (I will skip over parts that are identical):



#! File written Thu Apr 28 06:22:32 2022 |  #! File written Thu Apr 28 03:52:55 2022
#! MFiX version 22.2 by cgw on x280	     |  #! MFiX version 21.3 by ebreard on talapas-ln1

### Run controls                            ### Run controls
  description      = 'DEM Tutorial: DEM     description      = 'DEM Tutorial: DEM 
  run_name         = 'DEM_RHEOLOGY_WET'     run_name         = 'DEM_RHEOLOGY_WET'
  units            = 'SI'                   units            = 'SI'
  run_type         = 'new'                  run_type         = 'new'
  time             = 0.0                    time             = 0.0
  tstop            = 0.5                    tstop            = 0.5
  dt               = 5.0000e-05          |  dt               = 1.0000e-03
  dt_min           = 1.0000e-06             dt_min           = 1.0000e-06
  dt_max           = 1.0000e-03             dt_max           = 1.0000e-03
  dt_fac           = 0.99                   dt_fac           = 0.99

The ‘|’ symbol between the columns indicates a line that differs. In this case, dt has been changed from 5e-05 to 1e-03, as Eric stated.

  momentum_x_eq(0) = .True.                 momentum_x_eq(0) = .True.
  momentum_x_eq(1) = .False.             <
  momentum_y_eq(0) = .True.                 momentum_y_eq(0) = .True.
  momentum_y_eq(1) = .False.             <
  momentum_z_eq(0) = .True.                 momentum_z_eq(0) = .True.
  momentum_z_eq(1) = .False.             |  project_version  = '1503'
  project_version  = '1474'              <

The momentum equations are disabled for the solids phase (1) in Patrick’s version.
The default value of this keyword is TRUE:

init_namelist.f:      MOMENTUM_X_EQ(:DIM_M) = .TRUE.

so the unspecified values in the right-hand side are effectively .True.

Next, some changes in the Numerics section:


### Numeric                                ### Numeric
  max_nit   = 50                         |   detect_stall      = .True.
  tol_resid = 1.0000e-03                 |   max_inlet_vel_fac = 1.0
                                         >   max_nit           = 50
                                         >   norm_g            = 0.0
                                         >   tol_resid         = 1.0000e-03
                                         >   ### Discretization
                                         >   discretize(1)  = 0
                                         >   discretize(2)  = 0
                                         >   discretize(3)  = 0
                                         >   discretize(4)  = 0
                                         >   discretize(5)  = 0
                                         >   discretize(6)  = 0
                                         >   discretize(7)  = 0
                                         >   discretize(8)  = 0
                                         >   discretize(9)  = 0
                                         >   discretize(10) = 0

But these changes are not significant, since the values are all at default:

init_namelist.f:      MAX_INLET_VEL_FAC = ONE
init_namelist.f:      DETECT_STALL = .TRUE.
init_namelist.f:      DISCRETIZE(:) = 0

explicitly setting them to these values is the same as omitting them.


#### Fluid                              #### Fluid
  mu_g0 = 1.0000e-03                      mu_g0  = 1.0000e-03
                                     >    mw_avg = 18.01528
  ro_g0 = 1000.0                          ro_g0  = 1000.0
 

The key mw_avg was removed when I loaded and saved Patrick’s version of the file with the latest MFiX code, this is intentional, since running with mw_avg produces a warning (the key is ignored when the molecular weight is set to ‘Mixture’). So this is not significant.

There are some relevant diffs in the initial conditions:

    ic_ep_g(2)      = 0.5                | ic_ep_g(2)      = 0.999
    ic_ep_s(2,1)    = 0.5                | ic_ep_s(2,1)    = 0.001

and in the 'Discrete element model` section:

  des_interp_on          = .True.        |  des_interp_on          = .False.
  des_interp_scheme      = 'GARG_2012'      des_interp_scheme      = 'GARG_2012'
  des_neighbor_search    = 4                des_neighbor_search    = 4
  des_oneway_coupled     = .False.          des_oneway_coupled     = .False.
  gener_part_config      = .False.       <

Note gener_part_config is .False. by default:

des/des_init_namelist.f:      GENER_PART_CONFIG = .FALSE.

These are the only significant differences.

To recap:

Eric’s version (the one that works) has the following changes:

  • dt changed from 5e-05 to 1e-03

  • momentum equations enabled for solids phase

  • initial condition #2 volume fractions changed (0.5+0.5 to 0.999+0.001 gas+solid)

  • DES interpolation disabled

You can experiment to determine which one of these changes fixed the problem.

– Charles

Eric and Charles,

I really appreciate the quick responses. I tried Eric’s file and it seems to be working (via mfix 21.4). I am going to go through the differences Charles has thoughtfully detailed to see where the problem lies.

Again, thank you for the help!

-P

1 Like