CFD Online Discussion Forums

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

easy_astronaut June 13, 2010 11:12

CFD Coding
 
Hi,
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.

Thanks,
Sahaj.

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.

Do

Dhileep T K June 13, 2010 23:54

Hi
 
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
 
Hei,

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.

Regards
Hans

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.

http://dune-project.org/
http://dealii.org/
http://download.gna.org/getfem/html/homepage/
http://trilinos.sandia.gov/
http://www.fenics.org/wiki/FEniCS_Project

... 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:
http://wissrech.iam.uni-bonn.de/rese...3DGP/index.htm

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

Regards
Hans


All times are GMT -4. The time now is 10:45.