|
[Sponsors] |
September 30, 2009, 17:25 |
how can i start writing CFD code?
|
#1 |
New Member
ali
Join Date: Sep 2009
Posts: 3
Rep Power: 17 |
hi ,
i'm trying to start writeing a CFD code by C++, but I dont know what the steps are. is anybody there to help me please?cheers |
|
September 30, 2009, 18:25 |
|
#2 |
New Member
Nate Salpeter
Join Date: Apr 2009
Posts: 4
Rep Power: 17 |
If you are really wanting to write something on your own (*shudders at painful memories*) your first step might be sitting down with "Numerical Heat Treansfer and Fluid Flow" by Suhas Patankar.
This book is largely regarded as the bible of CFD. It won't get into the most nitty gritty of turbulence models, but it will give you some pretty clear numerical methods and strategies for going about writing your own code. |
|
September 30, 2009, 20:44 |
|
#3 |
Member
|
Some of the important points are
* Know what you want to do and what you are doing. You must be clear on what you want to formulate and solve. *Write down a small algorithm, or something like a structure of the code.. like what are the inputs required.. what is your time stepping.... what is your discretization scheme used... etc. Think of what parameter you are interested to monitor and print out finally. *Initially don't bother about syntax errors. Just write in the code as if you are writing in plain English. At places where you feel that, the block of code would be large, just replace it by a function call.... say solve(). Do not worry about declaring variables now.. *After you are having an idea of your code structure, now you can correct your code, by declaring the variables, defining the functions etc.. Also take a look at many CFD codes (small) available in the web or in books for you to get a feel. Happy coding ! Dominic |
|
September 30, 2009, 23:45 |
|
#4 |
Super Moderator
|
In addition to the previous advice:
Start with a 1-D code. Solve some problems like quasi-1D nozzle, etc Then go to 2-D. Flate plate, lid-driven cavity, maybe an airfoil, etc. By this time, you would have a pretty good idea. Then 3-D. You seem to be totally new to this. Start with very simple things. Anderson's CFD book is quite good for beginners. Initially write a lot of code on your own. Then start looking at other people's codes. Many of them are freely available on the internet. |
|
October 2, 2009, 08:41 |
|
#5 |
New Member
ali
Join Date: Sep 2009
Posts: 3
Rep Power: 17 |
hi everyone !
thanks for your help those were realy helpful. cheers |
|
October 2, 2009, 08:43 |
|
#6 |
New Member
ali
Join Date: Sep 2009
Posts: 3
Rep Power: 17 |
hi!
should I use any modeller and mesher software?which one is more suitable? thanks |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
CFD Design...The CFD Future | John C. Chien | Main CFD Forum | 20 | November 20, 2015 00:40 |
about cfd code, free or for payment | John M | Main CFD Forum | 6 | September 15, 2003 09:59 |
Which is better to develop in-house CFD code or to buy a available CFD package. | Tareq Al-shaalan | Main CFD Forum | 10 | June 13, 1999 00:27 |
cfd job | Dr. Don I anyanwu | Main CFD Forum | 20 | May 17, 1999 16:13 |
Commercial CFD code | Hanson G. He | Main CFD Forum | 1 | October 15, 1998 09:49 |