CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   CD-adapco (http://www.cfd-online.com/Forums/cd-adapco/)
-   -   Boundary cell looping in posdat.f [v4.06] (http://www.cfd-online.com/Forums/cd-adapco/56788-boundary-cell-looping-posdat-f-v4-06-a.html)

hirokata September 4, 2008 20:24

Boundary cell looping in posdat.f [v4.06]
 
Hello all-

I need to identify neighboring cell pair, front and back, at a (baffle) boundary, in order to calculate flux across it. I am using the FsetBoun looping macro in posdat.f to get the cells attached to the boundary as below:

C************************************************* **********

if (level.eq.1) then

do ir = 1, regi_no

if (regi(ir)%type.eq.BAFF) then

call FsetBoun(fs,0,ND_ALL,NSD_ALL,ir,ISIDE_ALL)

do nset=1,fs%no

do j=fs%ns(nset), fs%ne(nset)

i1 = lfc(1,j)

i2 = lfc(2,j)

! Baffle 1

if (ir.eq.7) then

! some actions

end if

end do

end do

end if

end do

end if

C************************************************* **********

With the above code I can identify all the cells at the boundary. But what I really want to do is to identify the "pairing" cells across the boundary. I was hoping lfc(,) will accomplish this task, but it seems that, at a boundary, lfc(1,j) will return the neighboring cell number and lfc(2,j) will give me negative of the face number at the boundary. The version I am using is V4.06.

As I understand acquiring of pairing cells aross a boundary was possible in Version 3. I am hoping there is a simple way I can accomplish that that I'm not aware of. If any of you know a solution to this problem please let me know since I have been at this for months. Thank you very much in advance for your response.

hirokata

Stephanie September 5, 2008 09:22

Re: Boundary cell looping in posdat.f [v4.06] *NM*
 

Stephanie September 5, 2008 09:23

Re: Boundary cell looping in posdat.f [v4.06]
 
Are the cells on both side of the baffle belonging to different cell types. I would then use the function call cset and work with the subdomains.

hirokata September 5, 2008 11:21

Re: Boundary cell looping in posdat.f [v4.06]
 
Hi Stephanie,

Yes, each side of the baffle belongs to a different cell types. However, what I'm trying to do is to identify the pairing cells during the iterations.

hirokata

Stephanie September 8, 2008 02:55

Re: Boundary cell looping in posdat.f [v4.06]
 
well. I would find the pairs at the beginnning of the simulation, only once. I would save the pairs in table variables. If your pair cells belong to different types you can work with subdomains with call cset

hirokata September 14, 2008 12:42

Re: Boundary cell looping in posdat.f [v4.06]
 
Thank you Stephanie. I used the call cset and was able to find the pairing cells. I checked the table feature but it only seems to be capable of handling simplest functions. Do you happen to know the way to access 'cell diffusion coefficient' while looping the cells in the domain? I found "af(j)" but I believe this is the face diffusion coefficient. I appreciate for sharing that info if you happen to know it. Thanks!

hirokata

Stephanie September 22, 2008 14:34

Re: Boundary cell looping in posdat.f [v4.06]
 
sorry. I don't know how to get the cell diffusion coefficient. A call to Adapco support would certainly help. Or you should open a new forum message.


All times are GMT -4. The time now is 01:53.