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

[ICEM] Script Commands

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

Reply
 
LinkBack Thread Tools Display Modes
Old   October 11, 2013, 02:57
Default Script Commands
  #1
New Member
 
Join Date: Aug 2011
Posts: 4
Rep Power: 6
Tobi-R is on a distinguished road
Hi,

can someone tell me, how the following commands work and can give me an example for them?

1) ic_geo_project_point
I don't really understand how this command work.
2) ic_geo_nearest_object

3) ic_geo_cre_bsp_crv_n_pnts_cons
Always get this error message when i try to use this:
{Unable to fit spline to points}
{Parameter out of range in GM126J}
{Error creating constrained BSpline curve: crv.3}

There was a Tutorial for this command in the Ansys folder, where is written that "tangent constraints weren't working", but this entry was from 2002.
Tobi-R is offline   Reply With Quote

Old   October 11, 2013, 05:22
Default
  #2
Senior Member
 
Javi
Join Date: Jan 2013
Posts: 256
Rep Power: 7
FJSJ is on a distinguished road
Hi Tobi,

maybe this links (posted by Far) can help you in your answer

Scripting lenguage version for ICEM 14.0 on win 7 64 bit
FJSJ is offline   Reply With Quote

Old   October 11, 2013, 08:54
Default
  #3
New Member
 
Join Date: Aug 2011
Posts: 4
Rep Power: 6
Tobi-R is on a distinguished road
Hi Javi,

thank you for your answer, but I already found these links and they don't help me, because it's the same that is in the ICEM help.
Tobi-R is offline   Reply With Quote

Old   October 21, 2013, 17:07
Default
  #4
Senior Member
 
François Grégoire
Join Date: Jan 2010
Location: Laval University, Canada
Posts: 366
Rep Power: 8
macfly is on a distinguished road
Hi Tobi,

Here's a code that gets the nearest surface at given coordinates, renames the surface and create a part that contains only the surface. Load the code in Replay Control and run it to see how it works (and turn on Show Surface Names):

Code:
# close geometry
ic_csystem_display all 0
ic_csystem_set_current global
ic_unload_tetin
ic_empty_tetin
ic_geo_set_modified 0
#
#
# draw a cube
ic_undo_group_begin
ic_geo_new_family GEOM
ic_boco_set_part_color GEOM
ic_vid_object box8 GEOM 00 {0 0 0} 1 1 1
ic_set_dormant_pickable point 0 {}
ic_set_dormant_pickable curve 0 {}
ic_undo_group_end
#
#
# create list of all surfaces in GEOM...get nearest surface at given coordinates among the list...rename it and create new part...
ic_undo_group_begin 
set s_names[list [ic_geo_get_objects surface GEOM]]
set s_names [lindex $s_names 0] ;# read about tcl scripting to understand this...
set face [ic_geo_nearest_surface_list {0.5 0.5 1} $s_names] ;# get nearest surface from these coordinates
ic_geo_set_name surface $face newname 1 0
ic_geo_set_part surface newname NEWPART 0 
ic_undo_group_end
I have a script that builds my geometry and then renames the inlets, outlets, etc. with the ic_geo_nearest_surface_list function. Very convenient instead of doing it manually.
macfly is offline   Reply With Quote

Old   October 21, 2013, 22:23
Default
  #5
Senior Member
 
François Grégoire
Join Date: Jan 2010
Location: Laval University, Canada
Posts: 366
Rep Power: 8
macfly is on a distinguished road
and the ic_geo_nearest_object function seems to work only for surfaces, for example to find the nearest surface at coordinates {0 0 0}: ic_geo_nearest_object surface {0 0 0}

The ICEM CFD Programmer's Guide: so incomplete...
macfly is offline   Reply With Quote

Reply

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
[ICEM] Hotkeys commands via script files? macfly ANSYS Meshing & Geometry 1 July 28, 2012 08:18
[ICEM] Script file : how to reset all, fit window, etc. macfly ANSYS Meshing & Geometry 0 July 25, 2012 11:07
CentFOAM Python Script Installation: Error socon009 OpenFOAM Installation 2 May 26, 2012 09:36
[ICEM] I need help for ICEMCFD script ringtail ANSYS Meshing & Geometry 2 September 20, 2010 10:46
Perl script for intialisation pratik mehta CFX 2 September 10, 2008 03:09


All times are GMT -4. The time now is 18:55.