# SIMPLE Algorithm - Questions from a Beginner

 Register Blogs Members List Search Today's Posts Mark Forums Read

 August 9, 2010, 12:48 SIMPLE Algorithm - Questions from a Beginner #1 New Member   Emre Turkoz Join Date: Aug 2010 Posts: 12 Rep Power: 14 Hi everybody, I’m beginner in CFD and trying to implement SIMPLE algorithm using MATLAB. My guidebooks are “Numerical Heat Transfer and Fluid Flow” by Patankar and “An Introduction to Computational Fluid Dynamics” by Versteeg & Malalasekera. Using both books simultaneously really helped me a lot but still, I have a couple of questions. I have problems on the boundary conditions. I’m at the critical point where momentum and pressure correction equations are explained. As an explanation to the pressure correction equation, as far as I have understood, Patankar wrote that either the real values of normal velocity or the real values of pressure should be specified at boundaries. If we specify pressure values, then the correction p-field at boundaries should be zero. It’s clear so far. I wonder what happens in that case to the momentum equation’s boundary conditions. How do we specify them? Are they the ones from the previous iteration? And additionally: How do we set pressure difference values at these boundaries? Is it okey if I extend the pressure field from the previous iteration and extrapolate mirror nodes to get pressure difference and add it as a source term? Thank you all

August 9, 2010, 13:06
#2
New Member

Akinola
Join Date: Jul 2010
Posts: 25
Rep Power: 14
Quote:
 Originally Posted by Emre Turkoz Hi everybody, I’m beginner in CFD and trying to implement SIMPLE algorithm using MATLAB. My guidebooks are “Numerical Heat Transfer and Fluid Flow” by Patankar and “An Introduction to Computational Fluid Dynamics” by Versteeg & Malalasekera. Using both books simultaneously really helped me a lot but still, I have a couple of questions. I have problems on the boundary conditions. I’m at the critical point where momentum and pressure correction equations are explained. As an explanation to the pressure correction equation, as far as I have understood, Patankar wrote that either the real values of normal velocity or the real values of pressure should be specified at boundaries. If we specify pressure values, then the correction p-field at boundaries should be zero. It’s clear so far. I wonder what happens in that case to the momentum equation’s boundary conditions. How do we specify them? Are they the ones from the previous iteration? And additionally: How do we set pressure difference values at these boundaries? Is it okey if I extend the pressure field from the previous iteration and extrapolate mirror nodes to get pressure difference and add it as a source term? Thank you all
Yes, the pressures in the momentum equations are the ones from last iteration. Some books (e.g. Computational Fluid Dynamics from basics to application, Anderson) ask you to extrapolate the pressure fields from values close to the boundaries but I think the right thing to do is to get the pressure at the boundaries from the momentum equations. This is done by cancelling out most of the terms that are zero because the velocities will be zero at the wall i.e. the x momentum equation becomes

0= -dp/dx+mhu*d2(vx)/dx2+rho*gx

(ie vx=vy=vz=0 at the wall. also the shear velocity derivative will be zero cos they are still at the wall)

From the equation above, you will be able to get the pressure outside of the domain.

Hope this helps and I ve not confused you too much.

Take care

 August 9, 2010, 13:45 #3 New Member   Emre Turkoz Join Date: Aug 2010 Posts: 12 Rep Power: 14 falopsy, thank you very much for your answer. it really clarifies how i should deal with the pressure values at boundaries in u-momentum equation. i'm also confused at the u-values part of that equation. are the boundary values of corrected velocity field from the previous iteration new boundary conditions for the next iteration? or should i deal with these nodes as i deal with the inner points, specifying no specific value for u?

August 9, 2010, 15:13
#4
New Member

Akinola
Join Date: Jul 2010
Posts: 25
Rep Power: 14
Quote:
 Originally Posted by Emre Turkoz falopsy, thank you very much for your answer. it really clarifies how i should deal with the pressure values at boundaries in u-momentum equation. i'm also confused at the u-values part of that equation. are the boundary values of corrected velocity field from the previous iteration new boundary conditions for the next iteration? or should i deal with these nodes as i deal with the inner points, specifying no specific value for u?
In staggered grid, the velocity nodes at the boundaries coincides directly with the boundaries. Since these values are known ( no slip or whatever), you don't solve the momentum equations for those grids. You only do for the inner control volumes.

 August 9, 2010, 16:42 #5 New Member   Emre Turkoz Join Date: Aug 2010 Posts: 12 Rep Power: 14 thank you, again. I'm reading further on the topic. I noticed, Ch.9 of the Versteeg book actually explains boundaries. thanks!

 August 11, 2010, 11:58 SIMPLE Algorithm - Questions from a Beginner #6 New Member   V GURUPRASAD Join Date: Jul 2010 Posts: 5 Rep Power: 14 hi, the initial pressure values in momentum equns shuid b assumed as zero oly.....

August 11, 2010, 12:29
#7
New Member

Akinola
Join Date: Jul 2010
Posts: 25
Rep Power: 14
Quote:
 Originally Posted by vguruprasad4 hi, the initial pressure values in momentum equns shuid b assumed as zero oly.....
Yes, the initial condition doesnt really matter but what how will you treat it after the first iteration when the pressure will then be non-uniform? You still need a way to treat the boundary condition.

 August 11, 2010, 14:01 #8 New Member   Emre Turkoz Join Date: Aug 2010 Posts: 12 Rep Power: 14 I just solve pressure correction for the inner region, add it up to the pressure from the previous iteration and again impose boundary conditions to this corrected pressure. The results seem reasonable then. I have another concern. I wrote the algorithm using finite differences with the help of the book "Computational Fluid Dynamics" by Hoffmann. I made no matrix calculations with conjugate gradient, gauss seidel or other iterative stuff. So why do we prefer other methods that includes them? Are they more accurate? Or faster?

August 13, 2010, 00:21
HI
#9
New Member

Join Date: Jul 2010
Posts: 5
Rep Power: 14
Quote:
 Originally Posted by falopsy Yes, the initial condition doesnt really matter but what how will you treat it after the first iteration when the pressure will then be non-uniform? You still need a way to treat the boundary condition.

hi,

the guessed pr (i.e) ur initial pr. is assumed as zero.. then 4 d nxt iteration u will solve for pressure correction eqn to find new pr. correction value. Then with the pressure correction value v can find new pr value... Actually v r not finding the exact pr values.. V r jus finding the pr. gradient values in SIMPLEX method..... Then u ll compute new U & V values using corrected pr.... Then check for convergence criteria..... Incase of turbulence v shud multiply the under relaxation factor(usually 0.2 to 0.8) with the pr. correction term to reduce the pr. correction value, thus geting soln converged...

 Tags matlab, patankar, simple