CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   Main CFD Forum (http://www.cfd-online.com/Forums/main/)
-   -   Global mass conservation in pipe flow (http://www.cfd-online.com/Forums/main/110925-global-mass-conservation-pipe-flow.html)

 qrie December 26, 2012 03:29

Global mass conservation in pipe flow

Hi,

I am simulating flow through a pipe. In my code, as is usual - I have a factor(ratio of mass in/mass out) multiplying the exit velocity for global mass conservation.

At the inlet I have given a parabolic velocity profile and convective outflow bcs at the outlet. So now when the factor is calculated for the first time step, it becomes infinity(since mass out is zero at the exit boundary) and the whole thing blows up.

How to resolve this?

Thanks,
Qrie

 Rami December 27, 2012 04:58

Quote:
 Originally Posted by qrie (Post 399036) Hi, I am simulating flow through a pipe. In my code, as is usual - I have a factor(ratio of mass in/mass out) multiplying the exit velocity for global mass conservation. At the inlet I have given a parabolic velocity profile and convective outflow bcs at the outlet. So now when the factor is calculated for the first time step, it becomes infinity(since mass out is zero at the exit boundary) and the whole thing blows up. How to resolve this? Thanks, Qrie
Hi Qrie,

I don't think this trick is common, and it is actually unnecessary. If your code is properly written, the mass balance should be nearly perfect, especially for a pipe flow.

Good luck,
Rami

 cdegroot December 27, 2012 18:47

Yep, correction is unnecessary. If you really want to do this, however, just set limits for the max/min factor that you want to apply so it never gets too big or small because this will be much worse than allowing a mass imbalance. In the early iterations it really doesn't matter if there is a mass imbalance because the code should sort it out on its own as it converges.

 All times are GMT -4. The time now is 15:01.