Study material for CFD using Matlab

Click For Summary

Discussion Overview

The discussion centers around finding study materials for learning Computational Fluid Dynamics (CFD) using MATLAB, with a focus on resources that provide practical examples and numerical problems. Participants explore the challenges of using MATLAB for CFD and suggest various books and resources.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested
  • Homework-related

Main Points Raised

  • One participant expresses a desire for books that include practical examples and numerical problems in MATLAB for learning CFD.
  • Another participant argues that MATLAB is not commonly used for CFD due to inefficiencies with large problems, which typically require more powerful computing resources.
  • A suggestion is made to study "Computational Fluid Dynamics; The basics with applications" by J.D. Anderson, with a note that most CFD programming is done in Fortran.
  • A resource is shared that offers MATLAB codes for CFD, although the quality of the resource is uncertain.
  • Some participants note that understanding CFD concepts is more important than the programming language used, as the underlying principles remain the same.
  • There is a discussion about the capabilities of personal workstations for running CFD simulations, with some participants suggesting that interesting results can be obtained even on moderately powerful machines.
  • Concerns are raised about the time required for simulations, especially when probing the physics of flows or performing iterative runs for convergence.

Areas of Agreement / Disagreement

Participants do not reach a consensus on the feasibility of using MATLAB for CFD, with some expressing skepticism about its efficiency compared to Fortran or C++. There are multiple competing views regarding the adequacy of personal workstations for CFD simulations and the sufficiency of the k-epsilon turbulence model.

Contextual Notes

Participants highlight limitations related to the computational power required for CFD simulations and the potential inefficiencies of using MATLAB for large-scale problems. There is also mention of the need for iterative runs and grid convergence, which can significantly increase computation time.

Who May Find This Useful

This discussion may be useful for students or professionals interested in learning CFD, particularly those looking for resources that incorporate MATLAB, as well as those considering the computational requirements for CFD simulations.

sourav92
Messages
2
Reaction score
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
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.
 
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.
 
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.
 
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:
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.
 

Similar threads

  • · Replies 12 ·
Replies
12
Views
3K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 3 ·
Replies
3
Views
5K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 4 ·
Replies
4
Views
7K
  • · Replies 16 ·
Replies
16
Views
6K
Replies
2
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 1 ·
Replies
1
Views
1K