26
Arvind Deshpande

Solution algorithms for assignment problems

Embed Size (px)

Citation preview

Page 1: Solution algorithms for assignment problems

Arvind Deshpande

Page 2: Solution algorithms for assignment problems

1. Take the input from the user :Initialtemp(Tinitial), Boundary condition information,material properties density, thermalconductivity, specific heat, length, height, no.of interior control volumes control volumes inx-direction and no. of control volumes in y-direction and time step (based on stabilitycriterion).

2. Calculate x and y coordinates for all points.

3. Calculate aw, ae, an, as and ap for all cv’s.Formula changes for cv’s close to boundary.

4. Implement all boundary conditions.

Page 3: Solution algorithms for assignment problems

5. Set Told and Toldt= Tinitial for all cv’s and Tnew

= 0 for all cv’s.

6. Increase time by time step and calculate Tnew at all cv’s using Gauss-Seidal point by point or line by line TDMA method.

7. Check for convergence for iterations within time step. Residual = Tnew – Told (max residual /average residual/rms residual <ε)

8. If converged, goto step 9 otherwise assign Told = Tnew and go to step 6.

Page 4: Solution algorithms for assignment problems

9. Check for “steady state” Residual = Tnew –Toldt (max residual /average residual/rmsresidual <ε)

10. If converged, stop otherwise assign Toldt = Tnew and go to step 6.

Page 5: Solution algorithms for assignment problems

1. Take the input from the user :Inlet temp offlow, Boundary condition information, materialproperties density, thermal conductivity,specific heat, length, height, no. of interiorcontrol volumes control volumes in x-directionand no. of control volumes in y-direction.

2. Calculate x and y coordinates for all points.

3. Calculate velocity u and v using given formula.

4. Calculate Dw, De, Dn, and Ds for all cv’s. Formulachanges for cv’s close to boundary.

Page 6: Solution algorithms for assignment problems

5. Based on CDS/UDS/Hybrid calculate aw, ae, an, as ap for all cv’s. Formula changes for cv’s close to boundary.

6. Implement all boundary conditions.

7. Set Told and Tnew = 0 for all cv’s.

8. Calculate Tnew at all cv’s using Gauss-Seidalpoint by point or line by line TDMA method.

9. Check for convergence. Residual = Tnew –Told (max residual /average residual/rmsresidual <ε)

Page 7: Solution algorithms for assignment problems

9. If converged, goto step 10 otherwise assign Told = Tnew and go to step 6.

10. For each axial location, calculate bulk mean temp, heat transfer coefficient and Nusseltno.

Page 8: Solution algorithms for assignment problems

Solution algorithm – Lid driven cavity (SIMPLE)

Page 9: Solution algorithms for assignment problems

1. Take the input from the user :Lid velocity,material properties density, dynamic viscosity,length, height, no. of interior control volumescontrol volumes in x-direction (j) and no. ofcontrol volumes in y-direction (i), underrelaxation factor for pressure and velocity. (Youcan use recommended under relaxation factors)

2. Calculate x and y coordinates for all points.

3. Implement all boundary conditions.

4. Set uold =unew = vold =vnew =Pold =Pnew = 0 for allinterior cv’s.

Page 10: Solution algorithms for assignment problems
Page 11: Solution algorithms for assignment problems

5. Calculate Dw, De, Dn, and Ds for all cv’s.

6. Calculate Fw, Fe, Fn, and Fs for all cv’s. You will have to use interpolation (average) for velocity.

7. Based on CDS/UDS/Hybrid calculate aw, ae, an, as

for all cv’s. Formula changes for cv’s near top and bottom boundary.

8. Calculate ap , source term based on pressure gradient and d1 values for all cv’s.

9. Solve X-momentum equation (modified with under-relaxation factors) to get new values of u using Gauss-Seidal method.

Page 12: Solution algorithms for assignment problems
Page 13: Solution algorithms for assignment problems

10. Calculate Dw, De, Dn, and Ds for all cv’s.

11. Calculate Fw, Fe, Fn, and Fs for all cv’s. You will have to use interpolation (average) for velocity.

12. Based on CDS/UDS/Hybrid, calculate aw, ae, an, as

for all cv’s. Formula changes for cv’s near left and right boundary.

13. Calculate ap , source term based on pressure gradient and d2 values for all cv’s.

14. Solve Y-momentum equation (modified with under-relaxation factors) to get new values of u using Gauss-Seidal method.

Page 14: Solution algorithms for assignment problems
Page 15: Solution algorithms for assignment problems

15. Calculate aw, ae, an, as for all cv’s. Formula changes for cv’s near boundary. (Corresponding coefficient will be zero)

16. Calculate ap , source term (mass source) for all cv’s.

17. If mass source < ε , solve pressure correction to get new values of P’ using Gauss-Seidal method.

18. Pressure correction at boundary points can be set based on zero gradient.

Page 16: Solution algorithms for assignment problems

19. Correct pressure using under relaxation factor. Correct velocity without under relaxation.

20. If mass source < ε, go to next step. Otherwise go to step 5 with uold =unew , vold =vnew , Pold =Pnew

21. Calculate u-velocity profile at vertical centrelineand v-velocity profile at horizontal centreline and compare with bench mark results.

(GHIA et al. (1982) JOURNAL OFCOMPUTATIONAL PHYSICS VOL. 48,pp.387-411)

Page 17: Solution algorithms for assignment problems
Page 18: Solution algorithms for assignment problems

Convergence criteria No. of iterations

10-5 736

10-6 1531

10-7 3262

10-8 5924

Page 19: Solution algorithms for assignment problems
Page 20: Solution algorithms for assignment problems
Page 21: Solution algorithms for assignment problems

No. of Control volumes No. of iterations

10 X 10 202

20 X 20 710

40 X 40 2243

80 X 80 5924

Page 22: Solution algorithms for assignment problems
Page 23: Solution algorithms for assignment problems
Page 24: Solution algorithms for assignment problems
Page 25: Solution algorithms for assignment problems
Page 26: Solution algorithms for assignment problems