CFD Online Discussion Forums

CFD Online Discussion Forums (
-   ANSYS (
-   -   Icem programming (

helios September 27, 2012 05:34

Icem programming
Hi i have a problem to clarify: i have to write an icem macro which recoursively meshes my domain rounding an airfoil profile in a range of incidence angles. Could i do it programming with APDL language?

Thanks to all

MarTar October 1, 2012 04:07

You can record a session during the construction of your first mesh. When you will mesh other airfoils you have to run the session recordered to get the new mesh.

There is only one shrewdness: you must use the same names for all the parts of your geometry, otherwise the session file will not be able to recognize geometry part and mesh creation will fail or will completed not in a proper manner.

I hope to be helpful! :)

stuart23 October 1, 2012 18:22


The programming language used by ICEM is not the same an Ansys APDL. The ICEM programming language interpreter is Tcl/Tk but with hundreds of other ICEM functions. The ICEM functions begin with "ic_". You will find lots of information in the ICEM programmers guide.


helios October 2, 2012 07:34

thanks at all but my proble is to take a macro recorded before with all the operation i have to do and in angle of attack function automatically rotate the airfoil profile to remesh all with an "if cycle" or an "for cycle". by the way i'll follow stuart's advise and i'll see better in the ICEM programmers guide. Can i find it in the Icem help?? thanks again

stuart23 October 2, 2012 07:58


Have a look at the following websites for some pointers:

If statements:

For loops:

foreach loops (similar to for loops, but loops through each item in a list, I ind these REALLY handy in ICEM)

For other tcl/tk commands, the website is quite useful, otherwise just try google. For ICEM specific commands, check the ICEM programmers guide.


helios October 3, 2012 05:35

thanks Stuart you were very helpful for me

All times are GMT -4. The time now is 04:20.