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

[ICEM] [Workbench] Access WB-parameter from ICEM replay script.

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 13, 2013, 17:16
Question [Workbench] Access WB-parameter from ICEM replay script.
  #1
New Member
 
Adam Læssøe
Join Date: Nov 2013
Posts: 29
Rep Power: 13
AdamAL is on a distinguished road
I am trying to use parameters specified in Design Modeller in an ICEM .rpl-script.

It is probably easier with an example:

In DM, i have defined My.width. This shows up in WB, and modifying it from WB correctly updates the geometry.
In ICEM's message window, I have tried typing:
Code:
set myParam  [ic_wb2_get_parameter user_defined My.width]
This doesn't work. I also tried replacing "My.Width" with its Parameter ID ("P1") - no luck.

I then created a parameter (calles "test") from within ICEM (settings>Workbench). Now I could get that with
Code:
set myParam  [ic_wb2_get_parameter user_defined test]
This parameter (test) showed up in WB instantly. And changing it in WB, also changes it in ICEM (though only after an [Update Project]).

This way, I could assign "P1" to "test" in the parameter expression window in WB. This does work - but is clunky in that it requires 3 operations (create param, create param, couple params) in 3 different programs - that adds up if there are many parameters.

So the question is: How can I access "My.width" directly from ICEM?
AdamAL is offline   Reply With Quote

Old   November 13, 2013, 18:07
Default
  #2
Senior Member
 
Stuart Buckingham
Join Date: May 2010
Location: United Kingdom
Posts: 267
Rep Power: 26
stuart23 will become famous soon enoughstuart23 will become famous soon enough
Hi Adam,

I would probably steer away from using a variable name with a full stop in it.

You can try wrapping the variable name in curly brackets as in the following code:
Code:
set myParam  [ic_wb2_get_parameter user_defined {My.width}]
stuart23 is offline   Reply With Quote

Old   November 14, 2013, 04:02
Default
  #3
New Member
 
Adam Læssøe
Join Date: Nov 2013
Posts: 29
Rep Power: 13
AdamAL is on a distinguished road
Thanks for the suggestion, Stuart, but that's not it.

I tried renaming to "width", I also tried creating a parameter "test2" directly in WB. I was able to acces neither from ICEM. All I got was:
Code:
Result: ___NA___
- same result I get when entering non-existent names.
AdamAL is offline   Reply With Quote

Old   November 16, 2013, 22:56
Default
  #4
Senior Member
 
François Grégoire
Join Date: Jan 2010
Location: Canada
Posts: 392
Rep Power: 17
macfly is on a distinguished road
Hi Adam,

Parametrization in DesignModeler (Parameter Manager) or Workbench (Parameter Set or Microsoft Excel parameter sheet) is pretty clunky as you already experienced.

If you can build your geometry in Icem, then you can write an Icem script and parameterize everything in there. Everything will be at the same place (parameters, geometry and meshing) and easy quick to modify. It takes a little time to get used to the Icem script commands, the TCL language and the poor Icem programmer's guide, but once you have mastered the basics you will never go back to Workbench!!
macfly is offline   Reply With Quote

Old   November 19, 2013, 07:45
Default
  #5
New Member
 
Adam Læssøe
Join Date: Nov 2013
Posts: 29
Rep Power: 13
AdamAL is on a distinguished road
Thanks François; I just might go that route.
AdamAL is offline   Reply With Quote

Old   October 14, 2014, 15:29
Default
  #6
Senior Member
 
Henry Arrigo
Join Date: Jun 2010
Location: Italy
Posts: 100
Rep Power: 16
Henry Arrigo is on a distinguished road
Hi Adam
Did you finally resolve the problem. I have the same problem and I would appreciate if you share your solution.
thnks
Henry Arrigo is offline   Reply With Quote

Reply

Tags
icem, parameters, scripting, workbench


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
[DesignModeler] DesignModeler Scripting: How to get Full Command Access ANT ANSYS Meshing & Geometry 53 February 16, 2020 16:13
[ANSYS Meshing] How to pop the hood on ANSYS Meshing to access ICEM CFD... PSYMN ANSYS Meshing & Geometry 3 October 4, 2012 20:41
How to access a parameter from a previous timestep Ridley CFX 5 June 15, 2010 07:56
Access parameter value from within DEFINE_PROFILE ??? TDi Fluent UDF and Scheme Programming 3 May 17, 2010 16:10
ICEM replay file Fabian Main CFD Forum 0 May 23, 2005 08:02


All times are GMT -4. The time now is 15:57.