CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

How to import NACA 0012 Profile in Gridgen

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By Far
  • 1 Post By rmatus

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 9, 2011, 06:05
Default How to import NACA 0012 Profile in Gridgen
  #1
New Member
 
Join Date: Feb 2011
Posts: 3
Rep Power: 15
maplepink is on a distinguished road
Hello,

I need some help with the Gridgen software.

I want to import the NACA 0012 airfoil geometry in Gridgen. I have the profile points of NACA 0012 (x and y coordinates), but I am not able to import it in Gridgen. (I know we can import this kind of file in Gambit but I am not able to do it in Gridgen.)

How I do import this profile in Gridgen?

Does anyone have the NACA 0012 profile file which can be imported in Gridgen?

Thank you very much in advance.

Maple
maplepink is offline   Reply With Quote

Old   February 9, 2011, 08:09
Default Use the Gridgen Segment file format
  #2
Senior Member
 
rmatus's Avatar
 
Rick Matus
Join Date: Mar 2009
Location: Fort Worth, Texas, USA
Posts: 116
Rep Power: 17
rmatus is on a distinguished road
Maple:

You can import the airfoil coordinates in Gridgen segment file format. You can import the segment file as either grid or database. Go the Input/Output menu and choose either Database Import or Grid Pts import. If you choose Grid Pts Import, then choose Curves on the next menu. Select your segment file in the file browser and you are all set.

The following piece of pseudo-code describes the format the data found in a segment file should take:
c.....nmax is the number of segments
c.....ni(n) is the number of points on segment n
c.....imax is the number of points
integer nmax
integer ni(nmax)
real x(imax), y(imax), z(imax)
do n = 1, nmax
write(1,*) ni(n)
do i = 1, ni(n)
write(1,*) x(i,n), y(i,n), z(i,n)
end do
end do

Hope this helps,
Rick
rmatus is offline   Reply With Quote

Old   February 14, 2011, 12:12
Default
  #3
Far
Super Moderator
 
Sijal
Join Date: Mar 2009
Location: Islamabad
Posts: 4,553
Blog Entries: 6
Rep Power: 54
Far has a spectacular aura aboutFar has a spectacular aura about
Send a message via Skype™ to Far
there is no need to do this , this is useful for programming but not for this task
Far is offline   Reply With Quote

Old   February 14, 2011, 12:22
Default
  #4
Senior Member
 
Join Date: Nov 2009
Posts: 411
Rep Power: 19
DoHander is on a distinguished road
You can try to use the procedure described at this link:

http://www.pointwise.com/glyph/airfoilGen/

This will do the job for you.
However if you want to be able to import any kind of curve defined by points the Fortran snippet suggested by Rmatus is the way to go, you can easily convert the code to any programming language you are more familiar.

Do
DoHander is offline   Reply With Quote

Old   February 14, 2011, 12:23
Default Not necessary, but illustrative
  #5
Senior Member
 
rmatus's Avatar
 
Rick Matus
Join Date: Mar 2009
Location: Fort Worth, Texas, USA
Posts: 116
Rep Power: 17
rmatus is on a distinguished road
Far:

You are correct about the pseudo-code. It is not necessary to write code to make a segment file. But the pseudo-code listing is a concise way to show the file format.

Hope this helps,
Rick
rmatus is offline   Reply With Quote

Old   February 14, 2011, 12:31
Default
  #6
Far
Super Moderator
 
Sijal
Join Date: Mar 2009
Location: Islamabad
Posts: 4,553
Blog Entries: 6
Rep Power: 54
Far has a spectacular aura aboutFar has a spectacular aura about
Send a message via Skype™ to Far
simple way is to write the coordinates in x, y and z (make it zero for two dimensional cases) and one at the top of files with total no of coordinates. e.g.


3
1.0 0.0 0.0
2.0 2.0 0.0
2.5 2.5 0.0

for 4 coordinates write
4
1.0 0.0 0.0
2.0 2.0 0.0
2.5 2.5 0.0
3.0 3.5 0.0

hope this helps
mm.abdollahzadeh likes this.
Far is offline   Reply With Quote

Old   February 14, 2011, 12:33
Default
  #7
Far
Super Moderator
 
Sijal
Join Date: Mar 2009
Location: Islamabad
Posts: 4,553
Blog Entries: 6
Rep Power: 54
Far has a spectacular aura aboutFar has a spectacular aura about
Send a message via Skype™ to Far
I appreciate rick comments. this code is very much useful for the long data base
Far is offline   Reply With Quote

Old   February 14, 2011, 12:34
Default
  #8
Senior Member
 
Join Date: Nov 2009
Posts: 411
Rep Power: 19
DoHander is on a distinguished road
@Far

You mean to write the file by hand ?

Do
DoHander is offline   Reply With Quote

Old   February 14, 2011, 13:54
Default
  #9
Far
Super Moderator
 
Sijal
Join Date: Mar 2009
Location: Islamabad
Posts: 4,553
Blog Entries: 6
Rep Power: 54
Far has a spectacular aura aboutFar has a spectacular aura about
Send a message via Skype™ to Far
I have made the three dimensional geometries by this trick
Far is offline   Reply With Quote

Old   February 27, 2011, 21:01
Default
  #10
New Member
 
Md. Sayeemuzzaman
Join Date: Apr 2010
Posts: 9
Rep Power: 16
sayeem is on a distinguished road
Quote:
Originally Posted by Far View Post
simple way is to write the coordinates in x, y and z (make it zero for two dimensional cases) and one at the top of files with total no of coordinates. e.g.


3
1.0 0.0 0.0
2.0 2.0 0.0
2.5 2.5 0.0

for 4 coordinates write
4
1.0 0.0 0.0
2.0 2.0 0.0
2.5 2.5 0.0
3.0 3.5 0.0

hope this helps
i need to know the file extension for this type of files.
and can i import this file to the gridgen?
sayeem is offline   Reply With Quote

Old   February 28, 2011, 09:15
Default Default extension for a segment file is .dat
  #11
Senior Member
 
rmatus's Avatar
 
Rick Matus
Join Date: Mar 2009
Location: Fort Worth, Texas, USA
Posts: 116
Rep Power: 17
rmatus is on a distinguished road
The default extension for the segment file is .dat, but you can make it whatever you want and Gridgen and Pointwise will both still read it.

Use File, Import, Grid to import it into Pointwise.

Hope this helps,
Rick
mm.abdollahzadeh likes this.
rmatus is offline   Reply With Quote

Old   May 7, 2013, 11:33
Question
  #12
Member
 
Johannes Ringborn
Join Date: Nov 2012
Posts: 40
Rep Power: 13
j_h_86 is on a distinguished road
Sorry to bring up this thread again.

I always get the error message: "Could not read file" file when selecting
→Input/Output
→Grid
→PTs Import
→Curves
and choosing the attached file.

Any help would be much appreciated
Attached Files
File Type: txt profile.txt (14.3 KB, 95 views)
j_h_86 is offline   Reply With Quote

Old   May 7, 2013, 11:59
Default 601 is a lot of control points for a connector
  #13
Senior Member
 
rmatus's Avatar
 
Rick Matus
Join Date: Mar 2009
Location: Fort Worth, Texas, USA
Posts: 116
Rep Power: 17
rmatus is on a distinguished road
Johannes:

The file imported just fine in Pointwise (see attachment). In Gridgen, I think you may be running into a limit on the number of control points allowed on a connector. You can work around this by first importing it as a database curve (I/O, Database Import, filename, Type Segment), and then using Create Connectors on DB entities to make a connector with that shape.

Hope this helps,
Rick
Attached Images
File Type: jpg Profile.jpg (30.5 KB, 72 views)
rmatus is offline   Reply With Quote

Old   May 7, 2013, 12:26
Default
  #14
Member
 
Johannes Ringborn
Join Date: Nov 2012
Posts: 40
Rep Power: 13
j_h_86 is on a distinguished road
Quote:
Originally Posted by rmatus View Post
Johannes:

The file imported just fine in Pointwise (see attachment). In Gridgen, I think you may be running into a limit on the number of control points allowed on a connector. You can work around this by first importing it as a database curve (I/O, Database Import, filename, Type Segment), and then using Create Connectors on DB entities to make a connector with that shape.

Hope this helps,
Rick
Wow, this was quick - thank you very much Rick!!

Your suggested approach works fine Inserting an Akima spline connector takes pretty long though but at least I do not have to import each point manually

I tried now a simple case (Far's example from above):

3
1.0 0.0 0.0
2.0 2.0 0.0
2.5 2.5 0.0

And this one did neither get imported (via grid points)?! Pretty strange...
j_h_86 is offline   Reply With Quote

Old   May 7, 2013, 12:36
Default
  #15
Senior Member
 
rmatus's Avatar
 
Rick Matus
Join Date: Mar 2009
Location: Fort Worth, Texas, USA
Posts: 116
Rep Power: 17
rmatus is on a distinguished road
Quote:
I tried now a simple case (Far's example from above):

3
1.0 0.0 0.0
2.0 2.0 0.0
2.5 2.5 0.0

And this one did neither get imported (via grid points)?! Pretty strange...
That one worked fine for me in both Gridgen and Pointwise importing as grid points (connector). What kind of error message are you getting?
rmatus is offline   Reply With Quote

Old   May 7, 2013, 12:40
Default
  #16
Member
 
Johannes Ringborn
Join Date: Nov 2012
Posts: 40
Rep Power: 13
j_h_86 is on a distinguished road
Quote:
Originally Posted by rmatus View Post
That one worked fine for me in both Gridgen and Pointwise importing as grid points (connector). What kind of error message are you getting?
ERROR:
Could not read file.

-Hit any key to continue-




...(see attached image).
Attached Images
File Type: jpg s.jpg (23.9 KB, 29 views)
j_h_86 is offline   Reply With Quote

Old   May 7, 2013, 12:43
Default Try this file.
  #17
Senior Member
 
rmatus's Avatar
 
Rick Matus
Join Date: Mar 2009
Location: Fort Worth, Texas, USA
Posts: 116
Rep Power: 17
rmatus is on a distinguished road
Here is the file I was able to import. Give it a try and see if you still get an error.

Thanks,
Rick
Attached Files
File Type: txt profile2.txt (43 Bytes, 76 views)
rmatus is offline   Reply With Quote

Old   May 7, 2013, 13:01
Default
  #18
Member
 
Johannes Ringborn
Join Date: Nov 2012
Posts: 40
Rep Power: 13
j_h_86 is on a distinguished road
Quote:
Originally Posted by rmatus View Post
Here is the file I was able to import. Give it a try and see if you still get an error.

Thanks,
Rick
Rick, thanks to your effort, I found the error.

Actually there is an error in a local manual I used for the import. It is written, that there has to be an empty line at the end of the file. But actually the import does not work with this empty line.

Anyway Rick, thank you very much and your effort helped me a lot! Maybe somebody in the future won't have as much problems as me because of this thread.

Have a nice evening!
j_h_86 is offline   Reply With Quote

Reply


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
Errors running allwmake in OpenFOAM141dev with WM_COMPILE_OPTION%3ddebug unoder OpenFOAM Installation 11 January 30, 2008 20:30
Incomplete NACA 0012 profile Rif Main CFD Forum 1 January 10, 2008 02:45
Problems with flat plate and NACA 0012 Lift/Force Harly FLUENT 0 June 18, 2007 10:02
NACA 0012 simulation results Luis FLUENT 3 February 15, 2006 11:42
bladegen & NACA profile ichgut CFX 1 August 9, 2004 09:31


All times are GMT -4. The time now is 18:50.