CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Main CFD Forum (https://www.cfd-online.com/Forums/main/)
-   -   Advection/Diffusion (https://www.cfd-online.com/Forums/main/99043-advection-diffusion.html)

kamakura117 March 24, 2012 23:02

Advection/Diffusion
 
Hello,

I am writing a advection/diffusion script in MATLAB for a driven cavity problem. I am using the SIMPLE method with power law convection approximations and using Numerical Heat Transfer and Fluid Flow by Patankar as my guiding text. I have completely written the code, but the solution does not converge. I was hoping that someone with experience could send me a PM and help me diagnose the issues I am having.

Many thanks,

Jesse

kamakura117 March 26, 2012 00:27

Update: I got the code working, but only when I apply very low relaxation factors (u,v = 0.15, p = 0.08) that have to get lower as I refine the grid. Does anyone have any indication as to why this might be the case? I figured it might most likely be due to a mass imbalance, due to how I average on the periphery nodes... but the solvers are fully consistent with each other in their treatments. The continuity, \nabla \vec{u} is roughly 1e-7 in each node. I imagine this is sufficiently zero.

Anyone have any ideas?

Thanks.

kamakura117 March 27, 2012 15:06

3 Attachment(s)
Update 2: So, with very small relaxations factors (.01 for pressure, and .07 for velocity) I can somewhat match, with a 25 x 25 grid, the reference solution for the lid driven cavity. I am beginning to suspect an issue with either the pressure correction or the non-linearity treatments. Scanning over the code many times, I can not find any issue in their development. I've attached some results.

kamakura117 March 27, 2012 15:08

3 Attachment(s)
Contour/Vector plots...


All times are GMT -4. The time now is 10:12.