CFD Online Discussion Forums

CFD Online Discussion Forums (
-   ANSYS Meshing & Geometry (
-   -   [TGrid] Automatic meshing in Tgrid (

Neix August 28, 2012 10:27

Automatic meshing in Tgrid
Hy everybody,

I use a simple journal to create a mesh, but every time I change a value (number of prism layers for instance), I can't use my journal anymore because of the "automatic naming" of the software (prism-cap-n, interior-n, ..., n is a zone number assigned by Tgrid).
Is there a simple way to automaticly rename these prism-cap-n, interior-n, ..., in a journal/scheme ?

I'm quite sure not to be the first to ask this question, but I can't find any answer on this forum...

Thank you,

stuart23 September 2, 2012 21:07

Hi Neix,

I usually put the following line in my journal scripts after every command which creates a new part.

/mesh/manage/name fluid* inner_domain

This one I put after tet/init; tet/refine. This way the zone gets renamed from fluid* after it is created to inner_domain. If you are working with multiple domains etc. Put this line after every function that creates a new zone, but specify something that does not begin with fluid_____. Therefore it will not try to rename something you have already renamed.


PS. Good to see a fellow TGrid user. Everyone else is missing out on the most efficient tet generation!

Far September 2, 2012 21:42

@stuart23: You have excellent grip on meshing softwares whether it is AM, ICEM or Tgrid.

stuart23 September 2, 2012 22:14

Thankyou Far, however AM is the only software that I do not use. For the same amount of time and effort, I can create a better mesh using ICEM and TGrid.

Having said that, I do think that AM still has a purpose as a reliable mesher for people who just want a hassle free mesh. I'm sure not everyone has the time to spend hours upon hours learning the ins and outs of ICEM & TGrid


Neix September 3, 2012 04:35

Automatic meshing in Tgrid - resolved
Hey Stuart23,

When I said "a simple way", I didn't think of such a simple one ! :eek:
I can't believe I didn't think of tring this...

Thank you very much, it works !

Just talking about Icem give me a headache. Using Tgrid is not so complicate if you don't try to optimize the grid generation, and change the parameters, and I must say the tutorials are very useful to learn how to use the software.

Have a good day,
Neix, a fellow Tgrid user.

kiran January 13, 2014 08:52

Hi Every one

I have to write a code for smoothing iterations in TGrid by using the for loop.

(cx-gui-do cx-activate-item "MenuBar*ToolsSubMenu*Auto Node Move...")
(cx-gui-do cx-set-list-selections "Auto Node Move*Frame2*DropDownList1(Cell Zones)" '( 1))
(cx-gui-do cx-activate-item "Auto Node Move*Frame2*DropDownList1(Cell Zones)")

I hope that you people can understand this scheme program.

Now I m facing the problem to change the number "1" (Second line of code Drop down list ) to 2,3 and so on using For loop in Scheme language.

I have more than 5 cells zones in mesh.

I hope you can help me in this regard.


All times are GMT -4. The time now is 00:09.