Page 1 of 1

Output of Yplus values on the main volume mesh.

Posted: Tue Dec 10, 2013 6:02 pm
by rezki
Hello,

I use code_saturne.2.0.2 and I run simulation with K-Omega SST model.
I try to post-treat the Yplus values using usvpst.f90 routine.

Code: Select all

if (ipart .eq. -1) then

  iphas = 1  
    ! Initialize variable name
    do ii = 1, 32
      namevr(ii:ii) = ' '
    enddo
 
    ! Variable name
    namevr = 'Yplus_int1'
      idimt = 1
      ientla = 0
      ivarpr = 0

      do iloc = 1, ncelps
         iel = lstcel(iloc)
         tracel(iloc) = ra(iyppar+iel-1)
      enddo

      call psteva(ipart, namevr, idimt, ientla, ivarpr,          &
      !==========
                  ntcabs, ttcabs, tracel, rvoid, rvoid)
endif
The problem is that the Yplus values are clipped (by zero) and also there is a discontinuity of these values (see attached file).
1- Does any one know why Yplus values in the main volume mesh are clipped by zero ?
2- And why is there this discontinuity ?

Thanks in advance.
Regards.

RC

Re: Output of Yplus values on the main volume mesh.

Posted: Wed Dec 11, 2013 12:59 pm
by Yvan Fournier
Hello,

Regarding (2), you should check the usage of ivarpr, as explained in the usvpst.f90 user example.

Regards,

Yvan

Re: Output of Yplus values on the main volume mesh.

Posted: Wed Apr 23, 2014 7:02 pm
by rezki
Hello,

it seems that code_saturne doesn't calculate "yplus" values inside the main mesh when using RANS models, it does that only in the boundary faces. Hence, the array "ra(iyppar+iel-1)" is empty.

Could you please confirm this ?! and if possible, suggest a solution to post-process the yplus values inside the domaine and at the probes when using RANS models?!

For information, I already tried to create a new physical propriety in "varpos" routine :
iprop = iprop + 1
ipproc(iyplus(iphas)) = iprop
ipppst = ipppst + 1
ipppro(iprop) = ipppst
After that, I update the values of ipproc(iyplus(1)) in "tridim"
iiyplus = ipproc(iyplus(1))
do iel = 1,ncel
propce(iel,iiyplus) = ra(iyppar+iel-1)
enddo
and I post-processed it to have the Yplus values in the domain and at the probes using "usini1".
ipp = ipppro(ipproc(iyplus (1)))
nomvar(ipp) = 'iyplus'
ichrvr(ipp) = 1
ilisvr(ipp) = 1
ihisvr(ipp,1) = -1
But it doesn’t work because ra(iyppar+iel-1) is empty.

Regards.
RC

Re: Output of Yplus values on the main volume mesh.

Posted: Wed Apr 23, 2014 11:04 pm
by Yvan Fournier
Hello,

To force y+ inside the domain, check for ineedy in modini.f90.

I'n not sure setting this is enough to ensure everything is updated correctly, but it is a start (and then use "grep" happily from there).

Regards,

Yvan

Re: Output of Yplus values on the main volume mesh.

Posted: Fri Apr 25, 2014 11:29 am
by rezki
Thanks for your help,

I tried with "ineedy=1" but it doesn't work (ra(iyppar) is not updated). I'm not sure but I think that ineedy is used to force the distance to the wall and not the Y+.

I have an idea to post-process Y+ inside the domain but I need your opinion :

1- From "clptur", for each boundary face "iface" I save the corresponding "uet" and I look for the nearest cells to the normal of this face in main mesh.

2- I calculated then Yplus(iel) = uet * y(iel) / nu(iel).

Question : is there a solution in code_saturne to look for the nearest cells to the normal defined by (rnx,rny,rnz) ?!

Thank in advance

Re: Output of Yplus values on the main volume mesh.

Posted: Mon Apr 28, 2014 9:40 am
by Jacques Fontaine
Hello,

1) no
2) no

You must use distpr and distyp subroutines to compute y+ in the fluid domain. Set ineedy = 1 to get y(iel) and use distyp to get y+.
Regards,

Re: Output of Yplus values on the main volume mesh.

Posted: Mon Apr 28, 2014 6:46 pm
by rezki
Hello,

Ok, your solution works but I must force "clptur.f90" to update "uetbor(ifac,iphas)" even if the LES models are not used (itytur(iphas) not equal to 4).

So, the problem is solved by setting "ineedy=1" , using "distyp.f90" and comment the following line in "clptur.f90" to update "uetbor(ifac,iphas)" :

Code: Select all

 !if(itytur(iphas).eq.4.and.idries(iphas).eq.1) then
      uetbor(ifac,iphas) = uet
      if (visvdr(iel,iphas).lt.-900.d0) then
        propce(iel,ipcvst) = propce(iel,ipcvst)                   &
             *(1.d0-exp(-yplus/cdries(iphas)))**2
        visvdr(iel,iphas) = propce(iel,ipcvst)
        visctc = propce(iel,ipcvst)
      endif
  !endif
Thanks for help.
Regards

RC