|
[Sponsors] |
Advice on Software dev Career in CFD / Timeline of constructing a FVM Code |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
October 15, 2021, 03:43 |
Advice on Software dev Career in CFD / Timeline of constructing a FVM Code
|
#1 |
New Member
|
Hi to all,
So I have been working in the HPDC Die Casting industry using packages like MagmaSoft, Flow-3D & ESI's ProCast. (Got to be the most challenging CFD application ever with super high velocity/pressure gradients + shocks etc.) Lack of competitive peers & a love for the underlying CFD code made me pursue as many courses as I can on the software dev aspect of it. Has been ongoing for more than a year now. M.Sc. in scientific computing applications have gone to waste last season (probably due to bad grades). Lately I decided to go all in, & applied to as many beginner software dev jobs for companies like ANSYS, Altair, Dassault Systems etc. once I finished with DSA etc. Not going as expected though. Until I find an opportunity, I've decided to go through as much cfd code as I can. Finding a dead end with FDM, I am finally on the path of developing a FVM solver to be run on python (ultimately will convert to C++ for multi-threading) & visualize using VTK libraries. [Final goal is to visualise a cloud passing over a ridge in blender(using vtk) & match it with an actual past experience.] Now i am familiar with SIMPLE algorithm & would like to pursue that with a structured grid. Going with a staggered grid combination initially, can anyone give me a timeline for moving through 1-D, 2-D, 3-D codes one by one, as I don't know what to expect! TLDR: 1. Timeline for coding 1-D, 2-D & 3-D SIMPLE FVM Codes with structured grid & staggered grid interpolation. (never mind checkerboard oscillations) 2. Very much appreciate if anyone can help me out by reviewing my application for Software dev roles in companies like ANSYS, Altair etc. |
|
October 15, 2021, 05:09 |
|
#2 |
Senior Member
|
First of all, while I haven't worked specifically for such big companies, I can still give a little overview, so let me clarify that working in big CFD companies can be approached from 4 main sides:
1) Sales/marketing: you will be giving a lot of presentations, showing off the code to potential clients, etc. You won't always need to be trained in that specific software of the company, but that would be a huge plus. Also, for whatever company, this requires handling pretty advanced stuff, so a strong experience in CFD is still needed. Every now and then you can still find some openings requiring little experience, but you need to bring something to the table, some desirable competence, besides fitting the role in general. 2) Tech support: you will be working on actual CFD problems with clients. With respect to sales, you probably need slightly less interpersonal skills, but pretty much always requires a certain experience with, at least, one specific field. CFD companies will almost always look for an expert in combustion, acoustics, multiphase, etc. More often than not the expert level is at the Ph.D. here. Knowing the specific CFD code will be a plus, but you are expected to understand any CFD code here as well. 3) Software engineer: the term varies from company to company, but here I refer to everything needed to put together the CFD offer of the company but not related to the actual CFD code itself. This goes from the GUI to the cloud infrastructure to all the IT stuff required for these companies, with the scope of the role typically being inversely proportional to the company size. This is pretty much the only job (besides non technical roles) where you can actually not know CFD (but if you do is a strong plus). However, you must be good at C++ (almost always) and whatever framework is used by the company to put things together (which tend to be a lot in these days). 4) CFD software developer: this is probably the role you were talking about. Now, I don't want to let you down, but big CFD codes are complex pieces of math softwares. You don't necessarily need to be competent on each piece of them, but a Ph.D. level of competence is practically mandatory. Note that I'm not saying that you need a Ph.D. but you need to prove that you have that level of compence in CFD. Also, you must typically have worked before on something as big for sufficient time in order to have a chance here. Experience in grid generation software development is also greatly appreciated. And I'm not even talking about proven competence in C++ (sometimes Fortran), MPI, parallel handling of unstructured grids, etc. For example, would you be able to spot a bug in, say, the least squares gradient computation, a wall function implementation, a Roe solver or a GMRES implementation? Because that's what a CFD development job is mostly about. Besides, there are also a lot of aspects related to pure numerical computations, stability and robustness, etc., so that even knowing how to code something written in a textbook, it is just half of the job (Yet, I know people who would just add epsilons to possibly ill-posed operations, so this might be debatable). This for the reality check. You can't expect to land a job in CFD development with basically 0 competence. But, I guess, this is the same for most jobs. However, you should definitely embark in this journey if that's what you want to do. Honestly, I would not focus on frameworks. Python is ok if you already know it, but true CFD codes are in C++ or Fortran. My suggestion is to start with something you are already productive with while you learn, but eventually switch to actual programming languages. Multi-threading is nice, but MPI is what CFD codes mostly run on. Structured grids are mostly relevant in academia (I say this in a positive way, in the sense that research codes focused on physical modeling need better accuracy that is only easily available on structured grids), but unstructured grids are the norm today. Until I finished my Ph.D. I never tought I could actually land any CFD development job nor, for this reason, I invested in it actually. Yet, I've been always obsessed with learning how a general CFD code would work. So, when the chance arrived, my competence was just there without even knowing. There is also not a timeline to give. You learn certain stuff in CFD courses. For example, I had never coded a 2D panel code when I just started with a 3D one, which took me some time. But when I needed a 2D one for comparisons I was able to code it in a day. So, it really depends from where you stand and what you want to achieve. But don't put timelines on stuff you don't know because it's just going to ruin your experience. Maybe you can still keep trying with your job applications in CFD dev, who am I to say otherwise, but if you have clear what these jobs are you may have a bigger chance. |
|
October 15, 2021, 08:22 |
|
#3 | |
New Member
|
Thanks a lot, Paolo, for your most valuable guidance. Your point of requiring a Ph.D. competence is what I am struggling with at the moment. Besides the beauty of CFD code, one other motivation I have for this, revolves around the horrible job market for anything other than tech. Therefore I seriously want to get into tech as soon as possible, not sacrificing my skillset which is a priority. The job market for CFD tech is quite substantial here in India.
Now obviously I need to project my skillset some way or the other without possessing a doctorate. That's where the code from scratch & the ridge cloud presentation comes in. Quote:
https://www.researchgate.net/publica...e_arrangements Next objectives would be to convert into C++, then multi-threading, then using unstructured mesh using snappyHexMesh or Salome. As soon as blender visualisation is ready I'll try to share asap. |
||
October 15, 2021, 08:46 |
|
#4 |
Member
Mianzhi Wang
Join Date: Jan 2015
Location: Columbus, IN
Posts: 34
Rep Power: 11 |
I feel so related! I love CFD so much that I keep it as a hobby to protect it from becoming a daily grind. I believe working on one's own CFD code is just as fun as working on a commercial code, minus the stresses. Here are some of my recommendations:
1. find your favorite algebraic solver packages (ODE solver, non-linear solver, sparse matrix solver, etc.) and do not write your own algebraic solver in production code. 2. keep an eye on both unstructured grid and octree (quadtree for 2D) grid. 3. maintain a github repository to demonstrate your competence. |
|
October 15, 2021, 10:31 |
|
#5 | |
New Member
|
Thanks Mr. Wang for the advice. I believe it was videos of adaptive mesh only, posted by Tobi Holzmann which got me interested into the manipulation of existing code.
Quote:
Initially with FDM I was only writing explicit solvers (implicit only for isolated crank nicolson). After a while I realised it'll be very tough to discretise properly for a universal problem (can only be manipulated for steady, cavity flow kind of examples), without integrating over the volume. Can you provide any working examples of any such algebra solvers. I am a little unsure of where these are used. |
||
October 15, 2021, 11:52 |
|
#6 | |
Member
Mianzhi Wang
Join Date: Jan 2015
Location: Columbus, IN
Posts: 34
Rep Power: 11 |
Quote:
By "algebraic solvers" I mean something like this: https://computing.llnl.gov/projects/sundials and this: https://people.engr.tamu.edu/davis/suitesparse.html and don't forget this: https://netlib.sandia.gov/lapack/ You'll still need to define the problem (a.k.a. discretize) by yourself. But be sure to separate "solving" from the problem definition. In this way you can use a high-performance solver like those above. It requires generations of PhDs to put together robust, high-performance "solvers" like those. You can write your own RK4 or LU decomposition, but don't expect it be remotely close to CVODE and DGESV(). |
||
October 27, 2021, 05:58 |
Overview of v01 steps (SIMPLE Unsteady)
|
#7 | |
New Member
|
Quote:
Anyways, I am extremely close to my first Unsteady SIMPLE solver (2D, Staggered) & had to refer everything to get here (Patankar, Chowdhuy, Fluid Mechanics 101 -YT). Even so, I didn't find a suitable time-stepping & convergence loop combined methodology laid out already. So I guess I did improvise a little bit. Can anyone go through the 2nd & 3rd page of the pdf & provide some validation/feedback on the code I'm going to write. I don't think it should be hard to interpret. Thanks a lot. Link to the 3-page pdf. https://drive.google.com/file/d/1Q5X...ew?usp=sharing |
||
October 27, 2021, 09:55 |
|
#8 | |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,896
Rep Power: 73 |
Quote:
I want to push your attention to an issue I continue to see in the discussions. The convergence means you are able to assess that the residuals are below a certain threshold. Do not use the differences between the variables. |
||
October 27, 2021, 10:22 |
|
#9 | |
New Member
|
Quote:
I'll get that fixed right away. One thing I am concerned about : Does the choice of ux uy values to calculate momentum eqn coefficients, pressure correction coefficients and time stepping coeff look good? |
||
November 1, 2021, 06:18 |
|
#10 |
New Member
|
I am in need of help on this. I am seriously stuck on ill-conditioned matrix (cond = 1e16 and above) & can't seem to find a solution to this problem. Can anybody point me in the correct direction.
This solution of linear system of equations is being done for the pressure corrector term in SIMPLE which further corrects pressure & Velocity. I've attached the images of the A matrix, cond number range of matrix, & the warning message I receive in the console during run. |
|
November 1, 2021, 07:03 |
|
#11 | |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,896
Rep Power: 73 |
Quote:
Why don't you open your post for this question? It seems you are simply discovering that in the incompressible flow model, the pressure equation has a singular matrix. |
||
November 1, 2021, 07:53 |
|
#12 | |
Senior Member
Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 1,290
Rep Power: 34 |
Quote:
Further, since it is a pressure matrix you should not have this bad condition number. So either your mesh is not good or your solver is diverging and you end up with this matrix. In summary you should be able to use normal linear solver for it. You do not need special solvers. |
||
November 1, 2021, 08:50 |
|
#13 | |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,896
Rep Power: 73 |
Quote:
It depends if this is the matrix after the Neumann BCs have been inserted or not. The matrix must be singular after that. |
||
Tags |
code from scratch, fvm, job hunting advice, simple, structured grid |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
public CFD Code development | Heinz Wilkening | Main CFD Forum | 38 | March 5, 1999 12:44 |
What kind of Cmmercial CFD code you feel well? | Lans | Main CFD Forum | 13 | October 27, 1998 11:20 |
CFD Symposium (Call for Papers) | Chris R. Kleijn | Main CFD Forum | 0 | October 5, 1998 11:25 |
ASME CFD Symposium - Call for Papers | Chris R. Kleijn | Main CFD Forum | 0 | September 8, 1998 09:19 |
ASME CFD Symposium - Call for Papers | Chris R. Kleijn | Main CFD Forum | 0 | September 3, 1998 09:45 |