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

Error Creating Mesh using Construct2D,help me Please!

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 1, 2019, 04:47
Default Error Creating Mesh using Construct2D,help me Please!
  #1
Member
 
Os
Join Date: Jun 2017
Posts: 66
Rep Power: 4
losiola is on a distinguished road
hello,
good morning



i am trying to make this Mesh for an airfoil in 2D using Construct2D but i keep getting this error when i enter the file that contains the profile coordinates



Code:
Input > naca.dat
At line 142 of file src/util.f90 (unit = 13, file = 'naca.dat')
Fortran runtime error: End of file

Does anyone Have any IDea about what may the problem be?


Thanks in Advance.
losiola is offline   Reply With Quote

Old   October 2, 2019, 03:53
Default
  #2
Senior Member
 
Mikko
Join Date: Jul 2014
Location: The Hague, The Netherlands
Posts: 192
Rep Power: 7
Flowkersma is on a distinguished road
Hi,

Construct2D comes with sample airfoils which have the right format. Compare those files with your .dat file. For more information about Construct2D and OpenFOAM, have a look at this thread

Best, Mikko
Flowkersma is offline   Reply With Quote

Old   October 3, 2019, 16:19
Default
  #3
Member
 
Os
Join Date: Jun 2017
Posts: 66
Rep Power: 4
losiola is on a distinguished road
Quote:
Originally Posted by Flowkersma View Post
Hi,

Construct2D comes with sample airfoils which have the right format. Compare those files with your .dat file. For more information about Construct2D and OpenFOAM, have a look at this thread

Best, Mikko



Hi Mikko ,
thank you for the replay



regarding the documentation i ve alredy seen it and it mentions that construct2D uses the XFOIL labled format which am respecting but yet still get the same error .


with the sample airfoils avalable i ve tried them and it works perfectly but for some reason it doesnt work for mine . I ve also tried to load airfoil data from the naca database and yet i still get the same error which is so disapointing (http://airfoiltools.com/airfoil/deta...l=naca64209-il).


still get this error

Code:
Input > naca.dat
At line 142 of file src/util.f90 (unit = 13, file = 'naca.dat')
Fortran runtime error: End of file



Really hope that someOne Can help me solve this issue



Thank yo for the Effort .
Regards
losiola is offline   Reply With Quote

Old   October 3, 2019, 17:44
Default
  #4
Senior Member
 
Mikko
Join Date: Jul 2014
Location: The Hague, The Netherlands
Posts: 192
Rep Power: 7
Flowkersma is on a distinguished road
Hi,

I just tried to copy paste the NACA 64-209 coordinates to a file (test.dat). Then I run construct2d with command 'construct2d test.dat' and it outputs 'Successfully loaded airfoil file test.dat'. After that I just write the commands 'grid' and 'smth' and construct writes the grid to a file (test.p3d). So it works without any problems. Can you elaborate a bit more what you are doing and share your airfoil data file?

Best, Mikko
Flowkersma is offline   Reply With Quote

Old   October 3, 2019, 18:36
Default
  #5
Member
 
Os
Join Date: Jun 2017
Posts: 66
Rep Power: 4
losiola is on a distinguished road
Quote:
Originally Posted by Flowkersma View Post
Hi,

I just tried to copy paste the NACA 64-209 coordinates to a file (test.dat). Then I run construct2d with command 'construct2d test.dat' and it outputs 'Successfully loaded airfoil file test.dat'. After that I just write the commands 'grid' and 'smth' and construct writes the grid to a file (test.p3d). So it works without any problems. Can you elaborate a bit more what you are doing and share your airfoil data file?

Best, Mikko



That seems strange is it possible that i have some problem ?!!
Here are the coordinated for my airfoil in the file, please note that i had to make it a TXT because the forum refuses .dat format


Thanks
Attached Files
File Type: txt naca.txt (3.7 KB, 4 views)
losiola is offline   Reply With Quote

Old   October 3, 2019, 18:45
Default
  #6
Senior Member
 
Mikko
Join Date: Jul 2014
Location: The Hague, The Netherlands
Posts: 192
Rep Power: 7
Flowkersma is on a distinguished road
You have an additional newline at the end of your file. Remove it and you are good to go.
Flowkersma is offline   Reply With Quote

Old   October 3, 2019, 18:58
Default
  #7
Member
 
Os
Join Date: Jun 2017
Posts: 66
Rep Power: 4
losiola is on a distinguished road
Quote:
Originally Posted by Flowkersma View Post
You have an additional newline at the end of your file. Remove it and you are good to go.



That Actually Worked and i had no idea That a blanc line would do me such problems , Thank you very Much Mikko for your help You saved me , you are my hero .


Many Thanks
losiola is offline   Reply With Quote

Old   October 4, 2019, 15:32
Default
  #8
Member
 
Os
Join Date: Jun 2017
Posts: 66
Rep Power: 4
losiola is on a distinguished road
Quote:
Originally Posted by losiola View Post
That Actually Worked and i had no idea That a blanc line would do me such problems , Thank you very Much Mikko for your help You saved me , you are my hero .


Many Thanks

Hello Again,


i am still facing some issue in importing the Mesh to OpenFoam , and i really hope you can help me throught it .


so i ve created a mesh O-grid mesh with elliptic topology (even though my TE is sharp i went for it because its what i am looking for ) so once i Copy the file to my openFoam case i use this command :


Code:
 plot3dToFoam naca.p3d -2D 1 -singleBlock -noBlank

i get this result with a warning :




Code:
Reading 2D case by extruding points by 1 in z direction.

Create time

Reading 1 blocks
block 0 nx:200 ny:100 nz:2
Reading block points
block 0:
Reading 20000 x coordinates...
Reading 20000 y coordinates...
Extruding 20000 points in z direction...
Looking at cell 0 0 0 to determine orientation.
Left-handed block.

Merged points within 2.220446049e-16 distance. Merged from 40000 down to 39800 points.
Creating cells
Creating boundary patches
--> FOAM Warning : 
    From function Foam::polyMesh::polyMesh(const Foam::IOobject&, const Foam::Xfer<Foam::Field<Foam::Vector<double> > >&, const cellShapeList&, const faceListList&, const wordList&, const wordList&, const Foam::word&, const Foam::word&, const wordList&, bool)
    in file meshes/polyMesh/polyMeshFromShapeMesh.C at line 595
    Found 39800 undefined faces in mesh; adding to default patch.
Writing polyMesh
End



then i use this command to get patches :


Code:
autoPatch 80 -overwrite

i get the faces i need but once i reun checkMesh i get lots of errors about the mesh




Code:
Create time

--> FOAM Warning : 
    From function static Foam::instantList Foam::timeSelector::select0(Foam::Time&, const Foam::argList&)
    in file db/Time/timeSelector.C at line 274
    No time specified or available, selecting 'constant'
Create polyMesh for time = constant

Time = constant

Mesh stats
    points:           39800
    internal points:  0
    faces:            79003
    internal faces:   39203
    cells:            19701
    faces per cell:   6
    boundary patches: 5
    point zones:      0
    face zones:       0
    cell zones:       0

Overall number of cells of each type:
    hexahedra:     19701
    prisms:        0
    wedges:        0
    pyramids:      0
    tet wedges:    0
    tetrahedra:    0
    polyhedra:     0

Checking topology...
    Boundary definition OK.
    Cell to face addressing OK.
    Point usage OK.
    Upper triangular ordering OK.
    Face vertices OK.
    Number of regions: 1 (OK).

Checking patch topology for multiply connected surfaces...
    Patch               Faces    Points   Surface topology                  
    defaultFaces        0        0        ok (empty)                        
    auto0               199      398      ok (non-closed singly connected)  
    auto1               19701    19900    ok (non-closed singly connected)  
    auto2               19701    19900    ok (non-closed singly connected)  
    auto3               199      398      ok (non-closed singly connected)  

Checking geometry...
    Overall domain bounding box (-2.49962617 -2.99990654 0) (3.5 2.99990654 1)
    Mesh has 3 geometric (non-empty/wedge) directions (1 1 1)
    Mesh has 3 solution (non-empty) directions (1 1 1)
    Boundary openness (0 -1.43760457e-17 -1.03426383e-15) OK.
 ***High aspect ratio cells found, Max aspect ratio: 3.914098022e+101, number of cells 19701
  <<Writing 19701 cells with high aspect ratio to set highAspectRatioCells
    Minimum face area = 7.004534805e-07. Maximum face area = 0.1461856339.  Face area magnitudes OK.
 ***Zero or negative cell volume detected.  Minimum negative volume: -0.01361617764, Number of negative volume cells: 19701
  <<Writing 19701 zero volume cells to set zeroVolumeCells
    Mesh non-orthogonality Max: 180 average: 168.9684194
 ***Number of non-orthogonality errors: 39203.
  <<Writing 39203 non-orthogonal faces to set nonOrthoFaces
 ***Error in face pyramids: 118206 faces are incorrectly oriented.
  <<Writing 79003 faces with incorrect orientation to set wrongOrientedFaces
    Max skewness = 1.450482967 OK.
    Coupled point location match (average 0) OK.

Failed 4 mesh checks.

End



Do you have any idea about why i get such bad quality mesh and how can i fix That?


Many Thanks
losiola is offline   Reply With Quote

Old   October 9, 2019, 03:21
Default
  #9
Senior Member
 
Mikko
Join Date: Jul 2014
Location: The Hague, The Netherlands
Posts: 192
Rep Power: 7
Flowkersma is on a distinguished road
Hi,

Have you visualized the mesh and where the bad cells are located? If you want a mesh with o-grid topology, you should not have a sharp trailing edge. Cut part of the trailing edge. You can do this by removing a couple of points from your .dat file (first and last).

In your checkMesh log:
Quote:
Mesh has 3 geometric (non-empty/wedge) directions (1 1 1)
Mesh has 3 solution (non-empty) directions (1 1 1)
You should define your front and back plane as empty so that checkMesh does not take the z-direction into account when calculating the aspect ratio.

Best, Mikko
Flowkersma is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
decomposePar problem: Cell 0contains face labels out of range vaina74 OpenFOAM Pre-Processing 32 February 7, 2018 08:26
[ICEM] surface mesh merging problem everest ANSYS Meshing & Geometry 44 April 14, 2016 06:41
sliding mesh problem in CFX Saima CFX 45 September 22, 2015 10:53
[ICEM] Problem making structural mesh on a surface froztbear ANSYS Meshing & Geometry 1 November 10, 2011 08:52
[snappyHexMesh] snappyHexMesh won't work - zeros everywhere! sc298 OpenFOAM Meshing & Mesh Conversion 2 March 27, 2011 21:11


All times are GMT -4. The time now is 09:52.