Why I get unbounded solution when I shouldn't?
I simulate a scalar field with inlet value equal to 1 and no sources/sinks in the domain (there is one more inlet with zero scalar value). Naturally, I'd expect to have solution within [0;1], however I get some negative values, the same order of magnitude as the positives, in some inletadjacent cells :confused: Most curious, the solution converges to a high accuracy (1e15), which means it should be correct :confused: WTF?!! I use first order upwind for the scalar, nothing special to note, apart from that inlet diffusion is disabled. But even enabling it only diminished the problem, did not eliminate it.
I've noticed that the scalar diffusion coefficient plays role. Setting higher diff. coeff. leads to higher oscillation, i.e. more and higher magnitude negative values. Yet again, solution converges perfectly. I;ve tried relaxing, but as you guess, it helps convergence, which is no problem by itself, and does not change the final converged solution. 
Show the geometry. You may have recirculation.

2 Attachment(s)
Here is the inlet colored by scalar cell values after convergence. The inlet supplies fixed flow velocity (0.0113m/s) with fixed value of scalar (=1). I don't get how circulation can change the values to negatives as no parts of the domain have sinks. Nothing can decrease value below zero, physically. The only possible twist is I've disabled inlet diffusion. So no diffusive flux from the inlet is expected, only convective. But still that should only possibly increase the scalar value in the nearby cells.

What is your scalar function? I work with the level set method and you need to initialize the scalar level set function everywhere in the domain (volume) including all boundaries at the initial time step, but not only on the inlet boundaries. At the initial, the scalar function varies between 0 and 1, but when it evolves in transient (unsteady), it may have negative values depending of the evolution of the flow or for example if it's an outlet. The maximum value of you scalar is 0.0981 instead of 1. Is the value of the scalar of the inlet really fixed to 1?

I solve steady state. The value of the boundary is 1, as is the boundary condition, but you won't see it on the pictures, becuse they show cell center values after convergence. I have tried different strategies to initialize, with 0, 1 and in between for all cells in the domain. With the same result. It simply converges to what you see. Negative values at some cells adjacent to inlet. And it converges well, reeeeally well (res 1e15). I continue to think that the disabled inlet diffusion (which you control via the UDS panel) is the culprit, but I can not see why and how it will create negatives of that order.

All times are GMT 4. The time now is 08:46. 