|
[Sponsors] |
Inviscid Supersonic Wedge Mesh Adaptation Issue |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
October 9, 2018, 04:47 |
Inviscid Supersonic Wedge Mesh Adaptation Issue
|
#1 |
New Member
Alex
Join Date: Jul 2018
Posts: 8
Rep Power: 8 |
Hi SU2 community,
I am new to CFD and SU2, so any advice or help is greatly appreciated: I am trying to use the SUPERSONIC_SHOCK mesh adaptation to capture the shock for a 2D wedge. However, whenever I run “python mesh_adaptation.py –f config_file” I receive the following error after the initial CFD solution is achieved: Traceback (most recent call last): File "/home/username/Documents/SU2/SU2-6.1.0/SU2_PY/mesh_adaptation.py", line 116, in <module> main() File "/home/username/Documents/SU2/SU2-6.1.0/SU2_PY/mesh_adaptation.py", line 72, in main options.save_all ) File "/home/username/Documents/SU2/SU2-6.1.0/SU2_PY/mesh_adaptation.py", line 100, in mesh_adaptation SU2.io.restart2solution(config) File "/home/username/Documents/SU2/SU2-6.1.0/SU2_PY/SU2/io/tools.py", line 1141, in restart2solution restarts = expand_zones(restart,config) File "/home/username/Documents/SU2/SU2-6.1.0/SU2_PY/SU2/io/tools.py", line 1073, in expand_zones if int(config.NZONES) > 1: File "/home/username/Documents/SU2/SU2-6.1.0/SU2_PY/SU2/io/config.py", line 131, in __getattr__ raise AttributeError('Config parameter not found') I have tried looking at the code, but to no avail yet. The configuration file I used is similar to the inviscid supersonic wedge tutorial's, except the mesh adaptation lines are placed at the very bottom. Is there a missing parameter from my original configuration file? (I understand that the configuration does not give a good solution, I am just trying to figure out how to use the mesh adaptation feature.) Also, if instead, I run “SU2_MSH config_file” using the restart file from the original solution, the mesh is changed, but incorrectly. I tried this with a mesh of quadrilaterals and triangles to see if there was any difference, but both randomly divided the cells when doing the adapting. I attached screenshots of the "adapted" and original grids from both cases to show my problem. Thanks for any help, Alex |
|
October 9, 2018, 22:48 |
Missing Config Variable
|
#2 | |
Member
Peter Brady
Join Date: Apr 2014
Location: Sydney, NSW, Australia
Posts: 54
Rep Power: 12 |
Hi Alex,
In answer to your direct question I think that you are right in that your config file is missing a variable as the stack trace dumps: Quote:
Which is not super helpful - a better error would indicated which config variable you are missing. When I hit this on SU2 its usually something that I've missed. The bugger is finding it. In which case I go back to the template case that I based this on. Double and triple check my cfg files and to avoid my serious PEBKAC errors rerun the example/template to make sure I've not messed up my solver environment. I run multiple versions of SU2, OpenFOAM, CFD-ACE with different compilers, mpi, etc so sometimes the local environments get messed up. Hope that helps, -pete |
||
October 10, 2018, 06:57 |
|
#3 |
Senior Member
Pedro Gomes
Join Date: Dec 2017
Posts: 466
Rep Power: 13 |
Hi Alex,
Thanks for your interest in SU2. Can you try adding: NZONES= 1 to your config file. (I have never used the mesh adaptation functionality, but from a quick look at the files mentioned in the call stack that may be the issue). Cheers, Pedro |
|
October 10, 2018, 23:34 |
|
#4 |
New Member
Alex
Join Date: Jul 2018
Posts: 8
Rep Power: 8 |
Thanks Peter and Pedro,
Adding NZONES= 1 does solve the 'Config parameter not found' error received when running mesh_adaptation.py; however, the resulting adapted grids are still the same incorrect ones as before. I’m not sure if this is related, but whenever I run KIND_ADAPT= GRAD_FLOW to adapt based on the density gradient (as opposed to using SUPERSONIC_SHOCK), I receive the following output from SU2 along with no adaptation (even though my grid is composed of quads or triangles): --------------------- Start numerical grid adaptation ------------------- WARNING: Tried to find 4455 cells suitable for adaptation, but only found 0 The following cell types are currently adaptable: + triangles + quadrilaterals + tetrahedrons Your grid may have too high a percentage of other types. Number of elements to adapt: 0 Thanks again for any additional help, Alex |
|
October 11, 2018, 05:52 |
|
#5 |
Senior Member
Pedro Gomes
Join Date: Dec 2017
Posts: 466
Rep Power: 13 |
Hi Alex,
From the code it looks like that may happen if no cells fit the criteria for adaptation. I recommend that you open an issue: https://github.com/su2code/SU2/issues Hopefully someone who works with mesh adaptation will see it, be sure to attach your files so that whoever picks up the issue can reproduce your results. Thanks, Pedro |
|
November 23, 2018, 21:16 |
|
#6 |
New Member
Alex
Join Date: Jul 2018
Posts: 8
Rep Power: 8 |
For anyone who is running into this problem,
Referencing: https://github.com/su2code/SU2/issues/606 The mesh adaptation code is only compatible with ASCII files in the current release of SU2. Just as clarkpede commented, the adaptation will work for KIND_ADAPT= GRAD_FLOW if you specify the following in the configuration file: % Write binary restart files (YES, NO) WRT_BINARY_RESTART= NO % % Read binary restart files (YES, NO) READ_BINARY_RESTART= NO Best, Alex |
|
June 21, 2019, 13:46 |
Mesh Adaptation error with GRAD_FLOW
|
#7 | |
New Member
Mons
Join Date: May 2019
Posts: 21
Rep Power: 7 |
I used the same GRAD_FLOW with below ASCII file chnages to NO in .cfg file.. Still getting the error as below. Can you please help how you resolved it?
WARNING: Tried to find 14980 cells suitable for adaptation, but only found 0 The following cell types are currently adaptable: + triangles + quadrilaterals + tetrahedrons Your grid may have too high a percentage of other types. Number of elements to adapt: 0 Also, I am trying WAKE earlier but it was not at all working, did you tried WAKE or others type for this mesh adaptation? Quote:
|
||
June 21, 2019, 21:10 |
|
#8 |
New Member
Alex
Join Date: Jul 2018
Posts: 8
Rep Power: 8 |
Hi Monika,
As I stated on the GitHub issue page, I have not used the mesh adaptation tools since December. Also, the only adaptation option I used was GRAD_FLOW. I went back and re-downloaded the example .cfg and grid files I posted on the GitHub: 'Config_file_and_mesh.zip'. These are just the files from the supersonic wedge tutorial with the added configuration parameters for the adaption. After changing KIND_ADAPT to GRAD_FLOW and adding % Write binary restart files (YES, NO) WRT_BINARY_RESTART= NO % % Read binary restart files (YES, NO) READ_BINARY_RESTART= NO as clarkpede stated, it still produced appropriate results. I attached an image of the grid I obtain after a single adaptation cycle along with an image of the original grid. I am using v6.1.0. I reattached the .cfg file with the changes stated above. Maybe this will point something out you may have missed. Hope this helps, Alex |
|
April 21, 2020, 13:31 |
|
#9 |
Member
Giovanni Medici
Join Date: Mar 2014
Posts: 48
Rep Power: 12 |
I'm trying to follow your instruction to adapt a mesh (supersonic inv_wedge), with Su2 7.0.2, unfortunately when I run SU2_MSH, an error follows
Code:
--------------------- Start numerical grid adaptation ------------------- WARNING: Tried to find 6873 cells suitable for adaptation, but only found 0 The following cell types are currently adaptable: + triangles + quadrilaterals + tetrahedrons Your grid may have too high a percentage of other types. Number of elements to adapt: 0 Is there any alternative which is supported in the latest releases? Googling around I found a very interesting post on gitHub https://github.com/su2code/SU2/issues/606. Unfortunately my understanding is that the very promising Inria pyAMG relies on a former version of SU2, and so is branched from current release. Am I wrong? |
|
April 28, 2020, 15:36 |
|
#10 |
Member
Giovanni Medici
Join Date: Mar 2014
Posts: 48
Rep Power: 12 |
I may (partially) answer to at least some of the questions that I wrote on last post.
I've been iterating on a post on the SU2 git, and was pointed by Brian Munguía to a live and updated branch ( feature_adap ) of SU2 7.0.x which incorporates updated pyAMG libraries. I managed to go through the mesh adaption process. A remark which is worth highlighting here, is that the compilation of the branch (in particular of the pyAMG) relies on Python >= 3.7. |
|
Tags |
mesh adaptation, supersonic, wedge |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
sliding mesh problem in CFX | Saima | CFX | 46 | September 11, 2021 08:38 |
[snappyHexMesh] extrudeMesh + snappyHexMesh 2d wedge mesh | Tobi | OpenFOAM Meshing & Mesh Conversion | 42 | January 15, 2019 19:04 |
Inviscid Supersonic Wedge | Treash | SU2 | 0 | June 1, 2017 11:06 |
Wedge water impact DFBI Overset mesh | jcamilleri | STAR-CCM+ | 1 | March 31, 2014 13:58 |
mesh adaptation for hexa mesh | Pete | CFX | 4 | April 6, 2005 19:43 |