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

[ICEM] TCL scripting error (parameter use in functions)

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 25, 2011, 05:46
Default [ICEM] TCL scripting error (parameter use in functions)
  #1
New Member
 
Join Date: Apr 2011
Posts: 3
Rep Power: 15
firesoul is on a distinguished road
Hi,

I'm having a problem using parameters in Icem's geometry functions. I'm trying to create points on a curve having a distance of 0.05 of the curves length.

No problem by using the command with an actual number:
Code:
# Create Point+Curve
ic_point {} SPLINE pnt.01 0,0,0
ic_point {} SPLINE pnt.02 1,0,0
ic_curve point SPLINE crv.01 {pnt.01 pnt.02}
# Create point on curve at position 0.05
ic_point crv_par SPLINE pnt.03 {crv.01 0.05}
I'd like now to replace the number by a parameter, which may be used in a loop:

Code:
# set point number and start param
set pnt_nr 3
set param 0.0
#---Loop Start
# Set the parameter to create the point; output of correct value
set param [expr {$param+0.05}]
mess "set param  to: $param \n"
# Create point on curve
ic_point crv_par GEOM pnt.$pnt_nr {crv.01  $param}
incr pnt_nr
#---Loop End
I get the following error

Code:
Error in replay of ic_point crv_par GEOM pnt.$pnt_nr {crv.01  $param}:
{Error in scanning curve parameter: $param}
I figured I had the wrong format so I tried several approaches to get it to work, without success.

Code:
{expr $param}
[$param]
"$param"
Thanks for any Ideas on how to get it working!
Attached Files
File Type: txt param.txt (497 Bytes, 20 views)
firesoul is offline   Reply With Quote

Old   July 25, 2011, 11:55
Default
  #2
Member
 
fox000002's Avatar
 
Join Date: Apr 2009
Posts: 46
Rep Power: 17
fox000002 is on a distinguished road
{crv.01 0.05} is a list.

No substitutions are performed on the characters between the braces here.

Use list operations to construct the list variable.


Code:
set crvl {crv.01}
lappend crvl $param

ic_point crv_par GEOM pnt.$pnt_nr $crvl
fox000002 is offline   Reply With Quote

Old   July 25, 2011, 12:36
Default
  #3
New Member
 
Join Date: Apr 2011
Posts: 3
Rep Power: 15
firesoul is on a distinguished road
Good to know that these functions work with lists. Thanks fox!
firesoul is offline   Reply With Quote

Reply

Tags
icem tcl script parameter


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
[ICEM] What are sub-loops and help my failing mesh. siw ANSYS Meshing & Geometry 3 March 13, 2010 07:18


All times are GMT -4. The time now is 21:03.