3
$\begingroup$

My FDM code simulates Backward Facing Step flow when I use conventional BCs such as defining velocity profile at inlet and fully developed condition at outlet. I have validated the results and it seems functioning correctly.

However, when I want to impose a pressure-pressure condition (both static), it only converges when a zero-gradient condition is selected for inlet. $$ @inlet: p=p_{in} \hspace{10 mm} ,\dfrac{du}{dx}=0 \hspace{10 mm}, \dfrac{dv}{dx}=0 $$ $$ @outlet: p=p_{out} \hspace{10 mm},\dfrac{du}{dx}=0 \hspace{10 mm}, \dfrac{dv}{dx}=0 $$ When I try to use mass balance to update inlet normal velocity at each iteration, the solution eventually blows up. I am integrating outflow and use the mean velocity as a uniform inlet velocity. $$ @inlet: p=p_{in} \hspace{10 mm} ,u=U_{in} \hspace{10 mm}, v=0 $$ $$ @outlet: p=p_{out} \hspace{10 mm},\dfrac{du}{dx}=0 \hspace{10 mm}, \dfrac{dv}{dx}=0 $$ where $U_{in}$ is found from last iteration mass balance.

Also I am interested to know if there is any difference to use momentum balance and mass balance to update inlet normal velocity.

Has anyone faced this problem before? I appreciate your help

$\endgroup$
5
  • $\begingroup$ Is this for incompressible flow? Also, can you please use equations to describe the velocity and pressure BCs? $\endgroup$
    – Charles
    Aug 28, 2016 at 3:13
  • $\begingroup$ Thanks @Charlie. The equations are included now. I suspect this is a problem of BC over-specification. $\endgroup$ Aug 30, 2016 at 2:41
  • $\begingroup$ I wonder if getting U_in from the previous time-step is causing error to build up. If you reduce the time-step, does the instability develop at a later time? $\endgroup$
    – Malcolm
    Aug 30, 2016 at 4:42
  • $\begingroup$ yes @Malcolm , it will become unstable at a later time. The interesting thing is that when zero-gradient condition at inlet converges, the information is coming from the domain (not fixed by me). Again, when the uniform inlet flow leads to divergence, the information is coming from domain, not me. $\endgroup$ Aug 30, 2016 at 18:02
  • $\begingroup$ Are you trying to impose Periodic boundary conditions? I think because you have a fixed pressure gradient and a mass balance based velocity inlet, your fluid keeps on accelerating and it eventually blows up. Maybe you could try a Neumann pressure boundary condition at the outlet, keeping other boundary conditions same. $\endgroup$ Jan 29, 2017 at 10:07

1 Answer 1

1
$\begingroup$

A complication arises when you specify both the mass balance and the pressure differnce for an incompressible fluid because the pressure and velocity are coupled. A certain pressure difference can only have a particular set of velocities in the domain which satisfy the Navier Stokes equations. At the grass root level it can be explained by applying the Bernoulli's equation for a one dimensional problem at the INLET and the OUTLET

\begin{equation*} p_{in}+\dfrac{1}{2}\rho V_{in}^2 = p_{out}+\dfrac{1}{2}\rho V_{out}^2 \end{equation*}

If you were specifying the mass balance $V_{in}$ and pressure differnce $p_{out}-p_{in}$ you would be only left with $V_{out}$ in an incompressible fluid, which sounds reasonable. However the principle of mass conservation also has to be religioulsy followed which is why the solver fails. The mass balance equation is written as:

\begin{equation} A_{in}V_{in}=A_{out}V_{out} \end{equation} where $A_{in}$ and $A_{out}$ are the cross-sectional areas of the INLET and the OUTLET. It would be satisfied only if the INLET velocity $V_{in}$ prescribed by you and the OUTLET velocity $V_{out}$ obtained through the Bernouli equation matches with the ratios of the cross sectional areas as well. However this is rarely the case, and thus the equations you solve in the numerical solver, fail the check for conservation of mass. This causes the solver to explode.

Do note that this would not be the case if the solver was compressible. The density $\rho$ would adjust itself accordingly to satisfy the Navier Stokes equations and also the conservation of mass.

To asnwer your second question, if specifying the mass balance is the same as applying the momentum balance. Again it boils down to the compressibility of the fluid. If the fluid is compressible then the mass balance is not the same as applying the momentum balance. However if you are using an incompressible fluid, the momentum inlet would simply be $\rho $ times the velocity inlet.

$\endgroup$
4
  • $\begingroup$ Thanks @Vikramaditya. I guess you are right. However, I am still not sure that I am over-specifying the conditions, because both inlet and outlet velocity adapt themselves to the solution after each iteration. $\endgroup$ Aug 30, 2016 at 18:08
  • $\begingroup$ @Ferferimori When you specify/prescribe the inlet velocity, you do not allow the velocity to adapt itself. Or have I misunderstood your comment? $\endgroup$ Aug 31, 2016 at 6:22
  • $\begingroup$ I see your point. But I do not understand why a zero-gradient inlet velocity (using last iteration data) is not over-specification, while mass flow balance (again using last iteration data) is over-specification. $\endgroup$ Aug 31, 2016 at 23:25
  • 1
    $\begingroup$ Hello @Ferferimori, I think I understand your question now. You are right in saying that a zero gradient velocity (using last iteration data) forcibly prescribes the velocity at the INLET and OUTLET. However this velocity it acquired from the previous iteration had already satisfied the mass conservation principle (assuming the residuals were very small). But if you were to prescribe the velocity yourself, it is quite likely that it is not satisfying the mass conservation principle and that is why the solver explodes. $\endgroup$ Sep 1, 2016 at 11:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.