CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > ANSYS Meshing & Geometry

[ICEM] Scripting command: List of vertex numbers

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 7, 2015, 12:48
Default Scripting command: List of vertex numbers
  #1
New Member
 
Marios Kapsis
Join Date: Aug 2015
Posts: 4
Rep Power: 9
makmarios is on a distinguished road
Hi,

I have created a script that creates an arbitrary number of roughness elements on a surface. For simplicity, let the surface be flat and the roughness elements rectangular. This procedure in ICEM is quite straightforward once one is accustomed to TCL and has used the record script command, and in addition I have complete control over the naming convention of geometric attributes. And then there comes the blocking issue. For this I create geometrical objects (points, curves and surfaces) around each rough. element using naming consistency so by choosing where to create blocks in just one I choose effectively for every element's vicinity. considering control over the geometry, I find it easier to follow a bottom to top strategy, since I do not have to split blocks and then delete a bunch of them. Unfortunately, ICEM doesn't like that. Not, one, bit. The indexing convention of the vertices is completely messed up, as after some point instead of {i j k} they appear to be like {i j k m:n ...} (i j k m n integers). This does not affect blocking, but it is a great pain when coming to choose edges for node distribution. As I said before, I have a consistent naming for the assisting for blocking geometrical objects, therefore I was aiming to spot the vertices I want by comparing all the vertices' locations with the point's location.

However, I cannot loop through the indices as they are completely inconsistent, and the numbering of the vertices is not continuous either. I would loop through them until I find the two vertices I need for each edge, but the script crashes when a vertex number that does not exist is used. But if I had a list of the vertex numbers, for which I ve been desperately searching , then I could loop through that list and I would be able to enjoy my days in the sun at last!

Thank u for your time.
makmarios is offline   Reply With Quote

Old   November 9, 2015, 09:25
Default
  #2
Senior Member
 
Sebastian Engel
Join Date: Jun 2011
Location: Germany
Posts: 566
Rep Power: 19
bluebase will become famous soon enough
Hi Marios,

unfortunately, i can't recall a function to list all vertices.
Maybe you can work around that problem with "ic_hex_get_block_vertices block_num". It returns all 8 vertex numbers of a block... You only need to know the block number. Where again i don't know a function to get all blocks. "ic_hex_get_vertex_blocks vertex_num" may be a further workaround. This function returns blocks attached to a certain vertex.
When you know the very first index vertex or block, you could loop recursively through all blocks and vertices to create a complete list of your own. This doesn't seem to be very elegant though...

With regards,
Sebastian
bluebase is offline   Reply With Quote

Old   November 9, 2015, 09:40
Default
  #3
New Member
 
Marios Kapsis
Join Date: Aug 2015
Posts: 4
Rep Power: 9
makmarios is on a distinguished road
Thanks a lot for your answer. Yesterday night I found to implement your suggestion as follows:
#constructing vertex list
set listBlocks [ic_hex_list_block_numbers]
foreach iblock $listBlocks {
set listVertices [ic_hex_get_block_vertices $iblock]
foreach ivertex $listVertices {


}
}

As you said, this is not elegant at all, so it would be nice to find a more straightforward way
makmarios is offline   Reply With Quote

Old   November 16, 2015, 13:56
Default
  #4
New Member
 
Marios Kapsis
Join Date: Aug 2015
Posts: 4
Rep Power: 9
makmarios is on a distinguished road
Ok, there is the straightforward way mentioned:

http://www.cfd-online.com/Forums/ans...ts-curves.html

http://www.cfd-online.com/Forums/ans...ng-meshes.html
makmarios is offline   Reply With Quote

Reply

Tags
script, vertex

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
ill defined primitive entry 'boundary' francisco.angel OpenFOAM Pre-Processing 16 September 8, 2022 07:11
[mesh manipulation] Mesh Refinement Luiz Eduardo Bittencourt Sampaio (Sampaio) OpenFOAM Meshing & Mesh Conversion 42 January 8, 2017 13:55
[CAD formats] my stl surface is seen as just a line rcastilla OpenFOAM Meshing & Mesh Conversion 2 January 6, 2010 02:30
NACA0012 geometry/design software needed Franny Main CFD Forum 13 July 7, 2007 16:57
Could anybody help me see this error and give help liugx212 OpenFOAM Running, Solving & CFD 3 January 4, 2006 19:07


All times are GMT -4. The time now is 19:44.