How to count the number of parcels in the solid outlet, and then inject the same number of parcels to the solid inlet in MFIX-PIC?

Hello,

I’m using the PIC method to model dense gas-solid flows. In my model, there is a solid inlet and a solid outlet, how do I count the number of parcels in the solid outlet, and then inject the same number of parcels to the solid inlet? Look forward to your reply. Thanks so much!

1 Like

There is no an existing subroutine that can do this, you may need to implement it. Since you want the solid outlet particle number =inlet particle number. That is the same as you control the constant total particle number (say 10000) in you reactor. You can add several lines in the file pic_flows_bc.f90, if the total particle number < 10000, then inject several particles to make the total particle number constant.

1 Like

Hi gaoxi,
Thank you so much for your suggestion! I have added the following lines in the file pic_flow_bcs.f90. It really works in a single processor. However, it doesn’t work in multiprocessors, results show the total number of parcels is not what I want. (The constant total parcel number is 120000). How can I realize the function in multiprocessors? Thank you again!!

     do phase=1,des_mmax
     pflow = pic_mi(bcv)%pflow(phase)*dtsolid
     pflow = pflow + pic_mi(bcv)%remdr(phase)
     if((120000-start_pip)>0) then
     pflow = real(120000-start_pip)
     else 
     pflow =0.0
     endif
     iseed = floor(pflow)

Can you post your files here? Thus we can have a look at it.

You have no logic in your modification that would allow this to work in parallel and I’d bet that you mass inflow is getting flooded with parcels. Each process only keeps track of the parcels it owns so the local number of parcels isn’t of use. Additionally, if the inlet is split by processor boundaries, then you need to distribute the amount of you are adding between the processes that share the inflow.

1 Like

Hello,
Thanks for your reply. My case is attached. It was built based on on the loop_seal example in MFIX. To realize the function in multiprocessors, I have further revised the code in file pic_flow_bcs.f90, as shown below. The main problem is that I don’t know how to accurately calculate the global number of parcels. I write the number of parcels to the file gPIP.dat in file time_march_pic.f90, as shown below. Then read the number from gPIP.dat, but the number is not accurate, which is not equal to the total PIP. loop_seal.tar (1.7 MB)

#Revision in file pic_flow_bcs.f90#
do phase=1,des_mmax

    pflow = pic_mi(bcv)%pflow(phase)*dtsolid
    pflow = pflow + pic_mi(bcv)%remdr(phase)
    
    OPEN(1,FILE = 'totP.dat', STATUS = 'OLD')
    READ(1,*) totP
    CLOSE(1)
    
    OPEN(2,FILE = 'gPIP.dat', STATUS = 'OLD')
    READ(2,*) gPIP
    CLOSE(2)
    
    if ((totP-gPIP)>0 .and. gPIP>50000 .and. pflow>0) then
      pflow = real(totP-gPIP)[loop_seal.tar|attachment](upload://u98AmCM7R16ERFR4eSF0LOF5389.tar) (1.7 MB) 
    else
      pflow = 0.0
    endif

    iseed = floor(pflow)

    pic_mi(bcv)%remdr(phase) = pflow - real(iseed)

#Revision in file time_march_pic.f90#
OPEN(3,FILE = ‘gPIP.dat’,STATUS = ‘OLD’)
WRITE(3,*) iVal(gPIP)
CLOSE(3)

When you sum the particles number, you should do like:
totP= PIP - IGHOST_CNT
CALL GLOBAL_ALL_SUM(TOTP)

1 Like

Here is a loop seal test case that can do solid particle circulation (without model standpipe) in MFiX-PIC with parallelization. The idea is to keep the total particles constant in the reactor. The limitation is that currently only one solid phase can be circulated, some work is needed to extend it to the poly-disperse case. Also, the case is not comprehensively tested.
solid_circulation_pic.avi (31.4 MB)
loop_seal_pic_3d3.zip (1.7 MB)

3 Likes

Ok! Thanks for your cases.