Imposed velocity profile

Questions and remarks about code_saturne usage
Forum rules
Please read the forum usage recommendations before posting.
Loïc A.
Posts: 9
Joined: Mon Mar 10, 2014 7:56 pm

Re: Imposed velocity profile

Post by Loïc A. »


I'm using Code_Saturne 3.0.3.

I want to impose a non-standard boundary condition : a suction velocity v(x) profile on the upper face of a parallelepiped:


This topic and the user guide strongly helped me write the following code:

Code: Select all

call getfbr ('Farfield',nlelt,lstelt)
do ilelt = 1,nlelt

  ifac = lstelt(ilelt)
  iel = ifabor(ifac) !cell adjacent to boundary face

  do iphas = 1, nphas
    itypfb(ifac,iphas) = iindef
    icodcl(ifac,iv(iphas)) = 1

    rcodcl(ifac,iv(iphas),1) = (0.12d0/7.d0)*((cdgfbo(1,ifac))/((0.0000333d0)**(-1.d0/7.d0)))
    rcodcl(ifac,iu(iphas),1) = 1.d0
    rcodcl(ifac,iw(iphas),1) = 0.d0

    rcodcl(ifac,iu(iphas),2) = rinfin
    rcodcl(ifac,iv(iphas),2) = rinfin
    rcodcl(ifac,iw(iphas),2) = 0.d0

    rcodcl(ifac,ik(iphas),1) = 0.000833d0 
    rcodcl(ifac,iomg(iphas),1) = 0.1318d0


Unfortunately, it doesn't work. Somebody can help me? And tell me what's wrong with the code or if I forgot something? I attach the compile.log file.

Thanks in advance for your help.

Best regards,
(4.82 KiB) Downloaded 52 times
Yvan Fournier
Posts: 3103
Joined: Mon Feb 20, 2012 3:25 pm

Re: Imposed velocity profile

Post by Yvan Fournier »


There is no "iphas" in Code_Saturne 3.0 and above.

You need to check the examples from Code_Saturne 3.0, not 2.0 (hint: it's about the same, without iphas).


Post Reply