|
[Sponsors] |
So it's all just Taylor Expansion, Runge Kutta integration and Gauss-Seidel solvers? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
October 22, 2021, 22:40 |
So it's all just Taylor Expansion, Runge Kutta integration and Gauss-Seidel solvers?
|
#1 |
Senior Member
Sayan Bhattacharjee
Join Date: Mar 2020
Posts: 495
Rep Power: 8 |
I read through the whole ANSYS Fluent solver theory today. As complicated as it might seem from the outside to a student, looks like all of it comes down to using Taylor Series Expansion for linearization, Runge Kutta integrations for solving explicit problems, and using direct solvers like Gauss-Seidel or ILU factorization with multigrid acceleration for implicit problems.
That's all. That's all we require. If someone understands these topics, they can write their own solvers with some practice and studying other open source solvers. Sure more fancy things like Krylov solvers exist, higher order schemes exist, but they're not required at all for the basic student trying to become better. I can't say for others, but the biggest difficulty in learning CFD for me has been to understand how to convert the maths in the paper into code. I feel let down because the way CFD is taught, mainly focuses on the mathematics instead of actually writing the code. Even the standard CFD books spend 6-7 chapters explaining the maths behind CFD, then they come to Taylor Series expansion and how to actually write even the most basic FDM solver for the basic 1D linear advection equation. By the time at least I reached chapter 6-7, I didn't know what's what, and even which equations were important. Even well known, and highly experienced professors that I know, all spend 4 months explaining the maths behind CFD, then if time permits, guide the students to write some basic solvers. I think that is not a good way to learn CFD at all. I reject this method of teaching completely. The only way I was able to make some sense of the maths involved in CFD, was to study open source solvers. I started with how to actually write basic 1D advection-diffusion solvers, then moving onward to 2D solvers. I don't know if I'm just stupid, I know my maths isn't strong; but it is a glaring red flag in how CFD is taught, when I can understand the code written in big opensource solvers like SU2 before I even begin to understand the mathematics written in highly respected books and papers. Sorry for the rant. Here's a cat. |
|
October 23, 2021, 06:19 |
|
#2 |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,896
Rep Power: 73 |
I really don't understand your topic ... In this age I see people pushing the CFD towards the idea of being the field where there is no need to be experienced in writing simple and basic codes but only the need of learning how to set some black-box CFD code. Thus, this is the idea that I mainly fight...
On the other side, CFD cannot be the field where to learn just how programming a code. My opinion is that CFD is the field where the language of the mathematics (the continuous field) is translated into the language of the numerics (the discrete field). Then, the language of the numerics is applied in some practical programming, by using simple tests. After this stage, some CFD code can be introduced, the students has the background both in math and in numerics to understand the meaning of the settings. Any CFD textbook follow this education pattern. The problem I can highlight from my experience is that the math required in CFD is often not in the backgroud students. Thus, is often required to spend time to that. |
|
October 23, 2021, 06:22 |
|
#3 |
Senior Member
|
Few things I consider relevant on the technical side of the matter:
1) Most books do indeed have those early chapters but, with few exceptions, they barely use them in the end... like at all. Except, maybe, in an attempt to justify why certain problems need certain bcs. While, in my opinion, that's a kind of an overkill (and for most things I learned more from the discretization than the math behind it), that's a very common place to put certain stuff that is, indeed, still needed at a certain point along the way. I mean, it's still better than to look for it in some math book, where it's dispersed with other criptic stuff. 2) Most of the relevant books in the field were written, and the relative generation of professors learned, in an era when unstructured grids and other topics were not really the norm but a research topic. Also, open source codes were not out there at the time as well (more on this later). I don't know when you went to the university but, when I did (20 years ago), I kind of expected more on certain topics as well but, in retrospection, was really too early to be possible. 3) I wrote about this in some other post recently, if I recall correctly, but the role of university, in my opinion, is not to make you prolific in any specific field or activity. It is more in making you an individual that, with his own knowledge, is able to become prolific in a certain range of fields of knowledge. Today is all about 2nd order unstructured finite volumes and RANS (and I think they are going to stay for very long). But what if in 10 years it's all lattice boltzmann on uniform grids? Or high order DG? Or whatever? 4) You put it down in an easy way but, for the same reasons of the previous point, if those things were going to be part of any academic curriculum, wouldn't certainly be managed in the same way they are typically presented. Think about the unstructured gradient computation and diffusive fluxes. By itself it is a vast territory with a lot of nuances, and I ensure you that very few people have a good command of the whole thing (as some detailed recent researchs have still clarified several aspects of it). So, unless you actually are working on it, it makes very little sense to present students a list of items based on the Fluent user manual. Also, especially in certain faculties, students are gonna hunt you down on whatever inconsistency they perceive, so you're certainly not going on stage unless you know well stuff, which requires actually working on it to the very least. The same would apply to several of the topics, probably each one deserving a whole course. But in most cases you're there to become, say, an engineer, not a CFDer, so there is simply no time to do certain stuff with proficiency and in the correct way. 5) There are nonetheless books that cover certain stuff, but in the end the level is not even close to be satisfactory for a textbook, but just for a reference. Was planning to add few personal opinions and facts, but got out of time. Maybe next time Last edited by sbaffini; October 23, 2021 at 09:45. |
|
October 23, 2021, 13:09 |
|
#4 | |
Senior Member
Sayan Bhattacharjee
Join Date: Mar 2020
Posts: 495
Rep Power: 8 |
Quote:
Disclaimer : over generalization is expected in the response below. It should be a field where more priority is put into teaching students how to code. They should be Introduced to how to numerically solve the PDEs as early as possible, because it will enable more students to understand the continuous field mathematics clearly. I don't agree with your statement that students not having background knowledge of the maths required to learn CFD, is the reason they don't understand CFD. In college courses, Engineering Mathematics 101 to 103, they are given enough mathematical knowledge to understand PDEs/ODEs/Matrices/Vectors and more. They know more than enough. The reason they fail to understand CFD, is due to many professors not showing them how to convert the mathematics equations into discrete equations that can be solved on a computer. IMO most senor professors right now don't teach CFD (or anything), how they learned it during their educational journey. They learned CFD using simple 1D equations and writing 1D solvers. They learned CFD by solving 1D non-linear convection equations on old Fortran punchcard machines. They had no other option, because powerful machines didn't exist back then in their universities. This allowed them to understand the basics required to become better incrementally. But now, in many CFD 101 course, we start with full derivation of NS equations and don't even bother about solving any of the rudimentary equations. Only in some universities professors teach how to write simple 1D/2D solvers. It is kind of slightly hypocritical for them to expect their students to know enough to be good in CFD, before the students even started CFD. If they didn't know how to do it when they were students, their students don't have any obligations either. |
||
October 23, 2021, 14:54 |
|
#5 |
Super Moderator
Alex
Join Date: Jun 2012
Location: Germany
Posts: 3,427
Rep Power: 49 |
Is it though? If you don't go into academia, chances are high that during your whole career of dabbling with CFD, you do not touch any solver internals. I'm not saying that CFD courses at universities necessarily prepare students better for that route. Just that being able to to write a CFD solver isn't a useful skillset for most CFD engineers.
|
|
October 24, 2021, 05:38 |
|
#6 |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,896
Rep Power: 73 |
One cannot discuss in abstract about the content of a CFD course ... let me pose my specific case. I have 48hrs in my CFD course, you know that in Italy we have a 3+2 yrs academic path, the students attend the CFD course at the second semester of the second year.
They never had, before my course, any approach to the numerical solution of PDE. Now, considering that 48 hours are in total (frontal lecture + practical code programming), what should be the program of the course? |
|
October 24, 2021, 07:04 |
|
#7 |
Senior Member
Join Date: May 2012
Posts: 552
Rep Power: 16 |
We have different approaches in different courses here at my university. Depending on what type of Bachelor / Master you come from these courses can be very different. As already pointed out, the purpose is to prepare the student for a) a career in academia or b) a career in industry. Then we can also divide this into categories of applied and theoretical.
In many cases we teach CFD more like an overview of capabilities, i.e. students use CFD as a tool to solve some problems. This makes sense for students that may only have a single course of CFD during their bachelor or master. Students that are interested in using CFD are then encouraged to develop their interest by taking more theoretical courses. Students that are not interested will at least have a good knowledge of the capabilities of CFD and what you can expect from a CFD consultant. Most of our students go to become industrial leaders and seeing that they will come in contact with CFD it is a good thing that they have seen "hands-on" what is possible in real industrial problems. If we focused only on how to write simple 1d and 2d codes (no multiphase and no turbulence models most likely) then it would be useless for all but a few of our students. That being said, I totally agree that writing code is extremely important in order to actually understand the PDEs. CFD is a multidisciplinary field and the more you combine all aspects the more you understand. It also helps you to see past "this is common knowledge" type of arguments from people that have only read text books without actually trying to implement what is in them. |
|
October 24, 2021, 07:44 |
|
#8 |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,896
Rep Power: 73 |
I am not sure to understand the key of the discussion. When you state to educate a student in "programming a CFD code" what do you exactly mean?
|
|
October 24, 2021, 08:13 |
|
#9 | |
Senior Member
Sayan Bhattacharjee
Join Date: Mar 2020
Posts: 495
Rep Power: 8 |
Quote:
My main issue is that CFD is always thought of as a difficult subject, while it is not. it is difficult because students don't actually understand how to convert the convert the seemingly complex mathematics into usable code. The discretization procedures are similar for almost all partial differential equations. We linearize them with Taylor Series Exapnsion then use upwinding or (if possible) central difference schemes to solve them. All of this can be easily taught by solving the 1D advection equations and diffusion equations. It wouldn't take any great effort for universities to do this, but it would be very helpful. Someone can make the argument that students can learn it on themselves. No they can't. If they don't even know that solving 1D advection-diffusion equations is very important (since no one told them), they will try to go into 2D directly, and don't know what to do. If this can't be fit into the assigned course hours, a properly guided path should be laid out for students, that they can follow on their free time. I don't expect any universities to change their course work. So I will create my own course on Youtube. |
||
October 24, 2021, 08:21 |
|
#10 | |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,896
Rep Power: 73 |
Quote:
Well, I think your opinion is clear to me, now. And I can state that is exactly what a CFD course must do, I usually use both 1D case (such as Burgers equation) and 2D cases (such as lid-driven cavity and backward facing step) for my course. They are the required application after the theory (that is always a mix between math and numerics). Therefore, the issue is in the CFD courses you are addressing, they simply lack of the CFD goal. I don't know the university you are referring, but that sounds strange to me... this classic test cases are in any CFD textbook. |
||
October 24, 2021, 08:42 |
|
#11 |
Senior Member
|
I was having a hard time following the thread (to the point of writing multiple answers which suddenly became useless with new posts).
But now that you have clarified your statement, as Filippo, I agree that this is indeed what a single or multiple CFD courses are meant to teach (I personally had 4 of them with Filippo, more than 10 years ago). Yet, let me restate that, as mentioned by Simbelmynė and flotus1, there are universities and/or courses where CFD might still be useful, but just from a different perspective. In those cases CFD coding, or coding at all, are not meant to be part of the program or life after the degree. But this might even depend from the single courses. I took a course related to FEM theory for structures, but coding was not part of it nor expected; yet, I was specifically teached the matrix assembly part. I'm pretty sure that, in the story of that course, probably someone, at certain point, decided to make the extra mile by himself and show up at the exam, but not me as I wasn't interested in the end. EDIT: however, let me add that, from my experience, there is a large difference between adding 1D-2D coding as part of a single course and, say, taking dedicated courses on different topics (I had 1 on basic numerical analysis, 1 on 1D-2D PDE discretiztion and 2 on NSE discretization). That single addition to the single course is not, in my opinion, ever going to serve the purpose of making you a proficient CFD coder. There is a plethora of nuances and details to each single topic. Of course, you still need to start somewhere if you want to code, but the specific courses are out there as well. |
|
|
|