Wednesday, May 21, 2008

Importing Vertex Data in Gambit

While still an undergraduate, one my CFD class projects was to analyze the flow over an airfoil. My first order of business was to figure out where I could obtain the airfoil profile (i.e. the coordinates of the vertices that define the airfoil profile). I eventually found the very useful NACA airfoil generator. It is a Java applet that runs in your (firefox) browser. It can be found here (4 digit series) or here (5 digit series).

Next, I had to figure out a way of input all the vertex data in Gambit. Obviously, it is very bad practice to input the data points one at a time. Being new to Gambit and CFD in general, my options were limited. Eventually, inputing the vertex data into Gambit turned out to be as easy as boiling eggs.
  1. Get the vertex data ready in a text file
  2. In Gambit, File->Import->Vertex Data
Voila!

Note that if the data is two dimensional, the text file will have only two columns. Gambit, however, assumes this is 3D data and will mess things up. What you have to do in this case is add a third column to the data file and fill it with "0.0". You can do that manually, or write a code to do that for you. I've written a tiny application in C# that will append a value that you specify at the end of every line of a text file. You can download it from here.


Cite as:
Saad, T. "Importing Vertex Data in Gambit". Weblog entry from Please Make A Note. http://pleasemakeanote.blogspot.com/2008/05/importing-vertex-data-in-gambit.html

9 comments:

  1. Thank you very much for your valuable information

    ReplyDelete
  2. i went through the page
    http://www.pagendarm.de/trapp/programming/java/profilesa/NACA5.html
    but That page is not open due to internal server error....
    can u suggest any other site to get .txt file of naca23012

    ReplyDelete
  3. Hi Narendra,

    Thanks for visiting my blog. I just updated the links. Here's the new one for NACA 5 digit series:
    http://www.ppart.de/aerodynamics/profiles/NACA5.html

    ReplyDelete
  4. The text file link is broken, is it possible to find the text file anywhere else??

    ReplyDelete
  5. you can go to this link also for various airfoil cordinates.
    http://www.ae.illinois.edu/m-selig/ads/coord_database.html

    ReplyDelete
  6. I am trying to access your C program through the link provided but it opens up a page with a message "Page can not be found"

    ReplyDelete
  7. thanks for the information, I was looking for something like this, is a little bit complicated want to become a freelancer and have no one with the educative formation that help me.

    ReplyDelete