# How to learn CFD (For Absolute Beginners)

 Register Blogs Members List Search Today's Posts Mark Forums Read

 January 4, 2021, 14:11 #21 Senior Member   Sayan Bhattacharjee Join Date: Mar 2020 Posts: 464 Rep Power: 7 Since there is a debate between whether to study books first or get our hands dirty. Here's my personal experience : (may not work for others) 1. Studied in university. 2. Was taught nothing more than the basics of CFD. 3. I wanted to write a solver, but got no help from any of my professors (they gave motivation and support and they're amazing ) because they themselves use commercial codes and don't write CFD solvers. 4. Asked on CFD forums. Was told to study Patankar's and Versteeg's book. 5. Spent one year studying. Bad in maths. Couldn't write my solver. I was able to progress only when: 6. Saw Professor Lorena Barbara's course. Started writing small solvers. 7. Saw Professor Nishikawa's free CFD codes and started to experiment with the solver. Wrote a 2D solver. 8. Saw Professor Gretar Tryggvason's course and CFD codes. Most of my progress came after studying Professor Lorena's course since it gave a very good explanation of how to actually code a CFD solver. Any and all books that only showed equations with no working code, were not helpful before I was able to understand how to actually write a solver. This is a cyclic dependency and I wasted around 1 year trying to only understand how to write a solver by studying the books. Everyone told that CFD is difficult, I need to understand the equations first, I need to analyze stability first. Each and every one of them were unfortunately wrong. I should've not listened to them, and simply started by taking an easy solver and trying to see what made it work. That's how I learn now, and I'm making around 10X more progress than I did ever before. Now that I know how the code will be written, every equation in the book seems easier. Still bad in maths. Still can't understand complex topics. Don't care. I like shockwaves too much. M.Nazrin, aero_head, xisluke and 1 others like this.

January 4, 2021, 14:19
#22
Senior Member

Kira
Join Date: Nov 2020
Posts: 436
Rep Power: 7
Quote:
 Originally Posted by Eifoehn4 It's more the other way around. With your way of learning you will waste much more time at the end of the day.
I agree with this sentiment. As we say, garbage in, garbage out. If you don't know what you're simulating, you won't know how accurate or even IF your results are accurate.

January 4, 2021, 14:23
#23
Senior Member

Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,599
Rep Power: 70
Quote:
 Originally Posted by aerosayan Since there is a debate between whether to study books first or get our hands dirty. Here's my personal experience : (may not work for others) 1. Studied in university. 2. Was taught nothing more than the basics of CFD. 3. I wanted to write a solver, but got no help from any of my professors (they gave motivation and support and they're amazing ) because they themselves use commercial codes and don't write CFD solvers. 4. Asked on CFD forums. Was told to study Patankar's and Versteeg's book. 5. Spent one year studying. Bad in maths. Couldn't write my solver. I was able to progress only when: 6. Saw Professor Lorena Barbara's course. Started writing small solvers. 7. Saw Professor Nishikawa's free CFD codes and started to experiment with the solver. Wrote a 2D solver. 8. Saw Professor Gretar Tryggvason's course and CFD codes. Most of my progress came after studying Professor Lorena's course since it gave a very good explanation of how to actually code a CFD solver. Any and all books that only showed equations with no working code, were not helpful before I was able to understand how to actually write a solver. This is a cyclic dependency and I wasted around 1 year trying to only understand how to write a solver by studying the books. Everyone told that CFD is difficult, I need to understand the equations first, I need to analyze stability first. Each and every one of them were unfortunately wrong. I should've not listened to them, and simply started by taking an easy solver and trying to see what made it work. That's how I learn now, and I'm making around 10X more progress than I did ever before. Now that I know how the code will be written, every equation in the book seems easier. Still bad in maths. Still can't understand complex topics. Don't care. I like shockwaves too much.

Maybe the starting point is that CFD should be learned in a well balanced university course, having theory immediately followed and applied by exercises.

My students at the end of the course are able to develop a simple 2d code for transient solution of NSE, at least in pressure-based formulation. And they use also Fluent to compare the results.

January 4, 2021, 14:29
#24
Senior Member

Sayan Bhattacharjee
Join Date: Mar 2020
Posts: 464
Rep Power: 7
Quote:
 Originally Posted by FMDenaro Maybe the starting point is that CFD should be learned in a well balanced university course, having theory immediately followed and applied by exercises. My students at the end of the course are able to develop a simple 2d code for transient solution of NSE, at least in pressure-based formulation. And they use also Fluent to compare the results.

Yes Sir. That's the best way to learn.
Unfortunately/fortunately we didn't have that and I had to teach myself.

 January 5, 2021, 07:22 #25 Senior Member     Paolo Lampitella Join Date: Mar 2009 Location: Italy Posts: 2,120 Blog Entries: 29 Rep Power: 38 What was implicit in my previous statements, of course, is that you have access to a university course. Honestly, I don't see how any engineering degree could avoid treating PDEs and a minimum of numerical methods in any of its courses. Those courses, ideally, would be your entry points to follow a certain path, as long as you liked the matter. Like, say, deciding to attend more courses on the subject, make your thesis on the subject, etc. A university course is not just about acquiring knowledge, but doing this with your peers, having confrontations with other people and professors. I have no idea how the one way approach of online material would have worked with me, but certainly not very well. Besides this, let's also clarify a couple of things. First, in my experience, there is no such thing like industry vs. academy knowledge, like in black vs. white. It is more like shades of gray. You would be surprised of how much people from each side know of the other one. Second, writing an actual solver that works (say, like Fluent) is still another job, that you won't learn from Lorena Barba or any other university course. But, if you don't have extended knowledge in the field you are going to waste an inordinate amount of time on certain things only because you have no idea. FMDenaro, aero_head and Dr Youssef Hafez like this.

 January 6, 2021, 07:20 long winding road(s) #26 Senior Member   Mandeep Shetty Join Date: Apr 2016 Posts: 185 Rep Power: 9 Here is my road map for you if you are truly committed to learning CFD (and its a pretty long winding journey, so buckle up) PS: I am assuming you have basic knowledge of Fluid Mechanics and Mathematics There are two ways forward: a)Learn a CFD software (or two) like Fluent or StarCCM etc. The user interfaces of such commercial software are pretty straight forward and usually, I have seen that product-based (OEMs) companies that employ CFD generally just have a particular type of problem to solve. You can find employment with this knowledge without knowing a deep background of how CFD works. But if the problem changes or the software changes you will be in trouble. Also, this is not what is considered as 'learning CFD'. b) Actually learn CFD ie the front ends (UIs) of some CFD software and also the mathematical/algorithmic/coding shenanigans going on in the background.[ And this is the long winding road I was talking about] I will be talking about the second path: i)Prerequisite: This is the base/foundation of whatever you will be learning. You will need a basic understanding of fluid mechanics/dynamics (ex what is pressure, boundary layer, convection, diffusion etc) ALSO Mathematic (what are functions and equations, ODEs,PDEs, Numerical Methods etc). Even if you think you know them go through them again and I am sure you will be going back to them as you continue your journey. Resources: Fluid Mechanic textbooks, Youtube lectures. Engineering Mathematics textbooks, KhanAcademy and 3blue1brown youtube channel for mathematics. Once you have dusted off your basics you are ready to start your journey (yes that's right you haven't even started your journey yet ). ii) Start reading an introductory textbook on CFD (Anderson or Malaasekra or Hirsch). This is where all the basic knowledge of math and FM comes into play. You will be introduced to the Navier Stokes equations (and any continuum fluid flow you will simulate will always have these equations), The Finite Difference Method (FDM) OR Finite Volume Method (FVM) (I suggest start with FDM if you have no idea what the term 'discretization' mean), various Numerical methods etc. So it's lots and lots of math...but it's applied math so you will get to learn 'why' you are doing a particular math problem and it won't be like solving a general math problem from a mathematical book. iii) Once you are a few chapters into(ii) you can start doing these things simultaneously. Learn a programming language (like Matlab or python to write basic programs to implement what you have learned. Start with write the code to solve the diffusion equation and convection equation and learn how these two equations are related to NS equation. Ref: HTML Code: `https://lorenabarba.com/blog/cfd-python-12-steps-to-navier-stokes/` ; HTML Code: `http://ohllab.org/CFD_course/index.html` ) and use a commercial CFD solver (I suggest Fluent student edition as it has really great user manual and user base. Read the manual!). I personally started dabbling with the commercial software [path (a)] but soon wanted to know how it worked and so started off on path (b). Because there is a lot of reading involved, you too can start using the commercial software at any point in time just to keep yourself entertained, and it helps you to better understand what you are learning. PS: Once you have a basic understanding of how to use commercial software and have run a few simulations I suggest you start using OpenFOAM (or any other open-source software) and learn C++. So you are again wondering where/how to start?? Start with Fluent student version running basic simulations (like pipe flow) while going through a CFD textbook and introductory lectures. You can always ask questions in this forum for things you don't understand. sbaffini and FMDenaro like this.

October 24, 2022, 13:30
#27
New Member

EvaRaynes
Join Date: Oct 2022
Posts: 1
Rep Power: 0
Quote:
 Originally Posted by fozba Before starting, I would like to state that I am a new member and this is my first post, so if the post is somehow inappropriate, I will remove it. Hello everyone, I am a 4th year undergrad student and I want to start to learn Computational Fluid Dynamics. I am interested in flow in porous media. However, the books I have found (even the ones that claim to be for total beginners) introduce the concept with overwhelming mathematical equations. After not understanding for quite a while, I decided to give a shot to ask here for your advices. Can you suggest me a book/tutorial/lecture to learn CFD from scratch? I count on my mathematical knowledge (Both calculus and differential equations), however, I might be a little weak on vector calculus and fluid mechanics. Thank you.
A lot of good advice has been given here, but I would like to know what you ended up using and what your result is now. I will be grateful for the answer.

October 27, 2022, 01:27
#28
Senior Member

Join Date: Jun 2011
Posts: 172
Rep Power: 14
Quote:
 Originally Posted by evarrw A lot of good advice has been given here, but I would like to know what you ended up using and what your result is now. I will be grateful for the answer.
The answer is related to what exactly you want to be - an user working in a particular industry, or a developer/academic.

If user, get familiar with the CFD terminology from a basic/general CFD book and start playing with the CFD tutorials/manuals of the code you are going to use. The good thing is that even very big companies stick to one, or two codes. The most popular and comprehensive are Fluent and StarCCM and they both have excellent manuals and hundreds of YouTube tutorials. The other good thing is that the application area you'll be dealing with reduces significantly the number of the applicable turbulence models and makes the CFD model setup easier. Yet, being in the industry, you'll be able, from time to time, to verify experimentally your simulations and get a feeling what works and what doesn't.
I agree completely with the guy above who emphasized that making a "clean" CAD model or learning how to clean it to ensure successful meshing is very important and unfortunately very time consuming. This may become a nightmare when very complex geometries are involved and those are usually generated by somebody else within the company, So yes, as an user, learning the meshing is probably the most important CFD section you have to know well. Finally, you could get fired if your simulation results are repeatedly far from the experimental results measured on the manufactured prototype.

If you'd like to be on the developer/academic side you must go "the full nine yards", reading all these CFD books and learning the math involved. You'll be able in the end to write your own CFD code and/or use OpenFoam to simulate a "flow over a step" and some other basic flow cases floating around for years. These may involve complex physics but are just laughable from any angle of usefulness. You’ll also be able to write papers and sharpen your math tools when simulating a flow involving one or two bodies. It is also a more secure job mainly because the people evaluating your performance are at your level too.

 January 14, 2023, 07:04 #29 Senior Member     Paolo Lampitella Join Date: Mar 2009 Location: Italy Posts: 2,120 Blog Entries: 29 Rep Power: 38 I think that basing your own decisions on what few of the most rich people in history every now and then propose is, statistically speaking, objectively wrong. Data says that, despite dropping university, no one else became Bill Gates, Elon Musk or Steve Jobs. Ever. Just them, out of billions, that either dropped or not university. Thus, maybe, it is not necessarily an objective advice, besides having probably nothing to do with CFD. In this thread you can find a collection of experiences from people in CFD, all of which have been pretty clear in the path they followed to get to a certain point. Obviously, not all the universities in all the countries are identical. This is, possibly, the main unknown here. Maybe you can ask people who have attended one of the universities you can probably attend yourself and get a better idea if it is actually worth it. Yet, my personal experience in life, for important things, is that no one could really give me the right advice for the way I am.

 January 14, 2023, 10:29 #30 Member   Youssef Hafez Join Date: Dec 2022 Posts: 39 Rep Power: 2 With my due respect to all of what has been said, I think the best way of learning ever is through a teacher who provides guidance, supervision, directions, and focused approach. Self-learning maybe possible but definitely it is not the most efficient way of learning, it is very time consuming and you might end up spending time on learning things that you never have to use later. This does not have to be through a university program or degree as it needs long time or years to do that. Look for short courses about Applied math (numerical methods), Fluid mechanics, computer Programming, and CFD coding. Good luck to you.

 January 14, 2023, 10:42 #31 New Member   siamak Join Date: May 2013 Posts: 8 Rep Power: 12 As a person that started to learn CFD just based on his own enthusiasm for computing and coding with a background in mechanical engineering and somehow good in math and fluid mechanics and programming I have to tell you that listen to the expert's advice and try to strengthen your understanding of the foundation of math and fluid mechanics. I started learning CFD by myself and just reading the book and reading the other's code and lots of times I faced problems that just the advanced guy's advice helped me to find the solution. So even if anyone wants to give you a roadmap if I were you I will choose those people's maps that are experts on this era. Happy learning!

 January 15, 2023, 11:49 #32 Member   Youssef Hafez Join Date: Dec 2022 Posts: 39 Rep Power: 2 I can give a basic CFD training course which includes fundamentals of the CFD aspects; however it is from A to Z. Basically, this course includes the theoretical aspects of fluid mechanics governing equations and turbulence modeling equations (k-E) followed by the Numerical methods (Finite Element and Finite Difference) and finally practical case studies starting from pure diffusion problems to advection -diffusion problems to 2D and 3D Reynolds Averaging Navier Stokes equations (Flows in ducts, cavities and around solid bodies). 2D meshing would be given with simple 3D meshes as complex 3D meshing is beyond the scope of this preliminary course. I have 30 years of experience in CFD. I still use FORTRAN in coding and coding in FORTRAN would be explained. Several useful source codes will be given as part of the course. I believe learning CFD should be in-person through teacher-student setting. The place for training could be in my country Egypt (Cairo) or at your country ( if a group that would be preferred). If this course could be given as a summer training course at a university that would be terrific. Proposed duration is about 3 weeks. I don't have in mind now the cost of this training so if anyone is interested contact me by email : youssefhafez995@gmail.com Last edited by Dr Youssef Hafez; January 16, 2023 at 02:01.

January 18, 2023, 11:30
#33
Senior Member

bigfoot
Join Date: Dec 2011
Location: Netherlands
Posts: 338
Rep Power: 15
Quote:
 Originally Posted by KristieTasty Whether it's a user working in a certain industry, or a developer/academic, what choice do I have between going to university or not? A few times ago, I was sure I had to do it, but times are changing and even Musk said that the education system is absolutely useless as they are organized. I feel confused.
You go to university to educate yourself, to learn about topics that interest you. Sometimes, you can even find work in that same field after you obtained your degree. Musk is an investor, not a career counselor, don't take career advice from him. Elon will also not hire you if you do not have some kind of relevant degree. A degree is an entry ticket.

If you want a counter example to Musk, Jim Simons became a billionaire by using mathematics to predict the stock market: https://en.wikipedia.org/wiki/Jim_Simons_(mathematician)

In my opinion if you want to learn something as complicated as CFD, you need to do it as part of a formal education, or at least you need a formal education teaching you the prerequisites like calculus,linear algebra, differential equations, numerical analysis, physics, fluid dynamics, thermodynamics,...
Also remember that a university 'only' gives you an initial condition for the rest of your scientific/engineering career path. Some universities provide better initial conditions than others, and some students can provide better initial conditions for themselves by taking self-study seriously, making the exercises, programming example problems, coding their own cfd solver, etc.

January 18, 2023, 16:34
#34
Senior Member

andy
Join Date: May 2009
Posts: 239
Rep Power: 17
Quote:
 Originally Posted by KristieTasty Whether it's a user working in a certain industry, or a developer/academic, what choice do I have between going to university or not? A few times ago, I was sure I had to do it, but times are changing and even Musk said that the education system is absolutely useless as they are organized. I feel confused.
Yes times have changed. When I was young smart people went to university to get an undergraduate and often postgraduate degrees. Then went to work to become an established professional using that education. This gave them a respected position in society and sufficient income to buy a house, get married, raise and educate children, and lead a safe comfortable life in the community.

A youngster today can do all the "right things" and go into significant debt to get highly educated which will enable them to be employed as a professional. Unfortunately, the income paid to many qualified professionals today is no longer sufficient for a safe comfortable life. A house may never be affordable, both partners will have to work, a decent education for children unaffordable, state supported/provided services (hospitals, schools, pensions, dole, transport, power, etc...) becoming increasingly unreliable/insufficient. I presume this is what Musk is referring to.

If you want interesting work in the field of CFD a high level of education is a requirement. It isn't optional. The most efficient way to get that education is at a good university. If you opt not to go to university then a lot of job opportunities involving more interesting work will not be available. You will have to make a go of less interesting and less stable work in competition with more people. For some it can lead to a good income but for most it won't. Just less secure and less interesting work.

 January 20, 2023, 00:47 #35 Senior Member   Join Date: Jun 2011 Posts: 172 Rep Power: 14 I agree with andy_. Without university one doesn't have chances in THIS field. There was a book "poor dad, rich dad" as far as I remember, written by an American with a Japanese origin who became rich with property development. He wasn’t educated and was promoting the idea that the high education was useless, because the universities were preparing the "workers" of the society and therefore one couldn't get well off by getting too much educated. Unfortunately, there are a lot of real life examples supporting this theory, but on the other hand if you like the CFD to the level of enjoyment (as I guess the majority of the people here), then you have to get educated. Yes, your life may not be too comfortable, but if you enjoy your work you'll be happy and that’s the most important. From my experience there are unfortunately just a couple of countries where the engineering work is really appreciated and the engineers/scientists are highly regarded - Germany, Japan, Korea and to some extend the USA. In the rest of the developed world lawyers, for example, are much more appreciated, even though they contribute nothing to the nation’s development and quality of life. This is the sad reality.

 January 20, 2023, 16:05 #36 Member   Youssef Hafez Join Date: Dec 2022 Posts: 39 Rep Power: 2 I agree with all the gentlemen who stressed that learning CFD must be through education which basically means getting taught by a teacher. However, college Bachelor degrees for example of 140 to 120 credit hours contain many subjects and courses that are not really necessary for CFD or for a certain specific profession. This must be the case because Universities have to prepare their graduates in as many disciplines and job types as possible. A B.SC. may have to be prepared for at least 3 to 4 different jobs or specializations. Even M.Sc. and Ph.D. degrees require certain credit courses hours that might exceed CFD needs. I wish there are degrees or education programs that are very specific like B.SC. or even higher diploma in CFD which can be recognised by CFD companies. This will save a lot of time but might be risky to some people who think what if CFD or the specific specialization is not having a high job demand. Maybe Elon Musk meant this extra unneeded education. Maybe it is the time to offer both traditional and classical degrees on one hand in addition to focused education on the other hand with one job type as CFD for example. This what I have been trying is to offer a focused education but without accreditation and the necessary resources it can NOT be done practically although all the courses and educational framework is done. So advices to get university education are OK theoretically but who wants to sped 5 years to become a CFD engineer while this can be done in one year within the suggested focused degree. We have to understand that in todays world where every thing is going fast and the new generation can not afford the time and financial resources, that we have to move to a non-traditional ways of learning.

 January 21, 2023, 07:16 #37 Senior Member   Filippo Maria Denaro Join Date: Jul 2010 Posts: 6,599 Rep Power: 70 Use YouTube if you want to learn how to set a CFD code, go to university if you want to learn CFD. Simple … bigfootedrockmidget and poly_tec like this.

 Tags beginner, book, learn cfd