CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   SU2 (https://www.cfd-online.com/Forums/su2/)
-   -   Grid Check Script (https://www.cfd-online.com/Forums/su2/151848-grid-check-script.html)

pdp.aero April 18, 2015 12:38

Grid Check Script
 
Hi everybody and developers,

Have you tried to develop a simple python-based grid-check script for the suite? If you have developed or used any particular script would you please point it out for me?

Because this is a open-source solver and the grid might come from many different generators, I think having a simple script to be able to run through the mesh before submitting a job would be very helpful. Most of the time my simulations crash which at first glance I can't guess whether it happened because of the grid or something else. I have to run some experiments to find out.

I would happy to start writing a simple Python grid-check script for the suite, in case there is no such script for doing that though. Therefore, I would happy to hear your suggestions for this purpose.

By the way, I have tried the 3.2.9 version last night and have to say great job fellows, really enjoyed.

Cheers,
Payam

hlk April 22, 2015 14:59

Quote:

Originally Posted by pdp.aero (Post 542441)
Hi everybody and developers,

Have you tried to develop a simple python-based grid-check script for the suite? If you have developed or used any particular script would you please point it out for me?

Because this is a open-source solver and the grid might come from many different generators, I think having a simple script to be able to run through the mesh before submitting a job would be very helpful. Most of the time my simulations crash which at first glance I can't guess whether it happened because of the grid or something else. I have to run some experiments to find out.

I would happy to start writing a simple Python grid-check script for the suite, in case there is no such script for doing that though. Therefore, I would happy to hear your suggestions for this purpose.

By the way, I have tried the 3.2.9 version last night and have to say great job fellows, really enjoyed.

Cheers,
Payam

While what you have described is not there (as far as I know), there are a few existing methods to check grid quality:
1. The code does check for negative volume cells, so there is some automatic grid checking/correction under the hood.
2. Using the WRT_RESIDUALS option will output residual values to the volume solution, which can aide in identifying areas of solution which are diverging.
3. The location of the maximum residual is included periodically in the terminal output, which also helps to identify which area is diverging.
4. When using the limited numerical methods the WRT_LIMITERS option will output where the limiter is active (Limiter = 0.0 means the solution has gone to 1st-order in that region, limiter = 1.0 means the limiter is completely inactive, and the components of the limiter correspond to the conservative variables).
5. The RELAXATION_FACTOR_FLOW value may also help with converging solutions on poor-quality grids.

pdp.aero April 23, 2015 01:54

Quote:

Originally Posted by hlk (Post 543256)
While what you have described is not there (as far as I know), there are a few existing methods to check grid quality:
1. The code does check for negative volume cells, so there is some automatic grid checking/correction under the hood.
2. Using the WRT_RESIDUALS option will output residual values to the volume solution, which can aide in identifying areas of solution which are diverging.
3. The location of the maximum residual is included periodically in the terminal output, which also helps to identify which area is diverging.
4. When using the limited numerical methods the WRT_LIMITERS option will output where the limiter is active (Limiter = 0.0 means the solution has gone to 1st-order in that region, limiter = 1.0 means the limiter is completely inactive, and the components of the limiter correspond to the conservative variables).
5. The RELAXATION_FACTOR_FLOW value may also help with converging solutions on poor-quality grids.

Thank you Heather for your response.

I already have seen points 2 and 3 implemented in the code, smart approaches for tracking residuals and the convergence. As you mentioned, points 4 and 5 relate to convergence problems, and how one might diagnose a divergence in a simulation. I haven't had convergence problem because of the grid quality; though if I had I would do the same thing.

The crashes pointed out in my inquiry happened because of the essential components in the grid file were missing or damaged. The grid check merely check the grid and its health. The grid might generate by a self-developed script or by a third-party software. We don't care were the grid come from or how the grid come from, but we care about the essential elements of the grid, like positive volume cells, or essential information or sections that needs to be included in the grid file. Chiefly, the script is checking the grid to see whether the export where successful or not and whether the grid is ready for running a simulation or not; I was about to write a simple script to check the grid health, and stuff like this.

If the grid check fails, the grid has serious problems which prevent solver from starting the simulation. If it passes, still simulation might diverge or crash which could happen because of the grid quality or some inappropriate in the solver setting. The quality of the grid and tracking the convergence issues are something else. Maybe writing a grid check script for being sure that a grid is ready for starting a simulation is excessive; somehow I might find it useful though. Thank you by the way, in case I write such a script I will upload it in GitHub and pull a request.

Bests,
Payam


All times are GMT -4. The time now is 20:38.