Y+ post-treatment
Posted: Thu Jul 21, 2011 8:40 am
Hello,
I study a flow inside a pipe and I need to calculate the average of the y+ at the wall, so I wrote the next program :
1) I use this code on two different configurations, a straight pipe and a curving pipe. In comparison with paraview, I obtain good results for the curving pipe but not for the straight pipe. So does someone know if I have some mistakes in my code.
2) I observe when we see just "YPLUS = RA(IYPLBR+IEL-1)", we obtain some negative and zero values, I don't understand why, have you an idea about the origin of my problem? Furthermore, I would like to know how the y+ is really calculated.
Many thanks,
Best regards,
Pauline
I study a flow inside a pipe and I need to calculate the average of the y+ at the wall, so I wrote the next program :
I noticed two surprising things:!==============================================================================
! Post-traitement du y+
!==============================================================================
!
!================Post-traitement du y+ en entree===============================
!
! localisation du groupe representant l'entree du tube
! nom : "ENTREE"
CALL GETFBR('ENTREE',NLELT,LSTELT)
!=========
DO ILELT = 1, NLELT
IFAC = LSTELT(ILELT)
IEL = IFABOR(IFAC)
YPLUS_E = YPLUS_E + RA(IYPLBR+IEL-1)
ENDDO
!
! si calcul parallele
IF(IRANGP >= 0) THEN
CALL PARSOM(YPLUS_E)
ENDIF
!
!
IF(IRANGP >= 0) THEN
CALL PARCPT(NLELT)
ENDIF
!
NLELT_E = NLELT
!
!
!================Post-traitement du y+ en sortie===============================
!
! localisation du groupe representant la sortie du tube
! nom : "SORTIE"
CALL GETFBR('SORTIE',NLELT,LSTELT)
!=========
DO ILELT = 1, NLELT
IFAC = LSTELT(ILELT)
IEL = IFABOR(IFAC)
YPLUS_S = YPLUS_S + RA(IYPLBR+IEL-1)
ENDDO
!
!
! si calcul parallele
IF(IRANGP >= 0) THEN
CALL PARSOM(YPLUS_S)
ENDIF
!
!
IF(IRANGP >= 0) THEN
CALL PARCPT(NLELT)
ENDIF
!
NLELT_S = NLELT
!
!
!================Post-traitement du y+ au milieu===============================
!
! localisation du groupe representant le milieu du tube
! nom : "EXT"
CALL GETFBR('EXT',NLELT,LSTELT)
!=========
DO ILELT = 1, NLELT
IFAC = LSTELT(ILELT)
IEL = IFACEL(2,IFAC)
YPLUS_M = YPLUS_M + RA(IYPLBR+IEL-1)
ENDDO
!
!
! si calcul parallele
IF(IRANGP >= 0) THEN
CALL PARSOM(YPLUS_M)
ENDIF
!
!
IF(IRANGP >= 0) THEN
CALL PARCPT(NLELT)
ENDIF
!
NLELT_M = NLELT
!
!
!===========Calcul de la moyenne de y+ sur le domaine=======================
!
!
YPLUS_MOY = (YPLUS_E + YPLUS_S + YPLUS_M)/(NLELT_E + NLELT_S + NLELT_M)
1) I use this code on two different configurations, a straight pipe and a curving pipe. In comparison with paraview, I obtain good results for the curving pipe but not for the straight pipe. So does someone know if I have some mistakes in my code.
2) I observe when we see just "YPLUS = RA(IYPLBR+IEL-1)", we obtain some negative and zero values, I don't understand why, have you an idea about the origin of my problem? Furthermore, I would like to know how the y+ is really calculated.
Many thanks,
Best regards,
Pauline