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

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

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 25, 2013, 06:02
Default [problem] ICEM Scripting Loop to create points and Curves
  #1
New Member
 
Join Date: Mar 2013
Posts: 2
Rep Power: 0
bwiblue is on a distinguished road
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.
bwiblue is offline   Reply With Quote

Old   September 8, 2015, 03:06
Default
  #2
New Member
 
Join Date: Jul 2015
Posts: 5
Rep Power: 10
FlorisvdBeek is on a distinguished road
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
FlorisvdBeek is offline   Reply With Quote

Old   September 29, 2015, 09:27
Default
  #3
New Member
 
Joakim
Join Date: Jul 2015
Posts: 14
Rep Power: 10
joxen is on a distinguished road
Quote:
Originally Posted by FlorisvdBeek View Post
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

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.1669954e-10} 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
joxen is offline   Reply With Quote

Old   September 30, 2015, 03:05
Default
  #4
Senior Member
 
Join Date: Feb 2011
Posts: 496
Rep Power: 18
Antanas is on a distinguished road
Quote:
Originally Posted by joxen View Post
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
Try this

Code:
ic_hex_select_nodes 1 inpoly 1 369.13875 211.52306 -1.1669954e-10 m FLUID node_numbers
Antanas is offline   Reply With Quote

Reply

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
Create geometry from mesh points in ICEM-CFD David Arthur Main CFD Forum 3 October 25, 2014 12:19
[ICEM] smooth curves from points mrenergy ANSYS Meshing & Geometry 3 March 9, 2013 17:46
[ICEM] Defining points and curves using MATLAB jeff.freeman ANSYS Meshing & Geometry 0 March 3, 2012 17:16
[ICEM] How to get points, curves, surfaces from unstructured mesh? TKE ANSYS Meshing & Geometry 0 October 21, 2011 10:01
[blockMesh] Include list of points Hikachu OpenFOAM Meshing & Mesh Conversion 0 June 20, 2011 09:03


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