CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   ANSYS Meshing & Geometry (http://www.cfd-online.com/Forums/ansys-meshing/)
-   -   [ICEM] how to mesh an edge use a group of points(points coordinate file) (http://www.cfd-online.com/Forums/ansys-meshing/69905-how-mesh-edge-use-group-points-points-coordinate-file.html)

 panda60 November 9, 2009 04:08

how to mesh an edge use a group of points(points coordinate file)

Dear all:
I use ICEM_CFD,
I want to mesh an edge using a group of points which are in this edge. I have these points coordinate ,I want the meshing is the same with the distribution of these points, how can I do this ? Is ICEM can do this ?
Thank you very much.

 panda60 November 9, 2009 21:06

Nobody knows this ? Because I have structure mesh generated by other soft ware using three direction coordinate. I want to compare, so I must use the same mesh. I thought if I can use these coordinae to mesh the edge in ICEM, then it can realize. but it seems to difficult to do this. I can't find this mesh law in ICEM or gambit.
thanks.

 PSYMN November 12, 2009 13:07

Yes.

Yes, ICEM CFD can do this.

You would first need to import the points or create them in ICEM CFD (interactively or with a script to read your coordinates). Then create a curve thru the points.

You can use the mesh tab to assign a mesh distribution along the curve and then mesh it.

This will give you line elements along the curve... is that all you want?

Simon

 rwryne November 12, 2009 14:21

Quote:
 Originally Posted by PSYMN (Post 236028) Yes, ICEM CFD can do this. You would first need to import the points or create them in ICEM CFD (interactively or with a script to read your coordinates). Then create a curve thru the points. You can use the mesh tab to assign a mesh distribution along the curve and then mesh it. This will give you line elements along the curve... is that all you want? Simon
Is there a tutorial or guide for doing this type of scripting?

thanks,

Ryne

 PSYMN November 12, 2009 17:53

Scripting Basics...

Yes there is, sort of. But I don't think I can hand it out on CFD-Online.

To see the commands, just try it manually and record it with a replay script.

I created a few points, then drew a line thru them to get this.

1. ic_point {} GEOM pnt.00 0,0,0
2. ic_point {} GEOM pnt.01 100,0,0
3. ic_point {} GEOM pnt.02 10,10,0
4. ic_point {} GEOM pnt.04 20,8,0
5. ic_point {} GEOM pnt.05 40,5,0
8. ic_curve point GEOM crv.00 {pnt.00 pnt.02 pnt.05 pnt.01}

Then I would take that replay snipit and find out more about these commands (ic_curve for instance) and their usage in the programmers guide built into the software.

Then I would create a script that reads thru a list of points from a file or might use an array to create the points from an external executable, etc.

Contact Matt Middleton in Tech support for some good help.

He can help you get to something like this... (\$ indicates a variable being used)

proc ic_geo_create_naca4_curves {prt cam campos thick points zoom x y} {
global env
set data [exec \$env(ICEM_ACN)/bin/naca4 -camber \$cam -maxcamberpos \
\$campos -thickness \$thick -numpoints \$points -scale \$zoom \
-xoffset \$x -yoffset \$y]
set data [split \$data \n]
set i 0
for {set crv 1} {\$crv < 3} {incrcrv} {
set pnts {}
while 1 {
set xy [lindex \$data \$i]
incri
if {\$xy == ""} break
lappendpnts "\$xy 0"
}
set name [ic_geo_new_name curve crv.0]
ic_curve point \$prt \$name \$pnts
}
}

 PSYMN November 12, 2009 18:00

Original question...

Oops, back to the original question...

If you then wanted to script the setting of mesh sizes on the curve and then creating the line elements...

Just do it interactivly and then look at the replay script.

11. ic_set_meshing_params curve crv.00 emax 8 emin 0 ehgt 0 edev 0 hrat 0 ewid 0 nlay 0
14. ic_quad2 what curves_only entities crv.00
15. ic_uns_update_family_type visible {GEOM ORFN} {!NODE LINE_2} update 0

The first line (11) shows setting the meshing params for the curve to max size 8. Nothing else set, but you can see deviation, min size, etc. are all set to "0" (which means nothing set).

Then Line 14 is actually meshing that curve (crv.00). You could just as easily mesh surfaces or volumes.

The last line (15) isn't needed for a batch script, but it displays the new mesh, at least the line elements that were created.

 All times are GMT -4. The time now is 05:10.