Incorrect value for convective outlet boundary condition coefficients in condli.f90

Questions and remarks about code_saturne usage
Forum rules
Please read the forum usage recommendations before posting.
Post Reply
Mohammad
Posts: 114
Joined: Thu Oct 25, 2018 12:18 pm

Incorrect value for convective outlet boundary condition coefficients in condli.f90

Post by Mohammad »

Hello,

As it is mentioned in the theory PDF file of Code_Saturne 6.0.4, for the convective outlet boundary condition we have:
A = (1/(1+CFL))Y
B = (CFL/(1+CFL))
I checked these values by discretizing the equation and they are 100% correct.

As I noticed the A corresponds to coefa and B corresponds to coefb in the condli.f90 file.
But in that file for the set_convective_outlet_vector subroutine, the value of B is:

Code: Select all

coefb(isou,jsou) = cflv(isou)*(1.d0+cflv(isou))
Which means:
B = (CFL*(1+CFL))
Now you can see that the "*" must be replaced by "/" in the code which leads to:

Code: Select all

coefb(isou,jsou) = cflv(isou)/(1.d0+cflv(isou))
This mistake has also been taken place in the set_convective_outlet_tensor and set_convective_outlet_vector_aniso subroutines.

========================================
Also the input values for this type of B.C was confusing for me and some users, so I checked the code and found out that for this type of B.C we have:
rcodcl(ifac,ivar,1) = The value of ivar at previous time step
rcodcl(ifac,ivar,2) = CFL number based on the celerity value.

Hope that this will be helpful and will be corrected in the next versions.

Regards,
Mohammad
Yvan Fournier
Posts: 4077
Joined: Mon Feb 20, 2012 3:25 pm

Re: Incorrect value for convective outlet boundary condition coefficients in condli.f90

Post by Yvan Fournier »

Hello,

Thanks for the feedback. Some colleagues who know this part of the code better than I do should be looking into this, so it should be fixed soon.

Best regards,

Yvan
Erwan Le Coupanec
Posts: 45
Joined: Sun Sep 08, 2013 8:50 pm

Re: Incorrect value for convective outlet boundary condition coefficients in condli.f90

Post by Erwan Le Coupanec »

Hello,

Many thanks for the bug report. It is now fixed on master, 6.2, 6.1, 6.0 and 5.0 branches.

Best regards,
Erwan
Post Reply