Need Advice
Hello, I am currently trying to verify a problem of a fluid of Prandtl number 0.71 in an upright square cavity. Both velocity components are zero on the boundaries. Horizontal walls are insulated while the vertical sides are at T_high and T_low. Raleigh number can be between between 1000 to 1000000. I am tyring to write a simple C program that can verify the results. My question is with regards to this problem, can i use FTCS method? have read somewhere that it is unstable and that the Alternating Direction Implicit scheme should be used instead. Also what are the certain boundary conditions that i have to look out for? Thank you

Re: Need Advice
(1). Why not do a journal search first, to look for published papers similar to the problem you are interested in. (2). Then, follow the method used in the paper, to see whether you can repeat the same process and obtain the same results. (3). In this way, you can verify the method developed or used by other researchers. (4). This is the only way you will be able to learn how to solve the problem you are interested in. (5). Since CFD is a very broad field, a general comment on FTCS is not enough to provide any useful help. What I am saying is, there are many other related issues in addition to the scheme used. (6). So, my suggestion is: pick a published paper, and follow the method. If you can repeat what other researchers have done, you are in good shape.

Re: Need Advice
Thank you very much. Will do. But i have another question. Does it matter which program software to use. Think another problem i am facing is that i am writing a simple C program from scratch and haves lots of debugging to do. How efficient are the commercial or developed softwares? anyone can comment?

Re: Need Advice
(1). For a commercial CFD code to survive, it requires large enough market. (2). So, the code must cover a wide range of application fields, which tends to make a CFD code a general code. (3). A general CFD code must anticipate the user's applications ahead of the time, thus it is usually very large in size, and slow in speed. (4). But, these are relative terms, relative to the code written for specific problem solving. (for example, a general code RAM requirement can easily become 10~15 times larger than a special application code.)

Re: Need Advice
Most commercial codes should be good for your purpose. The main problem for this kind of flow configuration comes from the boundary conditions.
If you built such a box with heated and cooled and adiabatic walls you will always have some sort of temperature distribution in every wall. So if you want to verify you cfdresults with an experiment you have to apply the correct temperature distribution to your boundary conditions. Otherwise you can expect very wrong results even if your code is ok. 
Re: Need Advice
Thanks. I guess for me, the problem i face is that i am writing my own source code in C program. So i have to debug them in addition to making sure i get my boundary conditions right. As it is i think i am missing some stuff. What do u mean by correct temperature distribution? I am assuming you are refering to the Energytransport equation. That is the equation i am using to deduce the temperature distribution.

Re: Need Advice
It means that none of your walls will have a fixed temperature if you create an experiment. This comes from the heat conduction along the walls and also from the convection due to the fluid motion.
The perfect conditions with insutated walls ... only exists in theorie. As thermal driven cavity problems are very sensible to small changes you have to take these effects into account if you want to compare your results with real experiments. This has nothing to do with any equation, it is just physics. 
Re: Need Advice
Thanks a million. Does anyone know any websites or books which i can refer to for guidiance with reference to my C program?

Re: Need Advice
1) I suggest not using FTCS, you'll endup with an unrealistic soltion if your local Peclet number is higher than 2.
2) There's a scheme that might not be the most accurate, but it will be stable and reliable:  get Patankar's book " Numerical heat transfer and fluid flow" and use the simple (or simpler ) algorithm to get a zero divergence velocity field.  use a time implicit and space upwind sheme. To get rid of false diffusion you can use the power law sheme (all this is well explained in this book)  To validate your code you can use these references: @ARTICLE(dev1983a, AUTHOR = " G. De Vahl Davis", TITLE = " Natural convection of air in a square cavity : a comparaison exercise", PAGES = " 227248", JOURNAL = IJNMF, YEAR = 1983, VOLUME = 3) @ARTICLE(dev1983b, AUTHOR = " G. De Vahl Davis", TITLE = " Natural convection of air in a square cavity : a benchmark solution", PAGES = " 249264", JOURNAL = IJNMF, YEAR = 1983, VOLUME = 3) IJNMF stands for "International journal for numerical methods in fluids" @ARTICLE(ghia1982 AUTHOR = " U. Ghia, K. N. Ghia, C. T. Shin", TITLE = " HighRe Solutions for Incompressible Flow using the NavierStokes Equations and a Multigrid Method" PAGES = " 387411", JOURNAL = JCP, YEAR = 1982, VOLUME = 48) JCP stands for "Journal of Computational Physics" +poiseuille flow between two planes. Good Luck!! 
Re: Need Advice
sorry but i don't understand what you mean by Peclet number. Currently i am using 3 equations for this. The vorticity transport, stream function and energy transport. The vorticity transport equation involves the use of Prandtl and Rayleigh numbers. You mentioned unrealistic solution. By that do you mean that the results will not converge using FTCS?

Re: Need Advice
Is there another book which i can use? The book which you have reccomended has already been taken up by someone else and chances are i will not get to see this book until sometime in late january.

Re: Need Advice
1) Peclet number=Reynolds * Prantl= rho*u*Cp/k
It is similar to to the Reynolds number but it is related to the energy equation. 2) When you have to solve a convectiondiffusion equation there is a stability criteria. When you use center space discretisation of the convective terms, you will get unrealistic oscillations as soon as the local Reynolds (or Peclet) number (here, the length of reference is the space between two nodes) gets superior to 2 (in 1D, in 2D it is a bit more complicated). To ensure stability you must add numerical dissipation. You get do this by using an upwind sheme. 
Re: Need Advice
I don't know any other good books about the simple family of algorithm. But, the simplec algorithm is well explained in this article:
J.P> Van Doormaal and D.D. Raihtby. Enhancements of the simple method for predicting incompressible fluid flows. Numerical heat transfer, vol 7 pp147163, 1984. A good Introduction to numrical methods for incompressible fluid flow is: @BOOK(pozrikidis1997, AUTHOR = " C. Pozrikidis", TITLE = " Introduction to theoretical and Computational Fluid Dynamics", YEAR = 1997, PUBLISHER = "Oxford university Press" ) 
Re: Need Advice
Thank You Very Much! Will heed your advice! :)

All times are GMT 4. The time now is 15:41. 