CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Main CFD Forum (https://www.cfd-online.com/Forums/main/)
-   -   Need help to solve N-S eqns with F.V.M (https://www.cfd-online.com/Forums/main/15788-need-help-solve-n-s-eqns-f-v-m.html)

vasilis September 25, 2008 08:27

Need help to solve N-S eqns with F.V.M
 
Hi,

I am trying to solve the Navier-Stokes eqns in a 3D duct, with the aid of Finite Volume Method. At the inlet, we know the velocity in the x-direction, and at the outlet we assume zero derivative of the velocity with respect to x.

When I descritized the eqns, I considered that there are cv nodes not only in the center of each volume cell, but also on the boundaries. These extra cv nodes helped me to calculate the gradients. For those cv nodes, I impose zero velocity in the x, y and z direction at the walls, zero velocity in the y and z direction at the inlet. Also, at those nodes the pressure is calculated by doing an extrapolation from the adjacent nodes.

Also, because the flow is incompressible, I set the value of the pressure to a certain value somewhere in the domain. The gradients at the cv nodes are calculated with central finite difference, whereas the gradients at the faces are calculated by doing a linear interpolation between the two adjacent cells.

I am solving the eqns following a Newton-Raphson scheme, and I observe that the solution does not converge. The pressure and the velocity obtain some really large values, i.e. 10^(13)

Does anybody have any idea what am I doing wrong?

Thank you for your time


vasilis September 25, 2008 08:45

Re: Need help to solve N-S eqns with F.V.M
 
An update, If I increase the number of cells then Newton-Raphson diverges faster, i.e. even at the first iteration the pressure has value of the order 10^(5).


vasilis September 26, 2008 04:52

Re: Need help to solve N-S eqns with F.V.M
 
I have tried many different things: I tried to solve the poisson eqn for the pressure, I tried setting the pressure to zero at the inlet or the outlet, but nothing. The pressure keeps acquiring large values.

Does anybody know how can I bound the pressure? What boundary conditions should I use for the pressure?

Thank you

andy2o September 26, 2008 14:16

Re: Need help to solve N-S eqns with F.V.M
 
This book by Patankar covers many of the basic causes of non-convergence and is a great guide:

http://www.cfd-online.com/Books/show_book.php?book_id=8

1) How are you coupling the momentum and pressure equations?

2) Have you tried for example the SIMPLE method - it's not quite clear from your posts?

3) Have you tested your linear solvers, etc on some simpler equations? Try a really small system of equations (<10 unknowns even) and compare with results from Matlab or Octave

4) Once you've tested your linear solvers, move on to try a simple PDE. For example, try using your mesh and solver to solve the heat equation. This help help show that there are no code bugs.

Good luck, Andy

vasilis October 7, 2008 02:56

Re: Need help to solve N-S eqns with F.V.M
 
Hi,

I am using a collocated mesh. The old code was implementing the SIMPLE method. After some reading I realized that is not possible to solve the eqns on a collocated grid without using the SIMPLE (or a similar) method. If I do not want to use the SIMPLE method, then I need to use a staggered grid.

With respect to your questions about the solver, I have tested it and it works.


All times are GMT -4. The time now is 13:41.