code-saturne / code_saturne

code_saturne public mirror
https://www.code-saturne.org
GNU General Public License v2.0
215 stars 80 forks source link

Small boundary mass flux of scalar leads to null values of concentrations in CS v6.0 and v7.0 #121

Open burkhart68 opened 10 months ago

burkhart68 commented 10 months ago

Putting a small mass flux Qm of the order of microgram/m2/s ( rcodcl (ifac, isca(iscal), 3) = -Qm in cs_user_boundary_conditions.f90 ) leads to zero mass fraction values, when larger values of Qm give finite values. I tried different turbulence models (k-eps, k-omega-sst) with different wall functions (2 scales + scalable with/without log laws). My y+ are quite small (<1). Following one advice from Y.Fournier, I rewrote the routine as a volumic source term close to the emiting surface, but the problem persists.

YvanFournier commented 9 months ago

Hello,

This might be due to truncation error/numerical sensitivity aspects. If you have a small and simple test case, I could try to test this "in depth" to try to understand the behavior and provide a fix or workaround.

as a workaround, if the mass flux is very small relative to the "main" mass flux through a cell's faces, the mass fraction addition could be ignored, and a scalar concentration could be injected directly as a Neumann condition.