
[Sponsors] 
November 12, 2021, 10:32 
CFG file Set Up

#1  
New Member
Nicola Fontana
Join Date: Nov 2021
Posts: 8
Rep Power: 3 
Good evening,
I am new to CFD, I am working on different simultation for my master thesis, and I found some problem in the convergence of the solution, precisely in the section " CONVERGENCE PARAMETERS ". In the first attempt I encountered a problem with FMGRES convergence, as follow: Quote:
Quote:
Can someone suggest me a guide for understand how to make the choice of method and coefficient? In general, I have the same problem with the section: COMMON PARAMETERS DEFINING THE NUMERICAL METHOD LINEAR SOLVER DEFINITION FLOW NUMERICAL METHOD DEFINITION I would ask if anyone could help me, or suggest me a good way to learn and understand the use of the different method, thank you in adnvance, Nicola 

November 12, 2021, 19:03 

#2 
Senior Member
Pedro Gomes
Join Date: Dec 2017
Posts: 438
Rep Power: 11 
Hi, right, in the context of an academic code, like SU2, these concepts require a lot of experimenting to gain a feel for how to setup the solver, more time than a master thesis allows I would say. But let me try to give you an answer.
Your first mission is getting the solver to converge, i.e. for the residuals to drop 56 orders of magnitude (for external aero starting from freestream), and for relevant coefficients (lift, drag, etc.) to not be fluctuating or still changing significantly. The common parameters (CFL, etc.) and linear solver settings help you achieve this for a given choice of numerical methods (you can find some advice here: https://su2code.github.io/docs_v7/Li...econditioners/) The second objective is to get accurate results, and this is where numerical methods are important. In general, you want a choice of methods (gradient methods, convective schemes, etc.) that has the lowest amount of numerical dissipation while still giving you a physical solution (i.e. without wiggles, spurious oscillations, carbuncle, etc.). Needless to say, it is easier to get convergence with more numerical dissipation. So, if you are approaching this without any experience you'd start with something very dissipative like ROE with MUSCL_FLOW= NO (i.e. 1st order convection) and GREEN_GAUSS gradients, and then try to improve upon it in the direction of MUSCL_FLOW= YES with WEIGHTED_LEAST_SQUARES gradients (2nd order convection with the most accurate gradients). Then there are tuning parameters for the methods (like Roe's entropy fix) and auxiliary methods (in particular limiters) that help you operate close to the potentially more accurate end of the spectrum without instabilities... A good compromise (in my experience with compressible subsonic cases) is to use the VenkatakrishnanWang limiter with a 0.050.15 constant, and Roe entropy correction of 1e3. This is all applicationdependent as you can imagine, if you are interested in lowMach, or supersonic, etc. you may need other schemes that try to cope with the particular challenges of those regimes. P.S. This all assumes you have a good mesh for what you are doing 

November 13, 2021, 04:39 

#3 
Senior Member
bigfoot
Join Date: Dec 2011
Location: Netherlands
Posts: 269
Rep Power: 15 
If you feel that you do not yet have a good understanding of CFD, then study a standard text book on the matter. This will help in understanding what is going on and it also helps in troubleshooting and making decisions regarding the setup.
Some suggestions: Computational Fluid Dynamics  Jiri Blazek Computational Fluid Dynamics, the basics with applications  J.D. Anderson Computational Methods For Fluid Dynamics  Ferziger and Peric There are maybe better books that are closer to what is implemented in su2. 

November 13, 2021, 09:14 

#4 
Senior Member

I like this post and the general idea behind it and more than that I like the answer that Pedro gave. It is one of the best answer have heard in this community to the convergence issue. I would suggest to pin his answer or something similar for the newcomers. I have seen and heard quite a few students and users struggling with convergence of their simulation and in general setting up their case. And I don’t wanna hijack this thread/post but since it is a good one, I also want to give it a try in a very general way.
Regardless of solver ( e.g open/commercial) and it’s complexity one can have a CFD workflow through a series of questions whose answer will help successfully complete a simulation. This is how I would start: General: 1. Why do I need to do a CFD simulation? (or why am I interested in doing a CFD simulation and not other numerical approaches?) 2. What am I looking for in the CFD simulation? (i.e. what is my quantity of interest? Like aerodynamic coefficients, pressure and etc.) 3. How accurate do I need my quantity of interest to be in the CFD simulation? 4. How can I measure/validate my quantity of interest’s accuracy in the CFD simulation? Physics related: 5. How well do I know the physical condition or the flow regime? 6. How well do I know my quantity of interest in this physical condition? (Better one knows the physics, better it can be predicted. Even for simple lift and drag coefficients this could be complicated. For example, is lift inviscid!? What happens if I run inviscid and compare the lift and cp with experiments? Do they match? What kinda drag exists and are important in this physics? Like parasite, form, profile, interference, skin friction, wave, lift induced. ...) 7. Do I need to postprocess the CFD results to get my quantity of interest? Mesh/geometry related: 8. Do I have a geometry requirement? (What are the geometry requirement with respect to my quantity of interest for the CFD simulation?) 9. Do I have a mesh requirement? (What are the mesh requirement with respect to my quantity of interest and its desirable accuracy for the CFD simulation?) 10. Can I simplify the simulation? (i.e. 2D assumption (no variation in third direction) or symmetric or axisymmetric properties of geometry and flow.) 11. How much CPU per time do I wanna spend on predicting my quantity of interest? Initial and boundary conditions: 12. What is the flow condition in my simulation? 13. For this flow condition what is my initial condition? 14. How do I initialize my initial condition? 15. What are the right boundary conditions for this physics and with respect to my flow condition, initial condition and my geometry? Are my boundary conditions valid? How can I validate them? Like velocity inlet, pressure farfield and etc. 16. What are my reference values and what is my nondimensionalization approach? Numerics: 17. What solver do I need for my quantity of interest? (i.e. Euler, (U)RANS, …) 18. Do I have to couple solvers for my multidisciplinary simulation? 19. What linear solver? And what options for that linear solver? 20. Do I need convergence acceleration techniques? Like multigrid, warmup solutions, … 21. What convective numerical method? And what options do I need for that convective method to predict the quantity of interest with desirable accuracy. 22. Do I have to use an option if I don’t know what it does or I am not sure if my simulation benefits from that? (like 10 levels of multigrid?) 23. How much do I need to be specific and get into details of my numerical approach to predict my quantity of interest correctly? Convergence: 24. How will I know my simulation is converged? 25. What is the right convergence criteria for my simulation? 26. How can I apply the convergence criteria for my simulation? Simulation: 27. Who is convergence? What is he/she trying to tell me? 28. Did my simulation converge? 29. If my simulation didn’t converge, did it diverge? What is partial convergence? 30. If my simulation converged, does that mean my results are right? 31. If it doesn’t converge or my results are not right, is it related to physics, numerics, or geometry/mesh? Or is it just because of wrong initial condition or numerical assumption? 32. If my results are right, does that mean my simulation is converged? 33. Now that my simulation is converged and my results are right, how can I postprocess the quantity of interest properly? 34. Can I improve the results by improving numerics or mesh? While one is cooking a CFD simulation, a little bit of spice might come handy: 35. How can I contribute to the opensource community by providing accurate feedback and properly publishing my work to appreciate and value of the time and efforts of people who have been actually developing the tool? Feel free to add more based on your thoughts and experience. Best, Pay
__________________
since every contribution counts, always good ones are appreciated! 

November 15, 2021, 12:20 

#5  
New Member
Nicola Fontana
Join Date: Nov 2021
Posts: 8
Rep Power: 3 
Dear Pedro,
first of all thank you and the other people for the reply. Your answer was useful to understand how to move the first steps in this fields. I have a question regarding this part: Quote:
Thanks to all for your help, Nicola 

November 16, 2021, 12:48 

#6 
Senior Member
Pedro Gomes
Join Date: Dec 2017
Posts: 438
Rep Power: 11 
Both actually, if you are dealing with a new type of problem for which you cannot find established best practices, you should test different settings (types of convective flux for example) because some may give you more physical answers than others.
In general you want to know how sensitive your results are to your modeling choices (mesh resolution, y+, flux scheme and its constants, limiters, etc.). You want to base whatever numerical analysis you are doing on results that are mostly independent of modeling choices. Of course, when doing any type of parametric study it helps to initialize the solver with previous results. Incidentally, some modeling choices are easier/faster to converge than others (coarser grids, first order), and thus using them to initialize a more difficult simulation can be helpful (even if you already know from bestpractices that those choices might not be accurate enough). What I'm describing here is a subset of verification & validation (in case you want to follow up on it). 

Tags 
cfd, configuration file, convergence criteria, su2 
Thread Tools  Search this Thread 
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Using PengRobinsonGas EoS with sprayFoam  Jabo  OpenFOAM Running, Solving & CFD  35  April 29, 2022 15:35 
[swak4Foam] funkyDoCalc with OF2.3 massflow  NiFl  OpenFOAM Community Contributions  14  November 25, 2020 03:30 
SparceImage v1.7.x Issue on MAC OS X  rcarmi  OpenFOAM Installation  4  August 14, 2014 06:42 
friction forces icoFoam  ofslcm  OpenFOAM  3  April 7, 2012 10:57 
DecomposePar links against liblamso0 with OpenMPI  jens_klostermann  OpenFOAM Bugs  11  June 28, 2007 17:51 