How complex is the problem you are trying to solve? 1D, 2D, 3D? The complexity of your problem is going to dictate the type of software you use to analyse it. OpenFOAM, or CFX or Fluent are better suited to more complex 2D or 3D problems. I use CFX primarily for my research, which is 3D transient CHT. I'd probably use MATLAB for 1D heat transfer if I was going to try to tackle a problem like that, but mostly because I'm more familiar with the code.
If you need to build your solver from scratch, you should use the programming language you are comfortable with, as long as your simulation is not critical in terms of memory and CPU time. Otherwise I would recommend (and I would use myself) a mix of C with some operators from C++.
For development from scratch -- C++ . Easy to parallelize(MPI and GPU) and manage.
I will advice against FORTRAN and MATLAB. MATLAB is OK for small codes like 2d lid driven cavity, etc. For complex codes, MATLAB requires far more memory.
FEniCS is a popular open-source computing platform for solving partial differential equations (PDEs). FEniCS enables users to quickly translate scientific models into efficient finite element code. With the high-level Python and C++ interfaces to FEniCS, it is easy to get started, but FEniCS offers also powerful capabilities for more experienced programmers. FEniCS runs on a multitude of platforms ranging from laptops to high-performance clusters. (https://fenicsproject.org)
I recommend C++ and C# for CFD simulation. You can use object oriented concept to improve the code performance. Matlab is not recommended for 2D or 3D problems because of high memory and computational costs. Fortran is also good but I think debugging in C# or C++ environment is easier than Fortran.
Most of the times, when I see people recommending Matlab or C/C++ for serious scientific work I just let it go. Some other times (like this one) I am commenting that Matlab is good for nothing, other than somewhat faster development at the cost of very poor performance. Just don't do it.
Now, C, C++ (someone even recommended C#) is out of question, unless you want trouble without any reason. C doesn't support matrices at all - they are just pointers with literally zero array support. C++ tried to solve that issue, adding the worst matrix features ever. What you want to do can be done in C or C++, but those languages aren't designed with Mathematics in mind.
Fortran is the way to go. You don't really need an object-oriented programming language to do simulations but even if you want to do that, Fortran 2003/2008 has excellent support for both module and object-oriented programming. If you need ready-made algorithm implementations for solving the differential equations describing heat flow, www.netlib.org has plenty of them, well-tested and with excellent performance. Most of them are written in Fortran. There is also gams.nist.gov, a website that facilitates searching for the proper ready-made code for the problem at hand.
Please note that systems like Matlab actually use ready-made Fortran code in the background (mostly taken by Netlib.) Scilab and Octave openly admit that but Matlab doesn't, for obvious reasons.
so i think it depends on what do u want programing for ; for example if you want to perfume a huge amount of mathematical equations and if the time important for you fortran is the best soloution for you and i have a code i think it could help your in fortran i can give it to you if you want😊
When writing a program in Fortran, C++ etc. you know what and how you count. You can also make intermediate prints, which makes it easier to start the code. However, you must know the numerical methods and there may be problems with physicochemical data. There are also so-called black boxes like Aspen with powerful physicochemical databases - and where you do not need to know the numerical methods. Regards,
For the system modelling and simulation it is more suitable to use matlab as it has many math tools for the different branches of the science such as signal processing, communications, filters etc. It has also the simulink when you use it to build the mathematical model of the system or the subsystem you can convert it into other forms of codes such as C -code and VHDL code.
I also use excel spreadsheets with "circular references" to converge iterative loops. It works great for most problems. very easy to set up, solve and present results.
any OpenCL Open Computing Language can be used for fluid flow and heat transfer simulations for complex industrial application. CFD software approach is best considered for analysis the same. Matlab and Fortran can be considered as a best programming language for the purpose.
Any problem involving heavy numerical computations should be done in a language made for the task. And there is only one: Fortran. Otherwise, feel free to use Matlab which blatantly copies Fortran systax and uses Fortran code in the background, except it runs 100+ times slower.
Or follow the flow and use C or C++, languages clearly not made for numerical computations. In that case, good luck every time you need to deal with matrices (which means always), using zero matrix features (C), or the worst matrix support ever (C++), with std::vector and std:: array, which don't even implement basic matrix arithmetic and you need to reinvent the wheel,, implementing templates for everything yourself, just because you are using the wrong programming language.
I wouldn't be surprised if I see someone recommending python or anything like that, again using Fortran code in the background, except it runs orders of magnitude slower than it should. This is a crazy world, indeed.
I think the most common platform for solving differential or algebraic system of equations is the matlab. It may be also the easiest coding method as it is a script language. In addition you can find a library of solutions for different branches of sciences. These are called tool boxes which help to solve specific problems.
This is just my opinion.
There are also specific numerical solutions for systems of equations describing the behavior of the objects in certain discipline of science. Such as for example SILVACO for solving t he semicondcutor equations.
Basically any problem can be solved by different methods.
However, all valid methods must give the correct answer.
With Fortran programs, you can perform very different numerical calculations, not necessarily related to fluid dynamics. Not everything needs to be programmed, as there are libraries of numerical procedures available. There are also very good compilers, which significantly reduces computation time. In addition, if you write the program yourself, you know what you are counting, and using CFD software such as Fluent or Hysys, not really. However, you need to learn algorithmic thinking and learn about numerical methods.
After 20 years of using Basic, Visual Basic, Fortran and Matlab, I strongly recommend Matlab as the most efficient scientific programming language, because Matlab:-
1- Is optimized to deal with matrices and arrays, therefore it is ideal in numerical calculations.
2- Is equipped with all needed ready-to-use mathematical and statistical functions.
3- Has all the required graphical tools like; curves, contours, surfaces.. etc. built in within the software, so, no need to use other programs.
4- Contains facilities for symbolic manipulations to deal with symbolic equations and formulas.
5- Can be integrated with other add-ins and tool-kits like Simulink to widen programming capabilities.
Glad someone wrote that they are using Basic. I used FORTRAN for 10 years and then changed it to Turbo Basic. Simple and convenient to use. Both optimal control and fluid dynamics problems can be solved. Unfortunately, there is no library of numerical programs.