Bottom MI BC only works when side inlet BC is defined

I am trying to incrementally setup a DEM simulation. The geometry is a union between a vertical cylinder and a horizontal cylinder on the side. I want to specify a mass inlet at the bottom of the vertical cylinder (bottom inlet) and another mass inlet at the end of the horizontal cylinder (side inlet). I have simplified the setup (fluid phase only) to have a minimally reproducible setup.

Somehow if I only set the bottom inlet BC without setting up the side inlet, the simulation runs but reaches tstop after one iteration, and the velocity field is zero (see inputs_no_side_inlet.txt):

 ============   NEW TIME STEP   ============ 

   Step 1: from old_time 0 to new time 1 with dt = 1

Before projection:
   max(abs(u/v/w))  = 0  0  0
   max(abs(gpx/gpy/gpz))  = 0  0  0
Min and Max of epf 1 1
After  projection:
   max(abs(u/v/w))  = 0  0  0
   Time per fluid step      0.0371377
   Time per step        0.058152394
  Writing plotfile plt00001 at time 1
Time spent in main (after init) 0.091695754
Time spent in main      0.438906306

I get the same outcome with a non-zero initial gas velocity.

Now if I define the side inlet BC, even with a zero side inlet velocity, it runs fine, i.e. the bottom BC is injecting fluid as expected. See inputs_side_inlet_zero_vel.txt

Why is the bottom BC behaving differently whether I define or not define the side inlet BC? I have attached the two input files, they both use the same geometry.csg file.

geometry.csg (427 Bytes)
inputs_no_side_inlet.txt (2.0 KB)
inputs_side_inlet_zero_vel.txt (2.1 KB)

Notes:

  1. I tried 26.05 and the latest develop branch. Same results.
  2. I used the GUI for the initial setup, and manually edited the input files during troubleshooting.
  3. I will eventually need to inject DEM particles through the side inlet. I think this is only possible with an eb BC, does anyone have an example they can share?

I compared the two input files, and the no_side_inlet configuration is invalid because it leaves a portion of the domain without a defined boundary condition.

All domain extents must be assigned a condition (such as mass inflow or pressure outflow), covered by an EB geometry, or set as periodic. Currently, MFIX-Exa does not include checks to ensure that every domain cell is flagged as one of these, so undefined regions can slip through without an explicit error.

Thanks Jordan. Is this applicable only when mfix.geometry is not set to box? I am looking at 02-settling/Size0001/inputs.box, which doesn’t have periodic nor any other inflow/outflow BC’s and it looks like NSW is assigned along all domain extents by default.

Good question. This is always the case regardless of what is specified for the geometry. In 02-settling/Size0001/inputs.box, the EB box mirrors the domain, fully covering all domain extents. So by defining the domain and geometry identically, the entire boundary is effectively specified as no‑slip walls.

Using the y‑direction as an example, you can introduce inflow/outflow boundaries by extending the EB box beyond the domain in y. Once a portion of the domain boundary is no longer covered by the EB geometry, you can define planes on the y‑low and y‑high faces and assign the desired boundary conditions.

Thanks this is very helpful!

If I define the geometry as an EB box, can I add a side inlet along the red square as shown in the figure below (left) or do I need to extend the geometry (using a CSG file) as shown on the right?

I want to inject DEM particles along the red square, not just fluid. How do I do that?

@oyedejifemi :backhand_index_pointing_up: this is why I prefer answering questions on the forum

You can define the geometry as an EB box and still add a side inlet along the red square. There’s no requirement to extend the geometry with a CSG file unless you specifically want additional geometric features. In the attached example, I set up a simple case with a fluid mass inflow at the bottom and a pressure outflow at the top. A cylinder is used to carve out a portion of the side wall to define an EB inflow patch that supports both fluid and DEM particle injection.

If you’re injecting particles through that side region, I recommend keeping the DEM volume fraction low. Otherwise, the seeding algorithm may place particles too densely, causing overlaps that it cannot fully resolve before particles enter the domain. I have some proposed updates to the seeding algorithm that should improve this behavior, but they still require substantial testing before being integrated into the main code.

inputs.dem.eb-flow.txt (4.6 KB)

IMO it’s good practice to keep your eb mi away from the domain extents too. it seems like if it’s backed right up do the edge of the domain your particles will be deleted before they make it into the domain.

Thanks that helped me a lot! The key for me was that the EB region is a volume that must intersect with the geometry, not the actual surface along which we want to apply the BC. I learned quite a bit with this exercise and I am summarizing my understanding based on this discussion and the documentation, in case this helps others (please correct me wherever I am wrong):

  1. The domain boundaries only define the background mesh extents. There is no default wall BC or other BC applied by default along the domain boundaries. Although the domain boundaries are set with geometry.prob_lo and geometry.prob_hi keywords, they are not related to an actual geometry outlining a wall.
  2. The wall geometry itself can be set by predefined shapes (a box, a cylinder, a sphere, not a combination of these) or through CSG and STL files for more complex shapes (CSG is preferred). These are volumes with a surface orientation to identify internal and external flows. A no-slip-wall BC is automatically applied over the entire geometry surface except where:
    • 2a. the geometry extends pas the domain boundaries. This leaves an opening, which must be assigned another BC (say inlet or outlet BC) though a plane or disk region.
    • 2b. the geometry overlaps with another region that is assigned an embedded boundary (EB) BC type. That EB region is a volume (box, cylinder, and sphere shape), and the surface defined by the intersection between the geometry and the EB region is where the BC is applied.
  3. It is better to keep the geometry away from the domain boundaries. Either extend it past the domain boundaries when inlets/outlets need to be defined along a boundary (say along y=ymin plane), or keep it well within the domain boundaries. If a box geometry is defined with exactly the same dimension as the domain size, a default offset of 1E-15 is used to shrink the box so the box is actually slightly smaller than the domain. This offset can be controlled by the keyword box.offset. It may be better to manually set a smaller box dimension and set the offset to zero. If one of the box face is along y=ymin, and a mass inlet is also specified along y=ymin plane, the inlet BC is not applied because the box is offset inwards, and the y=ymin plane falls outside the fluid region. In other words, the inlet BC does not override the box wall BC.
  4. Mass inlet (inflow) BC specified through a planar surface (plane or disk, see 2a) can inject gas, and PIC parcels, not DEM particles.
  5. EB mass inlet BC can inject gas, PIC parcels and DEM particles. The EB region must intersect with a geometry (see 2b).

The image below shows an example where the inlet BC is applied flush with the cylinder geometry. This is the same setup than Jordan sent, except I replaced the cube by a vertical cylinder. The yellow side inlet region is not part of the geometry (we don’t resolve the flow inside the side tube), it is only used to create the intersection between vertical cylinder and side inlet cylinder.

If the flow inside the side inlet tube needs to be resolved, we need to build the geometry as a CSG file, where the end of the side inlet tube is closed off and sits inside the domain. Then a side inlet region (say a cuboid, shown in yellow) overlaps with the side tube to create the surface where the inlet BC is applied (i.e., extract the cylinder cap). We can isolate the cap by filtering the intersected surface by normal vector. Here we want to inject particles where the normal points in the negative x direction. See image and input files below.


cylinder_cylinder.csg (428 Bytes)
inputs.dem.eb-flow_cyl_cyl.txt (6.1 KB)

This is a snapshot of the results showing the injected particles in blue:

1 Like