Uslain in parallel computation
Posted: Thu Jun 19, 2014 9:55 am
Hi !
I am Alexis. I use Code_Saturne v3.0.0 and I have some questions about the Lagrangian module and the parallel computation.
I try to simulate the dispersion of particles in a turbulent channel flow on several processors. The fluid phase is now done and works well.
In order to get an handle on the lagrangian module, I began with a simple case of particles in an laminar flow. In a first time, I wish to inject the particles inside the channel with an inlet condition. In a second time, I use the subroutine "uslain" to distribute the particles in a homogenous way inside the channel. Then starts the computation. This case works perfect with a single processor.
The next step is to compute this case on several processors. And here comes my problem because computation does not work. After some attempts, I discovered that without the random distribution of the particles in "uslain", the computation runs with no problems.
So is it because this subroutine cannot work in parallel computation ? Or maybe the way the subroutine is coded isn't compatible in a parallel computation ?
Here is the code :
Regards.
Alexis
I am Alexis. I use Code_Saturne v3.0.0 and I have some questions about the Lagrangian module and the parallel computation.
I try to simulate the dispersion of particles in a turbulent channel flow on several processors. The fluid phase is now done and works well.
In order to get an handle on the lagrangian module, I began with a simple case of particles in an laminar flow. In a first time, I wish to inject the particles inside the channel with an inlet condition. In a second time, I use the subroutine "uslain" to distribute the particles in a homogenous way inside the channel. Then starts the computation. This case works perfect with a single processor.
The next step is to compute this case on several processors. And here comes my problem because computation does not work. After some attempts, I discovered that without the random distribution of the particles in "uslain", the computation runs with no problems.
So is it because this subroutine cannot work in parallel computation ? Or maybe the way the subroutine is coded isn't compatible in a parallel computation ?
Here is the code :
Thanks for reading me.! reinitialization of the counter of the new particles
npt = nbpart
! for each boundary zone:
do ii = 1,nfrlag
izone = ilflag(ii)
! for each class:
do iclas = 1, iusncl(izone)
! if new particles must enter the domain:
if (mod(ntcabs,iusloc(iclas,izone,ijfre)).eq.0) then
do ip = npt+1 , npt+iusloc(iclas,izone,ijnbp)
! Re-initialization of the particle location (B. Arcen):
! Generation of three random numbers (uniform distribution)
call zufall(3,vunif)
! The particle location (xp,yp,zp) is then changed
!
xp = vunif(1)*12.d0
yp = vunif(2)*2.d0
zp = vunif(3)*6.d0
! The number of the cell in which the particle [itepa(ip,jisor)] is located
! is found using the following base function
call findpt(ncelet,ncel, xyzcen,xp,yp,zp,ipnode,ndrang)
itepa(ip,jisor)=ipnode
! Finally the particle coordinate variables stored in ettp are updated
ettp(ip,jxp) = xp
ettp(ip,jyp) = yp
ettp(ip,jzp) = zp
! Velocity is set to zero
ettp(ip,jup) = 0.d0
ettp(ip,jvp) = 0.d0
ettp(ip,jwp) = 0.d0
enddo
npt = npt + iusloc(iclas,izone,ijnbp)
endif
enddo
enddo
Regards.
Alexis