Study material for CFD using Matlab

In summary, the person is looking for a book on Computational Fluid Dynamics with plenty of examples and problems solved in Matlab. They are advised to start with the book "Computational Fluid Dynamics: The basics with applications" by J.D. Anderson and also consider "CFD by Example" which has Matlab codes. It is mentioned that most CFD codes are written in Fortran or C++, but knowing Matlab can still be helpful. The person is also warned that CFD simulations can take a long time to run, especially if using Matlab.
  • #1
sourav92
2
0
I want to learn some basics of Computational Fluid Dynamics.But most of the books that I found dealt mostly with the theory of it with very less examples or problems to be solved numerically. I know Matlab and am pretty good at coding too.So, I am searching for a book from which I can learn CFD where there are plenty of examples and problems solved in Matlab. I will be really grateful if someone recommends some books with the above features.
 
Physics news on Phys.org
  • #2
You probably won't find much. People don't use Matlab for this sort of thing because Matlab is a nice, easy language but it is incredibly inefficient at large problems and most CFD problems cannot really be solved on a typical desktop computer anyway. They usually get solved on a cluster or a supercomputer.
 
  • #3
First things first...
I suggest you start by studying the book titled "Computational Fluid Dynamics; The basics with applications" by J.D. Anderson (McGraw Hill).
However, most of the programming in CFD is done in Fortran. That is not restrictive though. Knowing MATLAB, wouldn't it be difficult for you to program the applications in MATLAB instead of fortran. The rationale (the rules, the equations etc) are the same, only the programming language is different.
 
  • #4
You could try this book:
http://www.cfmbyexample.com/
which has MATLAB codes
I don't know if it's any good, but you can download the MATLAB source for free and study it. I would also recommend you first study the book of Anderson, or the book of Ferziger and Peric, it also has source code examples, in fortran I believe.

Aero_UoP is right: most CFD codes are actually written in Fortran or c++. Also, when you know how CFD works, it doesn't matter in which language you write it in (up to a certain degree). But the nice thing about MATLAB is that you don't have to worry (a lot, in the beginning) about a lot of stuff and you can get a CFD code running quite fast (in terms of implementation time).
Boneh3ad, you're a bit pessimistic: If you have a quad-core with 16 GB of memory, you can already do some interesting stuff, say 2M cell meshes and k-epsilon as a turbulence model. I have a 12-core Z800 with 100GB memory and it suffices for most engineering CFD simulations.
 
  • #5
And even on that beast of a workstation how long does that take?

This is also assuming you feel that k-ε is a sufficient model for you, meaning flows with small pressure gradients (i.e. no inlets or compressors or certain airfoil geometries) and situations where you are fine averaging out the finer physics of the flow.

Basically if you are trying to get approximate, engineering results, I suppose you could get a reasonable amount done on a powerful workstation. If you want to probe the physics then you need a lot more. Even a lot of k-ε simulations take a long time to run on anything but a cluster or better. Using Matlab to do this would exacerbate the issue since it is several orders of magnitude slower than an equivalent Fortran program.

Now add in the additional runs require on the same problems for iterative and grid convergence and you are talking lots of time required to get an answer.
 
Last edited:
  • #6
Thank you boneh3ad, Aero_UoP and bigfooted for your reply. It was a really great help. I have started with Anderson's CFD: The basics with Applications.
 

Related to Study material for CFD using Matlab

1. What is CFD and why is it important in scientific research?

CFD stands for Computational Fluid Dynamics and it is a branch of fluid mechanics that uses numerical methods and algorithms to solve and analyze fluid flow problems. It is important in scientific research because it allows scientists to study and understand the behavior of fluids in various systems and helps in the design and optimization of engineering processes.

2. How can Matlab be used for CFD analysis?

Matlab is a powerful software that can be used for CFD analysis by providing tools for solving partial differential equations, creating and manipulating grids, and visualizing results. It also has built-in functions for solving fluid flow problems, making it a convenient tool for CFD simulations.

3. What are the benefits of using Matlab for CFD compared to other software?

One of the main benefits of using Matlab for CFD is its user-friendly interface and robust programming capabilities. It also has a wide range of built-in functions and toolboxes specifically designed for CFD analysis, making it a more efficient and accurate tool compared to other software.

4. Are there any recommended study materials for learning CFD using Matlab?

Yes, there are various study materials available for learning CFD using Matlab, including textbooks, online courses, and tutorials. Some recommended resources include "An Introduction to Computational Fluid Dynamics: The Finite Volume Method" by H. Versteeg and W. Malalasekera, and the "CFD with Matlab" online course by Dr. Steve Brunton.

5. Can Matlab be used for both 2D and 3D CFD simulations?

Yes, Matlab can be used for both 2D and 3D CFD simulations. It has built-in functions for solving both 2D and 3D partial differential equations, and its visualization tools can handle both 2D and 3D data. However, 3D simulations may require more computational resources and time compared to 2D simulations.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
12
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
2K
  • Science and Math Textbooks
Replies
3
Views
2K
  • STEM Career Guidance
Replies
3
Views
2K
  • STEM Academic Advising
Replies
3
Views
843
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
1K
  • Mechanical Engineering
Replies
8
Views
3K
Back
Top