CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Main CFD Forum (https://www.cfd-online.com/Forums/main/)
-   -   SIMPLE scheme question (https://www.cfd-online.com/Forums/main/143873-simple-scheme-question.html)

wm2300 November 4, 2014 17:08

SIMPLE scheme question
 
Dear all,

I am trying to implement the SIMPLE scheme for steady state incompressible flow simulations.

I use a false transient approach in order to linearize the convective term (I use convective fluxes from previous timesteps). This can also be regarded as a relaxation which I add to the updates of the momentum equations in subsequent timesteps.

Now, one of the major ambiguities which I seem to find in literature is the definition of inner and outer iterations in the simple scheme (i.e. from Ferziger).

I have one iteration loop for my false transient, which I would assume to be my outer loop. Now, from literature I seem to understand that, in every timestep, I first calculate the estimates u* and v* based on the pressure of previous timestep; then proceed in calculating the pressure correction p'; correcting the velocities and the pressure and again perform a new calculation to achieve new u* and v*, based on p + p', until my p' becomes smaller than a chosen tolerance (these would be the inner iterations); as mentioned in Patankar's book on Numerical Heat Transfer in Section 6.7-1 (point 7)

I would not however update my coefficient matrix in the inner iterations, which would render my velocity update useless actually (unless I take the tolerance on p' to be rather loose).

Now my question is, is this the correct approach for the simple scheme? Or do you need to update the coefficients for the convective terms in the matrices also in these inner iterations?

Literature does not seem to be giving me a closing answer due to a vague representation of what is done to the non-linear terms. Also, I've studied some implementations online and they seem to be doing different things as well.

I appreciate any feedback.

wm2300 November 4, 2014 17:15

or is this velocity correction only really useful for instance to solve a transport equation for temperature which then in turns influences the flow itself? (so that we must transport it through the domain using current velocity values)

In my approach, taking strict tolerances on my inner iterations, the momentum equations themselves will serve as velocity correction equations.

Parth04 November 5, 2014 04:49

why dont u go for semi explicit approach in place of implicit, it has better unsteady accuracy compared to SIMPLE (anderson), (though it has limitation on time step selection),
by the way, what r u using for iterative solution of pressure poisson's equation??? , i need help in that matter
thnx in advance

wm2300 November 5, 2014 05:29

I use a direct solver for the pressure correction equation.

I'd just like to implement the classical SIMPLE algorithm to serve as a reference.

Let me clarify:

Right now I have 2 nested loops:

Outer loop (iteration number = n):

1. Use u(n-1) from previous timestep to calculate mass fluxes for convective terms
2. Construct coefficient matrices Au and Av for momentum equation.

Inner loop (iteration number = m):
  1. Use p(m-1) as source term in the momentum equation.
  2. Solve momentum equation for u* and v* (direct solver)
  3. Solve pressure correction equation for p', using u* and v* to assess mass imbalance (direct solver)
  4. Correct the pressure p(m) = p(m-1)+urf*p'
  5. (Correct velocities?? But I don't use them to update coefficient matrices, so seems useless if I don't have to do e.g. scalar transport...)
  6. Tolerance check on p'
  7. If converged, exit loop and proceed in outer loop. Set u(n) = u*, v(n) = v* (these are auto-corrected by the momentum equation if my inner loop tolerance is strict)
  8. If not converged, go to 1.
3. Asses convergence of u (with u(n-1)).
4. If converged, quit
5. If not converged, go to outer loop step 1.

Is this the correct approach or should I update my coefficient matrix A everytime (which would leave my with only a single iteration loop)?

Parth04 November 5, 2014 07:06

though i dont have much experience of SIMPLE, from my knowledge of implicit formation i would say current approach is correct, as updating of co-efficient matrix should happen in next time step only, i.e. outside inner loop only . . .

but i think there should be 3 loops, one for time step, one for implicit solution for finding v tilda, one for implicit solution of p'

i m not sure about my opinions . . .

btw, what do u mean by solving p' equation using direct solver?? i m using GSSOR iterative technique.

Parth04 November 5, 2014 07:15

okk , i understood what do u mean by direct solver, can u help me implement it??? it is very necessary for me, i m working in multiphase flow, any referance about algorithm or code is highly appreciable. thanx in advance. . .

wm2300 November 5, 2014 07:20

The pressure correction equation in SIMPLE is just a linear equation which can be solved with for instance LU decomposition etc. (so no iterations required?)

Or do I not understand your questions correctly?

Parth04 November 6, 2014 04:12

ok , i got it

Parth04 November 6, 2014 04:41

can u give me ur code?? i want to see implementation of LU decomposition

thnx in advance

wm2300 November 6, 2014 04:52

Sadly I cannot give out my code due to the framework not being open source. It's a matlab code so I didn't implement the matrix solve myself (just used the backslash operator)

Parth04 November 6, 2014 04:55

no problem
thnx


All times are GMT -4. The time now is 16:07.