CFD Online Discussion Forums

CFD Online Discussion Forums (
-   Main CFD Forum (
-   -   CFD Coding (

easy_astronaut June 13, 2010 11:12

CFD Coding
I'm an Aeronautical Engineer and keen to write a CFD code.
But unluckily, the biggest question in my mind is WHERE TO START?
I know the math, but don't know the tools.
So can anyone tell me which tool I should use to write a CFD code?
Whether it's C or FORTRAN or anything else. Also, in which language the famous CFD tools like FLUENT and CFX are written?

I'll be very much thankful to you for an answer.


DoHander June 13, 2010 13:57

Commercial CFD codes (like Fluent or CFX) are usually developed in C or C++. However if you want to develop your own CFD code probably Fortran 95/2003 is a better choice.


Dhileep T K June 13, 2010 23:54

I suggest MATLAB. Post processing will be easy.

shirazbj June 14, 2010 01:52

like to use gmsh for post processing. It's free and easy.

valgrinda June 14, 2010 11:45

CFD coding

when you plan to write a small cfd program with few lines of code, Fortran is ok. When you have a large project in mind and think about working with the program for a long time, you should consider C++. Then it is much easier to add to the code, to maintain it and have more than one developer to work with it. Both languages have support for MPI, which is needed for efficient parallel computation.


walli June 14, 2010 12:24

I would suggest to use an existing library for the mesh handling, shape functions, linear algebra and so on, because implementing this can be very time-consuming. C++ is a good choice, since you can program with a low overhead and reuse code easily. You might want to have a look at different projects, e.g.

... there are many more, these are just the ones that automatically came to my mind.

valgrinda June 14, 2010 13:05

Existing C++ Code
Another, very interesting project can be found here:

The C++ source code can be downloaded. They use finite differences and the MPI library for parallelization.


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