CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   ANSYS Meshing & Geometry (https://www.cfd-online.com/Forums/ansys-meshing/)
-   -   [ICEM] Scripting: Naming of block vertices (https://www.cfd-online.com/Forums/ansys-meshing/200973-scripting-naming-block-vertices.html)

ayoung94 April 18, 2018 08:06

Scripting: Naming of block vertices
 
I am having trouble scripting the meshing process for a convoluted duct.

The duct is fully described geometrically and I am using multiple blocks along its length. I wish to split the blocks, to form a sort of C-grid (I am only modelling half the duct, thanks to its symmetry).

However, I cannot seem to find where the numbering of block vertices originates from. It does not seem consistent, either, as when I replay a script I have pre-recorded, ICEM throws the error:

"Error in replay of ic_hex_split_grid 21 384 0.462676 m GEOM INLET OUTLET WALL SYMMETRY SOLID:
no such edge
Error in replay script."

I am splitting the blocks twice along 1 edge. After the 1st split, the 2nd split is acting on a new block with 2(?) new vertices.

So... my question is :
(a) Can I find out the node number before applying the split ?
(b) Can I assign a number to a block vertex ?

Any help on this matter would be highly appreciated. I am completely stuck !

Thanks
Alex

bluebase April 20, 2018 04:33

Hi Alex,

Quote:

(a) Can I find out the node number before applying the split ?
Assume you can't... But you could with some effort. There is a concept which is not obvious in ICEM. The blocking you usually see and use is surrounded by another layer of blocks. These surrounding blocks are hidden in the part VORFN. So when you splitt one block in your main part you also split the surrounding blocks. Therefore much more vertices are created. These are counted continously.

Unfortunately, i don't know the algorithm deciding directions of the new vertex numbering. However, see the workaround below.

Quote:

(b) Can I assign a number to a block vertex ?
Well there are already. But i guess, you mean whether you can assign a name to a new vertex. No you cannot as far as i know.




I propose the following solution to your problem:
use the command ic_hex_vertex_number to get the desired vertex number.

it takes the coordinate (called index in icem) as input and returns the corresponding vertex number. e.g.
Code:

ic_hex_vertex_number { 1 1 2 }
Please mind the spaces between braces and numbers.

The catch here is, that the coordinates are updated each time you split, modify or create a block. So you can use the "predictable" coordinates to return the vertex numbers.

You can activate the indices in the vertex context menu to get an impression.

Best regards,
Sebastian


All times are GMT -4. The time now is 01:28.