writing a cfd code
dear all,
i was given a home take exam to write a cfd code based on FDM and FEM for the poisson equation. the due date is just end of this week. i am told to use any solver (downloading from the net). so can u guys out there help me....what steps i should follow and if i can be done before the due (i don't even know how much it takes.) i want to use C++. where can i get the solver from? please, any ideas and/or any code (which i can see as example)! thanks. 
Re: writing a cfd code
end of this week will be difficult to meet. (sorry i do not have much experience with FEM FDM, so could not suggest anything).

Re: writing a cfd code
end of this week will be difficult to meet. (sorry i do not have much experience with FEM FDM, so could not suggest anything). i probably will be able to help with the solver part though.

Re: writing a cfd code
thanks, zxaar:
but i have to do it anyway...i dont know how though. i will still appreciate if u can pass me the solver atleast. thank u so much! 
Re: writing a cfd code
Try this one:
http://www.csit.fsu.edu/~burkardt/cp...2d/nast2d.html This program is written in C++ and is fully described in the following book (including common CFD benchmark problems): Michael Griebel, Thomas Dornseifer and Tilman Neunhoeffer, "Numerical Simulation in Fluid Dynamics", SIAM, 1998 Cheers Renato. 
Re: writing a cfd code
So your professor told you to write a code to solve the Poisson equation without any previous instruction on the FEM or FDM method? You have no text book? No class notes? There are about 1000 text books out there which you can borrow to get an idea of how to set up a solution. Stop being lazy.

Re: writing a cfd code
the first thing you need to do is write the equations down and descretize them. Then, write down the first few steps and see how the matrices are formed. Once you understand that, you wont have much of a problem.

Re: writing a cfd code
read about the descretisation, i will try to send you c++ files that you can add in your code and with minimal instructions you will be able to use it as solver. Since today i am very busy , think you will get them tommorrow.

Re: writing a cfd code
If you get another assignment with a little more time, consider using Matlab. It takes a bit of time to learn the language, but you can write very compact code, and the solvers and graphics are part of the Matlab package.
Matlab is good for experimenting and exploring new ideas where you can keep the problem small. When you get a prototype program worked out, then implement it in C++ for more efficient operation on larger scale problems. But don't underestimate the work involved in integrating solvers and graphics. 
Re: writing a cfd code
thanks, jonas!
exactly, i will try to do the others in matlab. i have been working on matlab last year....and i hope i did not forget it completely. 
Re: writing a cfd code
ok, thanks zxaar!
tomorrow also will be fine. i will try to build the whole picture till then. i really appreciate your cooperation. please use a.temperature@gmail.com thanks once again. 
Re: writing a cfd code
thanks andrew,
now my problem is in the formation of the matrices. i have discretised the equation but i couldn't do it to matrices. with regards 
Re: writing a cfd code
you have to march through a few steps in order to see how the matrices are formed.

Re: writing a cfd code
i sent the mail.

All times are GMT 4. The time now is 19:00. 