Wall stress discontinuous at restart
Posted: Thu May 05, 2016 12:20 pm
Dear users / developpers,
I am running version 4.0.4, LES of a periodic channel flow. I monitor the stress at the wall (output in the listing).
I have set ineedf=1 in the subroutine usipes. I compute the wall stress in cs_f_user_extra_operations, following the examples provided (cs_user_extra_operations-global_efforts.f90).
However, after a restart, the wall stress is discontinuous compared with the previous values. Maybe usipes is not the correct location to set ineedf = 1 ?
Any help would be much appreciated.
Best regards,
Cedric
P.S.: code in cs_user_extra_operations.f90
I am running version 4.0.4, LES of a periodic channel flow. I monitor the stress at the wall (output in the listing).
I have set ineedf=1 in the subroutine usipes. I compute the wall stress in cs_f_user_extra_operations, following the examples provided (cs_user_extra_operations-global_efforts.f90).
However, after a restart, the wall stress is discontinuous compared with the previous values. Maybe usipes is not the correct location to set ineedf = 1 ?
Any help would be much appreciated.
Best regards,
Cedric
P.S.: code in cs_user_extra_operations.f90
Code: Select all
! Local variables
integer ifac
integer ii
integer ilelt , nlelt
double precision xfor(3)
double precision, dimension(:,:), pointer :: bfprp_for
integer, allocatable, dimension(:) :: lstelt
! Initialization
if (ineedf.eq.1) call field_get_val_v(iforbr, bfprp_for)
! Allocate a temporary array for cells or interior/boundary faces selection
allocate(lstelt(nfabor))!max(ncel,nfac,nfabor)))
if (ineedf.eq.1) then
! Bottom wall
do ii = 1, ndim
xfor(ii) = 0.d0
enddo
call getfbr('y<=-0.999', nlelt, lstelt)
do ilelt = 1, nlelt
ifac = lstelt(ilelt)
do ii = 1, ndim
xfor(ii) = xfor(ii) + bfprp_for(ii, ifac)
enddo
enddo
if (irangp.ge.0) then
call parrsm(ndim,xfor)
endif
if (irangp.eq.0) then
write(nfecra,*) 'output : friction bot wall = ',xfor
endif
! Top wall
do ii = 1, ndim
xfor(ii) = 0.d0
enddo
call getfbr('y>=0.999', nlelt, lstelt)
do ilelt = 1, nlelt
ifac = lstelt(ilelt)
do ii = 1, ndim
xfor(ii) = xfor(ii) + bfprp_for(ii, ifac)
enddo
enddo
if (irangp.ge.0) then
call parrsm(ndim,xfor)
endif
if (irangp.eq.0) then
write(nfecra,*) 'output : friction top wall = ',xfor
endif
endif
! Deallocate the temporary array
deallocate(lstelt)
return