CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > SU2

CFG file Set Up

Register Blogs Community New Posts Updated Threads Search

Like Tree11Likes
  • 5 Post By pcg
  • 3 Post By bigfootedrockmidget
  • 3 Post By pdp.aero

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 12, 2021, 11:32
Default CFG file Set Up
  #1
New Member
 
Nicola Fontana
Join Date: Nov 2021
Posts: 8
Rep Power: 5
Nicola_Fontana is on a distinguished road
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:
FGMRES orthogonalization failed, linear solver diverged.
I was able to solve this switching off MULTIGRID option. But even so the program does not converge to a solution:

Quote:
Maximum number of iterations reached (ITER = 10000) before convergence.
I know that each situation has better convergence method that can lead to a faster ( and more precise ) solution. From test-case and other topic here in the forum I was able to find some suggestion and indication for few of all the methods listed in SU2, but for me is still difficul (almost impossible) understand how to choose the method and set the coefficient. I found papers describing the theory behind every method, and while it helped me understand the methods, it didn't help me understand how to choose.

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
Nicola_Fontana is offline   Reply With Quote

Old   November 12, 2021, 20:03
Default
  #2
pcg
Senior Member
 
Pedro Gomes
Join Date: Dec 2017
Posts: 466
Rep Power: 14
pcg is on a distinguished road
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 5-6 orders of magnitude (for external aero starting from free-stream), 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 Venkatakrishnan-Wang limiter with a 0.05-0.15 constant, and Roe entropy correction of 1e-3.

This is all application-dependent as you can imagine, if you are interested in low-Mach, 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
bkay, jdp810, PENGGEGE777 and 2 others like this.
pcg is offline   Reply With Quote

Old   November 13, 2021, 05:39
Default
  #3
Senior Member
 
bigfoot
Join Date: Dec 2011
Location: Netherlands
Posts: 676
Rep Power: 21
bigfootedrockmidget is on a distinguished road
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.
Kuan, jdp810 and Nicola_Fontana like this.
bigfootedrockmidget is offline   Reply With Quote

Old   November 13, 2021, 10:14
Default
  #4
Senior Member
 
Pay D.
Join Date: Aug 2011
Posts: 166
Blog Entries: 1
Rep Power: 15
pdp.aero is on a distinguished road
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 far-field and etc.

16. What are my reference values and what is my non-dimensionalization 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 multi-grid, warm-up 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 post-process 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 open-source 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!
pdp.aero is offline   Reply With Quote

Old   November 15, 2021, 13:20
Default
  #5
New Member
 
Nicola Fontana
Join Date: Nov 2021
Posts: 8
Rep Power: 5
Nicola_Fontana is on a distinguished road
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:
Originally Posted by pcg View Post
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 Venkatakrishnan-Wang limiter with a 0.05-0.15 constant, and Roe entropy correction of 1e-3.
With this you mean that is better to restart the solution from the last point with different settings in the .cfg file, or to complet different simulation for understand which is the best configuration settings?
Thanks to all for your help,

Nicola
Nicola_Fontana is offline   Reply With Quote

Old   November 16, 2021, 13:48
Default
  #6
pcg
Senior Member
 
Pedro Gomes
Join Date: Dec 2017
Posts: 466
Rep Power: 14
pcg is on a distinguished road
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 best-practices 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).
pcg is offline   Reply With Quote

Reply

Tags
cfd, configuration file, convergence criteria, su2


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


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


All times are GMT -4. The time now is 10:02.