CFD Online URL
[Sponsors]
Home > Forums > ANSYS Meshing & Geometry

[ICEM] prametric geometry script

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

Like Tree1Likes
  • 1 Post By brunoc

Reply
 
LinkBack Thread Tools Display Modes
Old   November 19, 2011, 20:31
Default prametric geometry script
  #1
New Member
 
Join Date: Nov 2009
Posts: 17
Rep Power: 9
skrzatchlewny is on a distinguished road
Hi,
I would like to have a simple parametric geometry (translated circle). To do that I generated following Tcl script:

1: ic_vdefine r variable 2
2: ic_point {} GEOM pnt.00 0,0,0
3: ic_point {} GEOM pnt.01 1,0,0
4: ic_point {} GEOM pnt.02 1,1,0
5: ic_curve arc_ctr_rad GEOM crv.01 {pnt.01 pnt.02 pnt.00 r 0 360}
6: ic_move_geometry curve names crv.01 translate {0 r 0}

the problem is with line 6, the circle stays at initial position and no error is displayed. Does anybody know the reason/solution?
skrzatchlewny is offline   Reply With Quote

Old   November 22, 2011, 13:35
Default
  #2
Senior Member
 
Bruno
Join Date: Mar 2009
Location: Brazil
Posts: 224
Rep Power: 10
brunoc is on a distinguished road
Hi,

That's because {..} does not allow substitution inside the brackets. Use ".." instead and it should work:

1: set r 2
2: ic_point {} GEOM pnt.00 0,0,0
3: ic_point {} GEOM pnt.01 1,0,0
4: ic_point {} GEOM pnt.02 1,1,0
5: ic_curve arc_ctr_rad GEOM crv.01 "pnt.01 pnt.02 pnt.00 $r 0 360"
6: ic_move_geometry curve names crv.01 translate "0 $r 0"

Cheers
hadikhayyamian likes this.
brunoc is offline   Reply With Quote

Old   November 22, 2011, 16:33
Default
  #3
New Member
 
Join Date: Nov 2009
Posts: 17
Rep Power: 9
skrzatchlewny is on a distinguished road
That solved the problem. Thank you!
skrzatchlewny is offline   Reply With Quote

Old   March 28, 2012, 04:40
Default
  #4
New Member
 
Felipe Mendes
Join Date: Mar 2012
Location: Lausanne
Posts: 9
Rep Power: 4
Felipe Mendes is on a distinguished road
Hey guys,
I'm also doing a parametric script using Tcl.
Nevertheless, neither the while nor the for looping work:

while {$i < 10} {
puts "I dans le boucle: $i"
incr i
}


for {set i 0} {$i<5} {incr i} {
puts "I dans le boucle: $i"
}

Do you know how to make it work?
Does anybody knows how to select some point or line in ICEM parametric language by specifying a location (like in ansys workbench)?
Thanks a lot!
Felipe Mendes is offline   Reply With Quote

Old   March 28, 2012, 16:35
Default
  #5
New Member
 
Join Date: Nov 2009
Posts: 17
Rep Power: 9
skrzatchlewny is on a distinguished road
try that code:
set i 0;
while {$i < 10} {\
ic_mess "I dans le boucle: $i";\
incr i;}
skrzatchlewny is offline   Reply With Quote

Old   March 29, 2012, 04:11
Default
  #6
New Member
 
Felipe Mendes
Join Date: Mar 2012
Location: Lausanne
Posts: 9
Rep Power: 4
Felipe Mendes is on a distinguished road
Thanks!
It worked pretty well!
Felipe Mendes is offline   Reply With Quote

Old   May 14, 2012, 14:55
Default
  #7
Member
 
Khayyamian
Join Date: Dec 2010
Posts: 46
Rep Power: 6
hadikhayyamian is on a distinguished road
Hi Brunoc;

Thanks for your great help. I wonder if there is any book, ..... as a source for tcl/tk and its use in ICEM.

Regards.
hadikhayyamian is offline   Reply With Quote

Reply

Tags
icem, parametric geometry, scripting, tcl

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem Importing Geometry ProE to CFX fatb0y CFX 3 January 14, 2012 20:42
[ICEM] Problem in geometry creation by script lavoz ANSYS Meshing & Geometry 4 March 12, 2010 11:56
Simulation of Flow through Complex 3D Geometry EmersonKB CFX 5 July 2, 2009 09:17
creating geometry using "Script files" in ICEMCFD jaber Main CFD Forum 1 November 11, 2007 10:28
vitual _ real deneb FLUENT 3 January 22, 2007 05:31


All times are GMT -4. The time now is 14:49.