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

Programs / methods to collapse quasi-2D grid to 2D for SU2 7.5.1?

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By bigfootedrockmidget

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 27, 2023, 17:38
Default Programs / methods to collapse quasi-2D grid to 2D for SU2 7.5.1?
  #1
New Member
 
A Roy
Join Date: Sep 2022
Posts: 15
Rep Power: 4
A.Roy is on a distinguished road
Hello SU2 community,


I am running some 2D transition bubble simulations to compare to experiment and I have CGNS meshes generated by pyHyp; but pyHyp is tailored towards ADFlow resulting in quasi-2D (1-cell thick) meshes and ADFlow's released versions don't appear to have a transition model despite some academic work on developing it.

SU2's mesh file section on the user guide mentions:
Quote:
"As a note, for 2D simulations, it is recommended that a truly 2D mesh is used (no z-coordinates) rather than a quasi-2D mesh (one or more cells deep in the third dimension with symmetry boundary conditions)"
Are there any open-source tools that could allow the quasi-2D mesh to be collapsed or flattened to 2D format? I normally use SALOME to extrude unstructured mesh from 2D to quasi-2D when required the other way, but if it may have any way to collapse it, I have not found it yet.

Thank you for the help!
Attached Images
File Type: png Screenshot from 2023-09-27 16-23-41.png (164.0 KB, 17 views)
A.Roy is offline   Reply With Quote

Old   September 29, 2023, 04:01
Default
  #2
Senior Member
 
bigfoot
Join Date: Dec 2011
Location: Netherlands
Posts: 649
Rep Power: 19
bigfootedrockmidget is on a distinguished road
I don't know of open source tools that can do this, but if the geometry is simple, why not reconstruct it in 2D in e.g. gmsh? There are also very nice specialized meshing tools like this one for airfoils: https://github.com/OpenOrion/parafoil
giovanni.medici likes this.
bigfootedrockmidget is offline   Reply With Quote

Old   October 12, 2023, 02:43
Default
  #3
New Member
 
A Roy
Join Date: Sep 2022
Posts: 15
Rep Power: 4
A.Roy is on a distinguished road
I hadn't realized gmsh exports to native SU2 format, will definitely check that out for 2D tri mesh requirements, thank you!

In regards to my original query, I have found an open source but fairly convoluted solution to my original problem for which I'll leave some steps below if anyone stumbles upon this specific problem (structured or unstructured 2.5D mesh to unstructured 2D) and needs some guidance.

I use a combination of openfoam's mesh conversion tools, Paraview, and an open source suite of mesh augmentation tools by ONERA called Cassiopee to get this to work.

1. Output structured grid in plot3d format (pyHyp can write to plot3d using the writePlot3D method).

2. Use openfoam's plot3dToFoam function to convert the structured 2.5D plot3d grid to an unstructured grid.

3. Open the openfoam grid in Paraview and either:
- Use the autoPatch function (splitting at 30 degrees seems to work decent for most of my airfoil operations at least) in openfoam to create surface patches. Then load just a symmetry patch (i.e. a true 2D slice), and use File --> Save Data and save as a CGNS file.
- For more control, use the Slice filter in Paraview to control where to take the slice from (say a 2D section of a wing from a true 3D grid is required or something), then save the slice as a CGNS file making sure the slice is active in the pipeline browser.

4. Import the CGNS slice into Cassiopee's mesh representation, extract the boundary zones, name them, and merge the connectivity to the interior mesh.
*** This part is the least flexible of the steps as my implementation requires a parametric definition to isolate the boundary zones. This is trivial for an o-grid such as my specific case, slightly harder for a c-grid/bounding box, quite a bit harder for multi-element airfoils, and significantly difficult for truly complex 2D geometry ***

5. Export the marker-denoted CGNS file in ADF format, and use for SU2 as required!

I've attached a sample Cassiopee script for step 4...but by any means it is the most involved step, especially for actually complex geometry.
Attached Files
File Type: txt processAirfoil.py.txt (1.9 KB, 5 views)
A.Roy is offline   Reply With Quote

Reply

Tags
mesh, mesh 2d


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
Fixed grid methods for compressible viscous flow liujmljm Main CFD Forum 1 November 7, 2010 18:54
grid generation methods aya CFX 3 October 15, 2008 10:33
comments on FDM, FEM, FVM, SM, SEM, DSEM, BEM kenn Main CFD Forum 2 July 18, 2004 19:28
Unstructured grid finite volume methods Marcus Main CFD Forum 3 December 5, 2000 01:25
Numerical methods for discontinuous grid interfaces? Hansong Hang Main CFD Forum 12 September 16, 1998 23:26


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