|
[Sponsors] |
Algorithm to solve 2D incompressible Navier-Stokes isn't working |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
September 11, 2018, 19:52 |
Algorithm to solve 2D incompressible Navier-Stokes isn't working
|
#1 |
New Member
Join Date: Sep 2018
Posts: 4
Rep Power: 8 |
I'm trying to figure out why the algorithm I've come up with to solve the 2D incompressible Navier-Stokes equations isn't working.
I'm using a finite difference discretized mesh on a square, with colocated velocity and pressure variables. I'm also using the Backwards Euler scheme for time advancement. The model I'm using is a simple driven cavity, with an initial velocity of zero inside the mesh and on all the boundaries except the top wall, which has an initial X velocity of 1 m/s. I discretize the velocity derivatives and second derivatives with central differences, and discretize the pressure derivative with backward differences. I also linearize the non-linear terms by multiplying them by the velocities from the previous time step. So for example in the X momentum equation there is the term U*dU/dx, so I replace "U" with the U velocity from the previous step. To compute a time step, first I build a matrix and a right-hand side representing the linear equations. This is done by looping through all of the mesh points and adding three rows for each mesh point; two for the X and Y momentum equations, and one for the continuity equation. I assume that the pressure gradient perpendicular to a boundary is zero. I also pin the pressure at one of the mesh points to be zero. Then I solve this system of linear equations to get the velocity and pressure values at the next time step. However this isn't working because the matrix has a rank that is always 1 less than the number of unknowns, so it doesn't have a unique solution. Should this algorithm work in principle, and I could just be missing one small thing that is causing the matrix to be rank-deficient by 1? Last edited by cactus man; September 11, 2018 at 21:27. Reason: Added information on how I linearized the non-linear terms. |
|
September 12, 2018, 00:58 |
|
#2 |
New Member
Join Date: Apr 2015
Posts: 17
Rep Power: 11 |
This sounds an awful lot like Step 11 of CFD Python: 12 steps to Navier-Stokes. Are you following this set of tutorials? Even if not, perhaps the code provided therein can help you pinpoint the error in your code.
|
|
September 12, 2018, 01:19 |
|
#3 | |
New Member
Join Date: Sep 2018
Posts: 4
Rep Power: 8 |
Quote:
I developed my algorithm as a way to answer the question "What velocity and pressure field at time 't + h' will result in a velocity gradient that when evolved backwards in time using the Backwards Euler method will result in the already known velocity field at time 't', and the velocity field satisfies the Continuity Equation?" But I'm not sure if that is exactly the correct question to be asking. Last edited by cactus man; September 12, 2018 at 01:23. Reason: clarification |
||
September 12, 2018, 02:58 |
|
#4 | |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,849
Rep Power: 73 |
Quote:
What exactly are you doing? The NSE are not reversible in time. Furthermore, the Poisson equation for the pressure is nothing else that the continuity equation div v = 0. |
||
September 12, 2018, 04:19 |
|
#5 | |
New Member
Join Date: Sep 2018
Posts: 4
Rep Power: 8 |
Quote:
|
||
September 12, 2018, 04:54 |
|
#6 | |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,849
Rep Power: 73 |
Quote:
When you work with the incompressible form of the NSE you have to consider that the pressure is only an auxiliary variable. In general, you can work using fully coupled method or some of the splitting-based method. To understand the matrix form of the full system, see Eq.(2) here http://www.ecs.umass.edu/mie/tcfd/Pa...ot_cfd2007.pdf the you can see the possible splitting methods. Note that in literature you can find a lot of fractional methods. |
||
Tags |
algorithm, incompressible, solver |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Filtered navier stokes equation..LES:: | Palani Velladurai | Main CFD Forum | 7 | September 6, 2013 03:51 |
Navier stokes compresible viscid flow fea, somebody can help? | Jose Choy | Main CFD Forum | 3 | October 24, 2003 03:28 |
1-d navier stokes equation | Robert | Main CFD Forum | 0 | December 20, 2002 03:14 |
help: I am trying to solve Navier Stokes compressible and viscid flow | Jose Choy | Main CFD Forum | 2 | May 18, 2000 06:45 |
any better way to solve 3D stokes flow? | Yangang Bao | Main CFD Forum | 0 | September 29, 1999 11:26 |