Thanks Eric. It’s nice to see users helping each other on the forum.
A few comments:
- 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)
- 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.
-
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.
-
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