CFD Online Discussion Forums

CFD Online Discussion Forums (
-   ANSYS Meshing & Geometry (
-   -   [ICEM] let ICEM compute the number of nodes on an edge (

motorbean November 15, 2012 13:57

let ICEM compute the number of nodes on an edge
Hello, everyone!

I'm using ICEM for some time. But I have a problem:
In Hexa meshing, is it possible to specify the bunching law (spacing 1, ratio1, spacing 2, ratio 2) and let ICEM to compute the number of nodes required on an edge?

I'm using scripting to automatically generate hexa mesh for different geometry, and the edge length will change according to different geometry. Therefore, if I specify the constant number of nodes in the script file, it will produce very dense mesh for the short edges and sparse mesh for the long ones. This should be avoided in my case.

Can anyone give some help for me? Any solutions, whether direct or indirect, as long as they shed some light on this problem, will be highly appreciated :)

Thank you very much!

Regards to all

PSYMN November 15, 2012 18:33

I usually deal with this problem by setting a size on the surface and then initialize the blocking sizes from that... if the edge length is greater, it will be over more surface and a larger number of nodes will be assigned automatically... Then I adjust the initial spacing, etc. in my script.

Anyway, assuming that is not enough, I asked around and found some workarounds... Basically, there is no way to float the number of nodes, but you can script to get the length of the edge and then use a calculation to work out how many nodes you need...

Here are some snipits of the suggestions I got...


Try the following ic_hex function:

set param [ic_hex_get_edge_param node1 node2 param]


set edge_len [ic_hex_get_edge_param 14 17 len]

which returns the length of edge 14 17.

For more detials, look into file lib/med_batch/hex_funcs.tcl). But maybe it helps to set the number of nodes depending on the edge length.

The options for this command:

nodes (number of nodes)
len (edge length)
law (mesh law)
max (max space)
sp1a or sp2a (actual spacing 1 or 2)
sp2r or sp2r (requested spacing 1 or 2)
r1a or r2a (actual ratio 1 or 2)
r1r or r2r (requested ratio 1 or 2)

PSYMN November 15, 2012 18:34

Or you could use these older commands...

set mparams [ic_hex_mesh_params 14 17]
set edge_len [lindex $mparams 5]

PSYMN November 15, 2012 18:36

One of the Tech support guys (Matt M.) agreed with my initial suggestion. He also suggested this more advanced way of doing things...


With the ic_hex_mesh_params, it should return requested as well as actual values, so he could have a loop that keeps upping the number of nodes and then checking the spacings and ratios actual values against requested values, and the loop would stop when they match. I don't know if setting the number of nodes as a scale factor of the edge length would get the exact number, but using this looping after the fact could pinpoint it, and using the scale factor at the beginning would reduce the number of loops needed.
Hopefully one of these approaches will get you going.

motorbean November 16, 2012 07:42

Thank you so much for such an detail answer. The solutions are very inspiring. I will give a try.


All times are GMT -4. The time now is 03:51.