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

 October 6, 2009, 06:56 SIMPLE algorithm-Please help #1 New Member   Thiyagarajan dhayalan Join Date: Jun 2009 Posts: 7 Rep Power: 15 hi, i tried to write a code for SIMPLE algorithm in Fortran but found it difficult. can anyone give a sample code on SIMPLE.my mail id is rajandhayalan@gmail.com thank you regards Thiyaga.

 October 6, 2009, 09:56 #2 Member   zobekenobe Join Date: Mar 2009 Location: Dublin, Ireland Posts: 72 Rep Power: 16 are you writing it with colocated grids and staggered grids

 October 7, 2009, 03:05 Simple #3 New Member   Thiyagarajan dhayalan Join Date: Jun 2009 Posts: 7 Rep Power: 15 hi, thanks for the reply.iam using staggered grid. reg Thiyaga.

 October 8, 2009, 06:08 #4 New Member   Ammar Mushtaq Join Date: Oct 2009 Location: Islamabad, Pakistan Posts: 2 Rep Power: 0 have u tried veersteeg's book, coz the algorithm in it is almost the code. I have implimented it in mathematica.

 October 9, 2009, 01:46 #5 New Member   Thiyagarajan dhayalan Join Date: Jun 2009 Posts: 7 Rep Power: 15 hi, thx , i will try...

 October 17, 2009, 11:01 #6 Member   jk Join Date: Jun 2009 Posts: 64 Rep Power: 15 Hi Ammar, I tried with verteeg's book only. But the solution is blowing out (simple algorithm). Please check whether my following boundary conditions are correct: firstof all i am using staggered grid (backward) and using Explicit scheme. Assume it is a duct flow --> two walls on the upper and lower side (v velocity = 0), leftside --> inlet (u velocity) and rightside -->outlet (pressure outlet) but the u velocity grid would be the last on the right side I have just created a dummy nodes outside the main domain (as mentioned in the book). my domain size is 0.09m by 0.09m, height 0.08m. Grid size is 20 by 20 1. On the inlet i am giving u velocity = 0.1 m/s 2. On the outlet i am extrapolating this u velocity as given in the book 3. On the top and bottom wall my v velocity = 0 4. on the right side (just before the u node -- outlet) i am fixing the pressure as 0 I have doubt in the pressure correction (pprime) bc. 1. On all the sides i am setting the value of pprime = 0. Withall this my solution is blowing out after few iterations (5 iterations) Also for the simplicity i am keeping the value of meu and row as constant in all the equations (common row(density) taking out from the equations and canceling). I am not doing any averaging on this scalars. If you wish i can send my code also (its fully commented) Your suggestion is highly appreciable. thanks jyo Last edited by jyothishkumar; October 17, 2009 at 11:35.

October 17, 2009, 17:52
#7
Member

Join Date: Apr 2009
Posts: 38
Rep Power: 16

Quote:
 Originally Posted by Thiyaga hi, i tried to write a code for SIMPLE algorithm in Fortran but found it difficult. can anyone give a sample code on SIMPLE.my mail id is rajandhayalan@gmail.com thank you regards Thiyaga.

October 17, 2009, 18:15
#8
Member

Join Date: Apr 2009
Posts: 38
Rep Power: 16
what are the values of under-relaxation for velocity and pressure?
you should set the pprime value zero at the beginning of each iteration.
for B.cs usually the outlet boundary is difficult to set.

Quote:
 Originally Posted by jyothishkumar Hi Ammar, I tried with verteeg's book only. But the solution is blowing out (simple algorithm). Please check whether my following boundary conditions are correct: firstof all i am using staggered grid (backward) and using Explicit scheme. Assume it is a duct flow --> two walls on the upper and lower side (v velocity = 0), leftside --> inlet (u velocity) and rightside -->outlet (pressure outlet) but the u velocity grid would be the last on the right side I have just created a dummy nodes outside the main domain (as mentioned in the book). my domain size is 0.09m by 0.09m, height 0.08m. Grid size is 20 by 20 1. On the inlet i am giving u velocity = 0.1 m/s 2. On the outlet i am extrapolating this u velocity as given in the book 3. On the top and bottom wall my v velocity = 0 4. on the right side (just before the u node -- outlet) i am fixing the pressure as 0 I have doubt in the pressure correction (pprime) bc. 1. On all the sides i am setting the value of pprime = 0. Withall this my solution is blowing out after few iterations (5 iterations) Also for the simplicity i am keeping the value of meu and row as constant in all the equations (common row(density) taking out from the equations and canceling). I am not doing any averaging on this scalars. If you wish i can send my code also (its fully commented) Your suggestion is highly appreciable. thanks jyo

 October 18, 2009, 00:56 pprime initialisation #9 Member   jk Join Date: Jun 2009 Posts: 64 Rep Power: 15 Hi Artmiss, I did the initialization of pprime. My urf for u and v, pressure is 0.3. for the outlet boundary since i am giving the pressure outlet (0 value -- gauge) my pprime would be zero at the outlet as there are no corrections my u and v velocities are going very high values and finally diverges. any suggestions thanks jyo

October 18, 2009, 07:58
#10
New Member

Join Date: Oct 2009
Posts: 7
Rep Power: 15
Dear jyo,

Put The relaxation factor for U and V around 0.3-0.4 and for Pressure around 0.1. You should notice that relaxation factor for pressure should be less than for U and V ones.

The other thing is before you wanna call your pressure boundary and solver
you should put pprime=0.0 in the main Do of your program.

hope it will work.

Quote:
 Originally Posted by jyothishkumar Hi Artmiss, I did the initialization of pprime. My urf for u and v, pressure is 0.3. for the outlet boundary since i am giving the pressure outlet (0 value -- gauge) my pprime would be zero at the outlet as there are no corrections my u and v velocities are going very high values and finally diverges. any suggestions thanks jyo

October 18, 2009, 15:25
#11
Member

Join Date: Apr 2009
Posts: 38
Rep Power: 16
Dear friend. perform the suggestions of Mr. babak.The SIMPLE algorithm is very sensitive to urf's especially when Re increased.Don't use the values suggested in commercial soft wares. I doubt the reality of convergence with this urf's!
for final check tell me the method of calculation of u and v at solid boundaries.it is important

Quote:
 Originally Posted by jyothishkumar Hi Artmiss, I did the initialization of pprime. My urf for u and v, pressure is 0.3. for the outlet boundary since i am giving the pressure outlet (0 value -- gauge) my pprime would be zero at the outlet as there are no corrections my u and v velocities are going very high values and finally diverges. any suggestions thanks jyo

 October 19, 2009, 04:15 #12 Member   jk Join Date: Jun 2009 Posts: 64 Rep Power: 15 Thanks and i will do that

 October 21, 2009, 08:40 #13 Member   jk Join Date: Jun 2009 Posts: 64 Rep Power: 15 Hi, Again i have restructured my grid pattern in the following manner. I am now giving pressure inlet and pressure outlet boundary. Even on the wall (top and bottom) also i have my pressure and u velocity grid to coincide. This way i am sure about the pprime values at the boundary. Now my pprime value on the left and right side (inlet and exit) boundary will be zero. On the wall i am doing pwall = p(i,1) = 2*p(i,2) - p(i,3), similarly i am doing for pprime also. One more thing that i want to clarify is that i am fixing the value of row and meu everywhere (in the scalar grid points). Is that fine what i am doing. (still on the process of writing the code) Any suggestions ? thanks jyo

 Tags simple