Probleme with Outlet

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

Probleme with Outlet

Post by gdambrin »

Hi,
 
I'm trying to launch a calculation with a blade inside a mesh volume. I attach my file usclim.F that I filled in.
 
Top_Bottom & Left_Right & Blade :  Slide Wall
Outlet : Pressure outlet
Inlet :Velocity Inlet
 
With temporary results files, we can see a pressure drop at the outlet with a huge increment of the velocity (130m/s for an inlet velocity equal to 10). I don't know if my definition of the outlet is right ! What is the default value of the pressure applied on the outlet with this definition, Inlet pressure or zero value ? 
 

Code: Select all

     CALL GETFBR('Outlet',NLELT,LSTELT)
C    ===========
       DO ILELT = 1, NLELT
         IFAC = LSTELT(ILELT)
           DO IPHAS = 1, NPHAS
             ITYPFB(IFAC,IPHAS)   = ISOLIB
           ENDDO
C
       ENDDO 
I imposed a Po equal to the standard pressure 1.013D5 in the subroutine usini1.F. Is it a good idea ?

I think that my calculation is very very long due to this probleme of convergence at the outlet !
 
Thanks for your help.
 
Gauthier
Attachments
usclim.F
(41.61 KiB) Downloaded 281 times
Alexandre Douce

Re: Probleme with Outlet

Post by Alexandre Douce »

Your definition of the outlet seems to be right. The definition of DH in line 723 should not be commented, because you use it after. P0 is a gauge pressure. If your setup is independent of the pressure my advise is to keep P0 = 0.d0.
What turbulence model do you use ?
gdambrin

Re: Probleme with Outlet

Post by gdambrin »

Hi,
I use a k-epsilon model to do this calculation. Concerning DH, I don't really understand the meaning of this length in my study case. I had given the value of 80, as my inlet was like a square 60x60.
What do you think about this?
Concerning boundary conditions applied on Top_Bottom and Left_Right of my compound, what do you think about this choice ? Should I prefer Outlet with P0 equal to zero at the beginning as I tried with the reference value and I obtained a divergence?
Thanks for your help.
 
Gauthier
Alexandre Douce

Re: Probleme with Outlet

Post by Alexandre Douce »

The hydraulic diameter DH allows to initialize k and epsilon with a correlation at the inlet when you have something like a pipe. Perhaps this value has no meaning with your geometry, in this case you can comment the line with DH but also everything that use this value, and then impose by yourself values for k and epsilon.
Concerning Top_Bottom and Left_Right if there are not physically wall and enough far from the blade, prefer to impose symmetries.
Do you use a steady or unsteady algorithm (IDTVAR keyword) ?
 
gdambrin

Re: Probleme with Outlet

Post by gdambrin »

Hi,
Thanks for your answer. I will try to comment all lines concerning the hydraulic diameter. But, concerning the Top_Bottom & Left_Right boundary conditions, I'm modelling a blade of a wind turbine in a laminar flow. By imposing symmetry conditions, it's more similar than a rotor of an hydraulic turbine than a wind turbine, isn't it ?
IDTVAR = 0 in my case !
 
I have launched a calculation by setting all parameters as you explained and I will attach the results if the size is lower than 10000 kbites. The listing file in all cases.
 
Thanks for your help.
 
Gauthier
gdambrin

Re: Probleme with Outlet

Post by gdambrin »

I have just a question concerning the effect of DH and the subroutine you need to modify in order to cancel the effect of DH in the calculation of coefficients : k et epsilon. I don't  really understand the meaning of the different lines in the inlet.
 

Code: Select all

       CALL GETFBR('Inlet',NLELT,LSTELT)
       DO ILELT = 1, NLELT
         IFAC = LSTELT(ILELT)
         IEL  = IFABOR(IFAC)
           DO IPHAS = 1, NPHAS
             ITYPFB(IFAC,IPHAS) = IENTRE
             RCODCL(IFAC,IU(IPHAS),1) = 10D0
             RCODCL(IFAC,IV(IPHAS),1) = 0.D0
             RCODCL(IFAC,IW(IPHAS),1) = 0.D0
             UREF2 = RCODCL(IFAC,IU(IPHAS),1)**2
      &             +RCODCL(IFAC,IV(IPHAS),1)**2
      &             +RCODCL(IFAC,IW(IPHAS),1)**2
             UREF2 = MAX(UREF2,1.D-12)
C         Diametre hydraulique
             DH     = 80D0
C         Intensite turbulente
             XINTUR = 1.0D0
C
C
        What is the meaning of this following lines ?          

Code: Select all

          XKENT  = EPZERO
          XEENT  = EPZERO
C
          CALL KEENIN
C         ===========
      &        ( UREF2, XINTUR, DH, CMU, XKAPPA, XKENT, XEENT )
C
C     ITYTUR est un indicateur qui vaut ITURB/10
          IF    (ITYTUR(IPHAS).EQ.2) THEN
C
            RCODCL(IFAC,IK(IPHAS),1)  = XKENT
            RCODCL(IFAC,IEP(IPHAS),1) = XEENT
C
          ELSEIF(ITYTUR(IPHAS).EQ.3) THEN
C
            RCODCL(IFAC,IR11(IPHAS),1) = D2S3*XKENT
            RCODCL(IFAC,IR22(IPHAS),1) = D2S3*XKENT
            RCODCL(IFAC,IR33(IPHAS),1) = D2S3*XKENT
            RCODCL(IFAC,IR12(IPHAS),1) = 0.D0
            RCODCL(IFAC,IR13(IPHAS),1) = 0.D0
            RCODCL(IFAC,IR23(IPHAS),1) = 0.D0
            RCODCL(IFAC,IEP(IPHAS),1)  = XEENT
C
          ELSEIF(ITURB(IPHAS).EQ.50) THEN
C
            RCODCL(IFAC,IK(IPHAS),1)   = XKENT
            RCODCL(IFAC,IEP(IPHAS),1)  = XEENT
            RCODCL(IFAC,IPHI(IPHAS),1) = D2S3
            RCODCL(IFAC,IFB(IPHAS),1)  = 0.D0
C
          ELSEIF(ITURB(IPHAS).EQ.60) THEN
C
            RCODCL(IFAC,IK(IPHAS),1)   = XKENT
            RCODCL(IFAC,IOMG(IPHAS),1) = XEENT/CMU/XKENT
C
          ENDIF
C
C --- On traite les scalaires rattaches a la phase courante
        IF(NSCAL.GT.0) THEN
          DO II = 1, NSCAL
            IF(IPHSCA(II).EQ.IPHAS) THEN
               RCODCL(IFAC,ISCA(II),1) = 1.D0
            ENDIF
          ENDDO
        ENDIF
Alexandre Douce

Re: Probleme with Outlet

Post by Alexandre Douce »

The purpose of the subroutine KEENIN is to provide values for the turbulent variables k and epsilon (XKENT,  XEENT) with a standard correlation for a pipe. The parameters for this correlation are UREF2, XINTUR, DH, CMU, XKAPPA. The use of this subroutine is not mandatory.

In your case, I belive that you do not need this correlation. Therefore just comment the lines
c          CALL KEENIN
C          ===========
c     &        ( UREF2, XINTUR, DH, CMU, XKAPPA, XKENT, XEENT )

and add just after
 
        XKENT  = 1.e-10
          XEENT  = 1.e-10
 
in order to initialize with something (i.e. very low turbulence at the inlet) k and epsilon.
gdambrin

Re: Probleme with Outlet

Post by gdambrin »

Hi,
 
I launched a new calculation but I obtained a divergence after 72 iterations.

I attached the listing file and the two subroutines : usclim and usini1, as I don't really know why I obtain a divergence.
 
Thanks for your help.
 
Gauthier
Attachments
usini1.F
(60.45 KiB) Downloaded 284 times
usclim.F
(41.82 KiB) Downloaded 269 times
listing.txt
(378.72 KiB) Downloaded 268 times
César Vecchio

Re: Probleme with Outlet

Post by César Vecchio »

Previously gdambrin wrote:

Hi,
 
I launched a new calculation but I obtained a divergence after 72 iterations.
I attached the listing file and the two subroutines : usclim and usini1, as I don't really know why I obtain a divergence.
 
Thanks for your help.
 
Gauthier

Perhaps it's due to the way you calculate the gradients, Try choosing a gradient calculation method as "least squares method over extended cell neighbourhood" (IMRGRA=2 or Numerical Parameters - -> Global parameters under the GUI). Because I work with not so powerful hardware it helps me to attain convergence with relative coarse meshes and still have good results.
 
Now since here some comments have been made about the Hydraulic Diameter, what about for external flows or 2D simulations? Or for inlets that are not pipes in internal flows such as HVAC situations? Usually for the latter I set up the hydraulic diameter as that of the inlet which is for example the opening of a split air conditioner, so I'm thinking now that the initial intants might not be accurate (as the runs I did were long the effects must have dissipated after reaching steady state).
Would it be logical setting the hydraulic diameter as, for example, that of the frontal area of a wing or any other body in external flows?
 
Alexandre Douce

Re: Probleme with Outlet

Post by Alexandre Douce »

this thread continues here:
https://code-saturne.info/products/code-saturne/forums/general-usage/851877321/673805646
Post Reply