|
[Sponsors] |
[Other] Can't import airfoil meshes successfully |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
March 27, 2015, 19:56 |
Can't import airfoil meshes successfully
|
#1 |
Senior Member
Klaus
Join Date: Mar 2009
Posts: 281
Rep Power: 22 |
Hello,
I created some meshes using construct2D which uses the plot 3d file format. So far, I've only been able to import a single one successfully - a thick one with a very blunt trailing edge). In all other cases: The meshes are 2d meshes e.g. for the NACA0012 and NACA4412 airfoils so nothing special. Issue: 1. The utility plot3dToFoam has streaming problems and doesn't work. The work around was: Convert mesh into GMSH format by opening the mesh in GMSH and click save mesh. Import mesh via gmshToFoam mesh.msh 2. autoPatch -overwrite 60 where 60 is just one angle example creates always more than the expected number of patches at least two additional patches which are strips of faces connecting the trailing edge of the airfoil with the farfield boundary of the domain (it's an O-mesh) - there was never an angle that wouldn't result in at least two additional patches. In the worst case there were about 20. > at this point paraFoam crashes so the mesh cannot be visualized paraFoam created temporary 'kklomeganaca0012.OpenFOAM' --> FOAM FATAL IO ERROR: Cannot find patchField entry for defaultFaces file: /home/klaus/OpenFOAM/klaus-2.3.1/run/kklomeganaca0012/0/p.boundaryField from line 25 to line 40. From function GeometricField<Type, PatchField, GeoMesh>::GeometricBoundaryField::readField(const DimensionedField<Type, GeoMesh>&, const dictionary&) in file /home/openfoam/OpenFOAM/OpenFOAM-2.3.1/src/OpenFOAM/lnInclude/GeometricBoundaryField.C at line 209. FOAM exiting 3. In the one case that worked, I was able to remove the additional patches using: stitchMesh -overwrite auto0 auto5 were autoX are the names of the patches created by autoPatch that need to be removed or rather reintegrated into the mesh. Using stitchMesh on other meshes fails. Mesh parameters are well within quality parameters according to the postpycess utility and checkMesh How can I make these meshes work? Klaus |
|
March 28, 2015, 03:13 |
|
#2 |
Senior Member
|
Hi,
Plot3D format (just p3d file) is not so useful as it just stores coordinates of the points of the mesh. Though both NASA (for example http://turbmodels.larc.nasa.gov/naca0012_grids.html) and Construct2D generate Neutral Map File. As the name suggests this file contains mapping between boundary information and points in p3d file. I do not know why both plot3dToFoam and Gmsh ignore existence of Neutral Map Files. You can try to use my attempt on conversion between Plot3D and Gmsh (https://github.com/mrklein/p3d2gmsh). This script reads p3d + nmf files and generates MSH file with the mesh and boundary description (see test folder with example of airfoil mesh). About your points: 2 - as not all faces were distributed to the patches, converter created defaultFaces patch and your p file lacks description of this patch. |
|
March 28, 2015, 08:26 |
the problem remains
|
#3 |
Senior Member
Klaus
Join Date: Mar 2009
Posts: 281
Rep Power: 22 |
Than you for the feedback as the resulting gmsh mesh cannot be imported into OpenFoam.
I tried to import one of the nasa meshes of the naca0012: Again convert it via GMSH, gmshToFoam, stitchMesh. stitchMesh fails again. boundary file: 6 ( front { type empty; nFaces 229376; startFace 457600; } back { type empty; nFaces 229376; startFace 686976; } auto2 { type patch; nFaces 256; startFace 916352; } airfoil { type wall; nFaces 896; startFace 916608; } farfield { type patch; nFaces 896; startFace 917504; } auto5 { type patch; nFaces 256; startFace 918400; } ) As you can see, there are two patches auto2 and auto5 I'd like to get rid of using stitchMesh Klaus |
|
March 28, 2015, 08:44 |
|
#4 |
Senior Member
|
Maybe I am missing something, I do not share your fascination about the process:
1. Take MSH file without boundary information (as Gmsh ignores NMF file with boundary information and just reads P3D file with nodes of the mesh). 2. Convert it to OpenFOAM. 3. Use autoPatch to create patches. 4. Use stitchMesh to remove unnecessary patches. 5. Run simulation I propose you to take MSH file WITH boundary information (i.e. with physical groups), convert it to OpenFOAM and run simulation. |
|
March 28, 2015, 09:41 |
the issue...
|
#5 |
Senior Member
Klaus
Join Date: Mar 2009
Posts: 281
Rep Power: 22 |
I am by no means fascinated by the process - it's just the only way I could work out to get a mesh into OpenFoam and boundaries defined. Unfortunately it works only once in a while.
It's not possible to define boundaries in construct2d; on the other hand, construct2d is the only free tool that was able to create the mesh quality (y+<1) I require for kklomega. On o-meshes created I ended up with (best case) two useless strips of faces connecting the trailing edge with the farfiel boundary. In one case this could be fixed using stitchMesh. On the NASA mesh of the NACA0012, I end up with one useless strip of faces connecting the trailing edge with the outlet (see attached pictures). "...MSH file WITH boundary information (i.e. with physical groups)" would be great, if I had them. Klaus |
|
March 28, 2015, 13:00 |
|
#6 |
Senior Member
|
Well, maybe again I am missing something, but Construct2D generate both P3D file with mesh points and NMF file with boundary description. NASA also provides files for their NACA 0012 airfoil case (P3D, NMF).
So using P3D file and NMF file you can generate the following MSH file: Code:
$MeshFormat 2.2 0 8 $EndMeshFormat $PhysicalNames 5 3 1 "mesh" 2 2 "b2-VISCOUS" 2 3 "b3-FARFIELD" 2 4 "b4-SYMMETRY-Y" 2 5 "b5-SYMMETRY-Y" $EndPhysicalNames $Nodes 50000 ... Surely if you convert just P3D file (without NMF) there will no boundary information in your mesh. For unknown reason both plot3dToFoam and Gmsh do not process NMF files, so they lose boundary information. Last edited by alexeym; March 31, 2015 at 14:48. Reason: link change |
|
May 26, 2015, 13:30 |
|
#7 |
New Member
Mido
Join Date: Mar 2011
Posts: 25
Rep Power: 15 |
I tried using your code and your sample but it seems that fluent considers the generated msh file as corrupt ???
It specifically says " NULL Domain Pointer" |
|
May 26, 2015, 16:51 |
|
#8 |
Senior Member
|
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
import airfoil from text file for CFX | frossi | CFX | 2 | October 30, 2016 19:00 |
Problem with restart solution in shape_optimization.py | robyTKD | SU2 Shape Design | 21 | May 29, 2013 10:26 |
ICEM CFD Airfoil Tutorial Input | Tom | ANSYS Meshing & Geometry | 1 | September 25, 2009 07:50 |
Modeling Backflow for a 3D Airfoil (Wing of Finite Span) | Josh | CFX | 9 | August 18, 2009 12:31 |
Errors running allwmake in OpenFOAM141dev with WM_COMPILE_OPTION%3ddebug | unoder | OpenFOAM Installation | 11 | January 30, 2008 21:30 |