Imposed velocity at outlet

Questions and remarks about code_saturne usage
Forum rules
Please read the forum usage recommendations before posting.
Post Reply
Alicia Consigny

Imposed velocity at outlet

Post by Alicia Consigny »

Hi all,

I have a case in which I know the velocity at the inlet and the total surface of the inlet, and I want to set the outlet so the flow leaving the domain is the same as the flow entering it. What do you think is the best way to program it in usclim ?

For now what I did is :

Code: Select all

      CALL GETFBR('Sortie',NLELT,LSTELT)
C     ===========
      DO ILELT = 1, NLELT
C
         IFAC = LSTELT(ILELT)
C
         DO IPHAS = 1, NPHAS
           ITYPFB(IFAC,IPHAS)   = ISOLIB
           ICODCL(IFAC,IU(IPHAS))=1
           ! Dirichlet condition for the velocity u
           RCODCL(IFAC,IU(IPHAS),1) = -2.33D0
           ! This is the Dirichlet value
           ICODCL(IFAC,IV(IPHAS))=1
           ! Dirichlet condition for the velocity v
           RCODCL(IFAC,IV(IPHAS),1) = 0.D0
           ! This is the Dirichlet value
           ICODCL(IFAC,IW(IPHAS))=1
           ! Dirichlet condition for the velocity w
           RCODCL(IFAC,IW(IPHAS),1) = 0.D0
           ! This is the Dirichlet value
          ENDDO
C
       ENDDO
Is it correct ? From the results after a zero time step calculation, it seems ok, but I'm not sure about the condition on v and w, as the flow can leave the domain in any direction (I mean the flow must go out of the domain, but there might be non zero components of the velocity in the y and z directions). I just calculated the velocity based on the inlet flow and the surface of the outlet, but what about the direction ?  Is there a way to directly impose the flow rate ?

Thanks in advance for your help,

Alicia
David Monfort

Re: Imposed velocity at outlet

Post by David Monfort »

Hello Alicia,

I don't really understand the reasoning behind your tests... If you have a mass flow entering at the inlet, then the same mass flow will be computed at the outlet (the equations are solved in a conservative way in space). Do you have several outlets?

In general, you don't want to set both the mass fluxes at the inlet and at the outlet...

Perhaps, you could attach a picture of your configuration so that we (I :)) can better understand your concern.

David
Post Reply