|
[Sponsors] |
December 15, 2008, 07:20 |
FORTRAN vs. C/C++ in CFD Solvers
|
#1 |
Guest
Posts: n/a
|
Hi everyone,
My question is for both, academia and industry people. After several years working with in-house CFD codes, all written in FORTRAN, I want to refresh my basics in CFD code writting (learnt at Univ.) and would like to know if I should stay with F90 or should try out C/C++ since this might be the way forward. I am quite sure F90 is still the standard, and hoping for this to be true, but wanted to be sure. One more question, what about the solutions visualisation and post-processing tools? VB? or C/C++? Many thanks in advance, Carlos |
|
December 15, 2008, 09:35 |
Re: FORTRAN vs. C/C++ in CFD Solvers
|
#2 |
Guest
Posts: n/a
|
If you are familiar with F90 programming and you are comfortable with that, then there is no reason to switch languages. C gives you no benefit and the abstraction features in C++ have to be used with care in order not to bloat your code and affect your performance. In theory you can write in C++ with zero overhead but in practice it is always a bit slower or even significantly if you massively use object oriented features. Of course, in times of thousands of PEs for a computational jo,b you should also not count operations too much and see the advantages of abstraction like maintainability and extendability. As for the post-processing: For scientific applications i would never use VB for various reasons: a) it is for "business guys" b-y) see a) ;-) z) it is a proprietary language which is not principally a problem... but you fix yourself too much on a specific platform. I would rather use C++ there.
|
|
December 15, 2008, 10:54 |
Re: FORTRAN vs. C/C++ in CFD Solvers
|
#3 |
Guest
Posts: n/a
|
Hi, maybe these topics help. http://www.cfd-online.com/Forum/main...cgi?read=60731 http://www.cfd-online.com/Forum/main...cgi?read=57536 Hadian
|
|
December 15, 2008, 18:08 |
Re: FORTRAN vs. C/C++ in CFD Solvers
|
#4 |
Guest
Posts: n/a
|
for CFD application in which number of developpers is small and volume of code is not so large, Fortran is very reasonble. So do not bother yours.
regarding to post-process, you can use mixed prog. or wrapping to directly post-process your result on the fly. |
|
December 15, 2008, 20:23 |
Re: FORTRAN vs. C/C++ in CFD Solvers
|
#5 |
Guest
Posts: n/a
|
I've done pretty large projects in each of those languages and still find F90 the most natural for numerical operations. If kept simple (not too much use of "advanced features") I also find it the easiest to optimize. The advantage of C++ is much more apparent for larger, collaborative codes or where abstraction is one of the key goals (for extensibility). F90 lacks true objects, which is torture in many ways, but the array intrinsics and natural expression of numerics more than make up for it in my view. The user defined types also close part of the gap but you must use them carefully so as not to interfere with optimization. C is the cleanest and most elegant of the three languages in my view, but the lack of conformable arrays, array intrinsics, etc. makes me prefer F90 for numerics. Otherwise I'm a strong advocate of C.
|
|
December 16, 2008, 06:25 |
Re: FORTRAN vs. C/C++ in CFD Solvers
|
#6 |
Guest
Posts: n/a
|
There is no language called C/C++. Choose one or the other.
|
|
December 16, 2008, 06:55 |
Re: FORTRAN vs. C/C++ in CFD Solvers
|
#7 |
Guest
Posts: n/a
|
First of all, I would like to thank all of you for your help, I'm impressed of the fast response my question has found in this forum.
Second of all, Steve, please!!! C/C++ = C or C++ same thing. 4 people understood it before you answered, and you only said that? Anyway, thank you for keeping a sharp eye for little mistakes some people make sometimes which create great deal of confusion. I'll keep using this forum Merry Christmas from Spain!!! Carlos |
|
December 16, 2008, 12:14 |
Re: FORTRAN vs. C/C++ in CFD Solvers
|
#8 |
Guest
Posts: n/a
|
You mentioned VB. I read somewhere some time ago that VB is on the way out, and Microsoft is discontinuing support for it, hyping its C sharp language. I haven't done anything in the past couple of years in Java, but I was impressed by some of its capabilities.
|
|
December 16, 2008, 12:56 |
Re: FORTRAN vs. C/C++ in CFD Solvers
|
#9 |
Guest
Posts: n/a
|
Well, actually this is what most people do... write C with a bit of plusplus. You can call that C/C++ if you want, or you just face the challenge to read properly and see what Carlos means when he writes C/C++. But what you do is neither productive not clarifying in any sense.
|
|
|
|
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 |
STAR-Works : Mainstream CAD with CFD | CD adapco Group Marketing | Siemens | 0 | February 13, 2002 13:23 |
comparison of CFD solvers | Vivek V. Ranade | Main CFD Forum | 2 | November 26, 2000 15:34 |
ASME CFD Symposium, Atlanta, July 2001 | Chris R. Kleijn | Main CFD Forum | 0 | August 21, 2000 05:49 |
Iterative equation solvers in CFD | Vitaly Bulgakov | Main CFD Forum | 32 | March 1, 1999 12:11 |