CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   Main CFD Forum (http://www.cfd-online.com/Forums/main/)

 bzz77 March 15, 2010 10:10

Hello everyone:

I would like to code a simple finite difference scheme for 2D convection-diffusion (I'm using C++). My goals are to learn C++, refresh/improve my linear algebra skills, and eventually use the code as a foundation to incorporate fluid flow considerations in other calculations.

So far I am doing OK on 1D convection-diffusion. I have come up with code for two or three different implicit (involving matrices) and explicit schemes. But I've reached the limit of my mathematical abilities and need help on proceeding with 2D. I haven't had any success with Google at finding worked examples.

I would be very grateful if someone could point me in the right direction... I would like to see a couple of detailed worked examples (e.g., that explain the matrix construction). I would be most interested in seeing an example of 2D convection-diffusion implicit in time/Crank Nicolson, with centered space. Also, while I am focusing on the simplest possible solution methods at this point (I used Gauss elimination in my 1D code), I would be interested in finding out more about any major advantages/disadvantages of common solution methods for 2D. Does anyone know of any good, detailed online resources for 2D convection-diffusion math?

Thank you for any help or advice.

 RBJ March 15, 2010 12:04

Realize that convection is a dangerous term. It is used for both advection and diffusion.

If you search advection diffusion on google / google books, I think you should be able to find some stuff

 bzz77 March 15, 2010 12:24

Thanks. I have tried searching both terms in various combinations, but no luck so far. If anyone has found any particular source useful, I'd really appreciate knowing about it. Thanks all.

 All times are GMT -4. The time now is 14:02.