Dirichlet boudary condition for inlet and outlet

Questions and remarks about code_saturne usage
Forum rules
Please read the forum usage recommendations before posting.
Yvan Fournier
Posts: 4077
Joined: Mon Feb 20, 2012 3:25 pm

Re: Dirichlet boudary condition for inlet and outlet

Post by Yvan Fournier »

Hello,

Yes, it is surprising that the pressure is non-monotonic. What type of boundary condition did you use in the GUI ? The user Fortran subroutine only replaces parts you speify, but may leave some other values, so it may be interesting to specify the inlet as being a free inlet/outlet or an outlet. Specifying it as an outlet is not a very good solution because the inlet values for scalars are not defined, but for velocity, this is not an issue, so it may be interesting to try it as an intermediate step.

Best regards,

Yvan
Tsubasa
Posts: 175
Joined: Fri Nov 20, 2020 4:09 am

Re: Dirichlet boudary condition for inlet and outlet

Post by Tsubasa »

Hello,

In GUI, I selected usual boundary conditions as followings;
boundary_condition_GUI.png
Soryy I am not sure what you mean.
Do you mean it is better to try to specify the inlet as being a free inlet/outlet or an outlet as an intermediate tep?

Best regards,
Hamada
Yvan Fournier
Posts: 4077
Joined: Mon Feb 20, 2012 3:25 pm

Re: Dirichlet boudary condition for inlet and outlet

Post by Yvan Fournier »

Hello,

I am not sure which is better in this case, so I recommend testing various combinations first (fast) and checking the theoretical/validity aspects later (longer).

But anybody on this forum who knows these parts of the code better than I do is welcome to comment.

Best regards,

Yvan
Tsubasa
Posts: 175
Joined: Fri Nov 20, 2020 4:09 am

Re: Dirichlet boudary condition for inlet and outlet

Post by Tsubasa »

Hello,

As far as I understand, when we impose pressure value at inlet and outlet, we can get velocity value by Bernoulli's equation as can be seen here; https://www.youtube.com/watch?v=Er2j5Kq17as
However, my simulaiton became divergent even though I follow the video.

If I put pressure value and 0m/s (zero velosity) at inlet at the same time, the computation is stable, but I am not sure whether this is purely pressure driven flow or not.
Fortran code is

Code: Select all

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

!Dirichlet B.C for velocity:
    icodcl(ifac,iu) = 1 ! 1 means Dirichlet
    rcodcl(ifac,iu,1) = 0 !ux

    icodcl(ifac,iv) = 1
    rcodcl(ifac,iv,1) = 0 !uy

    icodcl(ifac,iw) = 1
    rcodcl(ifac,iw,1) = 0 !uz

!Dirichlet B.C for pressure:
   icodcl(ifac,ipr) = 1
   rcodcl(ifac,ipr,1) = 0.633
 
enddo


call getfbr('outlet', nlelt, lstelt)
do ilelt = 1, nlelt
   ifac = lstelt(ilelt)
   icodcl(ifac,ipr) = 1
   rcodcl(ifac,ipr,1) = 101325.0

   icodcl(ifac,iu)= 3
   icodcl(ifac,iv)= 3
   icodcl(ifac,iw)= 3
enddo
Could you someone give me tips?
Or Yvan, could you ask your team about this?

Best regards.
Tsubasa
Tsubasa
Posts: 175
Joined: Fri Nov 20, 2020 4:09 am

Re: Dirichlet boudary condition for inlet and outlet

Post by Tsubasa »

I will ask this question in another post again.

Best regards,
Tsubasa
Post Reply