Boundary condition transformation

Hi experts, I want to implement cyclic boundary conditions and wall boundary conditions alternating in sequence, e.g. when 0<time<n, boundaries 1 and 2 in the below figure are cyclic boundaries; when n<time<2n, boundaries 1 and 2 in the diagram are slip-wall boundaries,… In other words, every once in a while, the dem-particles perform a Y-cycle. I don’t know if this is possible to implement, could you give me some suggestions? Thanks!
image

Hello, developers. Can you tell me which .f code in source file the cyclic-BC corresponds to? Thank you!

@jeff.dietiker @cgw , dear teachers, could you answer my questions? Thank you very much!!

This is spread in many routines. Please do a search (grep is a nice tool to search for a given string in a list of files) for 'CYCLICandDES_PERIODIC_WALLS` .

In model/des/desgrid_mod.f you will see how the des grid cell indices are offset when there is cyclic bcs. Look for dg_cycoffset in that file.

Elaborating on what Jeff wrote:
grep -r
will recursively search through all files and subdirectories, and
grep -i
will ignore case.

So, something like

(mfix-23.3.2)$  cd $CONDA_PREFIX/share/mfix/src/model

(mfix-23.3.2)$  grep -ir des_periodic_walls
tutorials/pic/mixer_3d/des_time_march.f:         IF (DO_NSEARCH .OR. (numPEs>1) .OR. DES_PERIODIC_WALLS) THEN
[...] # many lines of output

Now, to restrict that to lines that also match cyclic:

(mfix-23.3.2)$  grep -ir des_periodic_walls | grep -i cyclic
model/check_data/check_solids_common_discrete.f:      DES_PERIODIC_WALLS_X = CYCLIC_X .OR. CYCLIC_X_PD
model/check_data/check_solids_common_discrete.f:      DES_PERIODIC_WALLS_Y = CYCLIC_Y .OR. CYCLIC_Y_PD
model/check_data/check_solids_common_discrete.f:      DES_PERIODIC_WALLS_Z = CYCLIC_Z .OR. CYCLIC_Z_PD

Hope this helps,
– C

1 Like

Thank you very much for your patient reply. It’s so helpful.

Thank you very much for your patient reply! Let me see.