Hello everyone, as a newcomer to pyFR, I have some questions regarding the configuration of the solver.
My main concern is how to set the solver’s order based on the grid order in the msh file.
Due to my lack of knowledge, it is difficult for me to accurately understand the meaning of “order of polynomial solution basis.”
Taking the “inc-cylinder” demo as an example, pyFR provides a 2nd-order high-order grid msh file, and the solver in the ini file is set to “ac-navier-stokes” with an order of 3.
Now, if I have both a linear grid file and a 3rd-order high-order grid file for the “inc-cylinder” demo, with all other grid settings identical except for the grid order, how should I modify the ini configuration file? Specifically, how should I set the order for the solver?
Expanding on this demo as a learning case, I want to test and compare the computation results of pyFR on a 3D grid with linear, 2nd-order, and 3rd-order grids. Assuming all grid settings are identical except for the grid order, have any suggestions for the ini configuration? From my limited understanding, it seems that for this type of test, I only need to change the solver’s order setting and don’t need to modify other ini configurations. Is my understanding correct?
The order set in the .ini file is the order of the solution basis. This is independent of (can be set independent of) the order of the grid curvature. Although typically the order of the solution basis is >= the order of the grid curvature.
If you increase the order of the solution basis on a given mesh you will likely have to reduce your (explicit) time step.
PyFR does not give direct control of the grid order to the user, this is done in the mesh generation software. One reason for this is changing the order of a mesh is a non-trivial task and somewhat out of the scope of what PyFR does. For example, if you were to change the order of the grid from first to second order, an element might now intersect with itself. Furthermore, with nothing but a mesh file, there is no way to know what the geometry of the problem is and consequently what the surface is meant to be.
So, with that being said in the PyFR ini file all you are really able to change in this area is the solver order, the solution point/flux points, as well as adding anti-aliasing through over-integration.
Thank you very much for your response!
I seem to understand, but not entirely.
I am aware that generating high-order grids is beyond the scope of pyFR, and I will use other specialized grid generation software to create high-order grids.
Using the inc-cylinder example again, I have already run the demo with a second-order grid, and the computation results were good.
Now, if I generate a third-order grid for the inc-cylinder case using other specialized grid generation software and want to perform computations with pyFR for comparison with the second-order grid, what changes do I need to make in the ini file? Do you have any suggestions?
Specifically, should I keep the solver’s order as 3, or should I change it to 4?
Do I need to modify the solution points/flux points?
Should I add anti-aliasing through over-integration?
Or are there any other changes I should be aware of?
If you generate a mesh with a third-order grid and want to run it, provided the boundaries have the same names, all you have to do is import the mesh and run it.
There is no need to up the order of PyFR when you increase the grid order. Internally PyFR uses a number of procedures to ensure that flow conservation is maintained regardless of grid order. There is the possibility for a small amount of aliasing to enter the solution in the negdivconf kernel. However this is not very big and doesn’t normally cause a problem.
Alright, I understand.
I’ve come to understand that “Typically the order of the solution basis is >= the order of the grid curvature” AND “PyFR uses a number of procedures to ensure that flow conservation is maintained regardless of grid order.”
However, for newcomers, it can still be confusing. While it may not lead to computational errors, it is necessary to find the optimal setting in terms of accuracy and time cost when dealing with different order settings for the solver.
Specifically, my question is, when computing and comparing grids that are identical except for the grid order:
Should the solver’s order be set to 2 for a first-order grid, 3 for a second-order grid, and 4 for a third-order grid?
Should the solver’s order be set to the same value, such as 3 or 4, for all first-order, second-order, and third-order grids?
Or are there other better setting methods?
Which of the above choices is the most appropriate? I appreciate your guidance.
There is no connection whatsoever between the order of curvature used for a grid and the solver order. None. Typically, you will be fine with a quadratically curved grid up to solver order 6 at least.
What is much more important is the number of elements in the grid. Higher solver orders mean you can use coarser grids and still get the same level of accuracy. This is what you should be considering rather than the degree of curvature of cells.