Importing points / curves from a text file in icemCFD
In case you have a set of coordinates of e.g. an
airfoil, you can import these points or create a
curve through these points easily by creating a
text file in the proper format:
Points
To create a text file that can be used to import
the coordinates of a number of points the
general format is:
PNTS
x1 y1 z1
x2 y2 z2
… etc
Note that icemCFD expects 3D coordinates, so
in addition to adding the keyword “PNTS” at
the start of the list, we also need to add a z-
coordinate (here on each line we add 0)
Curves
To create a text file that can be used to import
the definition of a curve, the general format is:
CRVS
#points
x1 y1 z1
x2 y2 z2
… etc
Here we use the keyword “CRVS” at the start
of the list to indicate that the definition of a
curve is following. Then we give the number of
points that defines the curve (in this example
we have 385 coordinates), followed by the
coordinates in a proper order (start and end
point are at the trailing edge)
Importing the geometry into icemCFD
Once the text files have been prepared (you can use separate files, or you can combine
everything in one file to import points and curves in one go)
From File-> “Import Geometry” -> “Formatted point data”
Points: Select the file that you want to import: here we import “[Link]” which contains the
point definitions
When we press Apply/OK we have imported the points:
Curves: Select the file that you want to import: here we import “geom_crv.dat” which
contains the curve definition
For importing curves it is extremely important to set the Approximation Tolerance to a low
value => otherwise the curve may not go through the actual points, but approximates the
shape such that the region with high curvature is not represented well!
When pressing Apply/OK we see the imported curve