
[Sponsors] 
[ICEM] [problem] ICEM Scripting Loop to create points and Curves 

LinkBack  Thread Tools  Display Modes 
March 25, 2013, 07:02 
[problem] ICEM Scripting Loop to create points and Curves

#1 
New Member
Join Date: Mar 2013
Posts: 2
Rep Power: 0 
Hi,
I have a problem while creating points and curves within these points. So far my script looks like that: 1 ic_undo_group_begin 2 ic_geo_new_family GEOM 3 ic_boco_set_part_color GEOM 4 ic_empty_tetin 5 for {set i 0} {$i<4} {set i [expr $i+1]} { 6 set x1_value [expr $i*2*0.04] 7 set x2_value [expr ($i*2+1)*0.04] 8 set point1_nr [expr $i*2] 9 set point2_nr [expr ($i*2)+1] 10 ic_point {} GEOM pkt$point1_nr $x1_value,0,0 11 ic_point {} GEOM pkt$point2_nr $x2_value,0,0 12 ic_delete_geometry curve names crv.$i 0 13 ic_curve point GEOM crv.$i {pkt$point1_nr pkt$point2_nr} 14 } Now to my problem: The script does not create the curve between the points (line 13). I have tried it without the variables for one curve. That worked perfectly. The source code looked like that: ic_curve point GEOM crv.01 {pkt1 pk2}. That is why i assume that the create curve command cannot handle the variables inside. Do you have any experience with that or do you know a workaround? Thank you in advance for your help. 

September 8, 2015, 03:06 

#2 
New Member
Join Date: Jul 2015
Posts: 4
Rep Power: 2 
Hi !
Okay so this answer may come a little over 2.5 years too late, but as your question still came on top of my google results: I found that for scripting in ICEM, the quotes {$MYVAR} do not allow for variable substitution. You should use "$MYVAR" instead, i.e.: ic_curve point GEOM crv.01 "pkt1 pk2" Thanks for the 'for loop' though, that was what I was looking for in the first place 

September 29, 2015, 09:27 

#3  
New Member
Joakim
Join Date: Jul 2015
Posts: 10
Rep Power: 2 
Quote:
Hi, Have some problem with scripting in ICEM aswell. I want to control the vertex numbers and change them, or find the vertex number in a specific coordinate. I have a vertex in point e.g (1,2,3) and want to extract the node number in this point. Do you know any code for that? There is a function called : ic_hex_select_nodes When using: [CODE] ic_hex_select_nodes 1 all m FLUID node_numbers [\CODE] All the node number associated to the FLUID part is returned, which is quite good. By changing "all" to inpoly and give the coordinates of a point it should be easy to select a node in a gives coordinate. I've tried: [CODE] ic_hex_select_nodes 1 inpoly {369.13875 211.52306 1.1669954e10} m FLUID node_numbers [\CODE] And there is node in this coordinate so it should work but the error message "Error: Error reading polygon coords" is given. Do you have any idea how to solve this or how to use ic_hex_select_nodes with inpoly command instead of all. Thank's for your help 

September 30, 2015, 03:05 

#4 
Senior Member
Join Date: Feb 2011
Posts: 282
Rep Power: 9 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Create geometry from mesh points in ICEMCFD  David Arthur  Main CFD Forum  3  October 25, 2014 12:19 
[ICEM] smooth curves from points  mrenergy  ANSYS Meshing & Geometry  3  March 9, 2013 18:46 
[ICEM] Defining points and curves using MATLAB  jeff.freeman  ANSYS Meshing & Geometry  0  March 3, 2012 18:16 
[ICEM] How to get points, curves, surfaces from unstructured mesh?  TKE  ANSYS Meshing & Geometry  0  October 21, 2011 10:01 
Include list of points  Hikachu  OpenFOAM Native Meshers: blockMesh  0  June 20, 2011 09:03 