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

Automating re-naming of zones from WB mesh

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By `e`

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 13, 2018, 12:38
Post Automating re-naming of zones from WB mesh
  #1
New Member
 
Tim
Join Date: Jun 2018
Posts: 10
Rep Power: 8
tbraun84 is on a distinguished road
Whenever I use Workbench's ANSYS meshing to create a CFD mesh...

(as much as I prefer Gambit, it is getting harder to patch the installation to work whenever we get OS updates... but I digress...)

I get long "hierarchical" names for all of my zones. For example "wall-casename-zonename-casename (again!)-volume1"


Is there a method for deleting the redundant naming convention or scripting to map a text file list of names onto the zones? Typing out the list is still better than zone-rename and "OK" for a hundred or so zones.

For reference, I know the [next] best option is being diligent in ANSYS DesignModeler and Meshing with naming every important surface and avoiding the automatic naming convention. Still, it would be nice to have a cleanup after import for something that didn't translate.

I could not find an existing answer in the forum, but if I have unknowingly duplicated another thread, kindly direct me to the right place!
tbraun84 is offline   Reply With Quote

Old   June 13, 2018, 13:26
Default
  #2
Senior Member
 
Join Date: Dec 2016
Posts: 152
Rep Power: 10
RaiderDoctor is on a distinguished road
Hi, I actually have never seen that happen before. Could you post a couple images showing the issue?
RaiderDoctor is offline   Reply With Quote

Old   June 13, 2018, 22:26
Default
  #3
`e`
Senior Member
 
Join Date: Mar 2015
Posts: 892
Rep Power: 18
`e` is on a distinguished road
Naming the boundaries in ANSYS Meshing would be the normal approach, but you could use the TUI to rename the boundaries and cell zones in bulk, for example:

Code:
/mesh/modify-zones/zone-name 1 inlet
/mesh/modify-zones/zone-name 2 outlet
/mesh/modify-zones/zone-name 3 wall
Note: a list of the zones are available with /mesh/modify-zones/list-zones, and then an external script could be developed to automate creating the code above (based on your own naming convention).
tbraun84 likes this.
`e` is offline   Reply With Quote

Old   June 14, 2018, 13:29
Default
  #4
Senior Member
 
Micael
Join Date: Mar 2009
Location: Canada
Posts: 157
Rep Power: 18
Micael is on a distinguished road
As `e` wrote, naming your boundary in ANSYS MESHING is the neat way. Similarly as you would do in gambit.

From gambit to ansys meshing, there is some paradigm to overcome, but, IMO, that's totally worth the move.
Micael is offline   Reply With Quote

Old   June 15, 2018, 10:47
Default
  #5
New Member
 
Tim
Join Date: Jun 2018
Posts: 10
Rep Power: 8
tbraun84 is on a distinguished road
Thanks for the feedback, guys.
In Workbench/Mesh I really haven't been able to replicate the "Cooper" mesh propagation which is one of the best features of GAMBIT. Otherwise, I can get to where I want to be with enough decomposition and edge/face mapping. I'd be interested in what specific paradigms you are speaking of though. Is there a "Once I started to use ____ it was much easier." ?
tbraun84 is offline   Reply With Quote

Old   June 15, 2018, 13:13
Default
  #6
Senior Member
 
Micael
Join Date: Mar 2009
Location: Canada
Posts: 157
Rep Power: 18
Micael is on a distinguished road
Cooper equivalent in ansys meshing is 'MultiZone Method'

I guess paradigm was a bit exaggerated, it not that bad to do the switch from gambit to ansys meshing. I did use gambit for several years than ansys meshing for years as well and would say the latter is better.
Micael is offline   Reply With Quote

Old   June 15, 2018, 15:27
Default
  #7
New Member
 
Tim
Join Date: Jun 2018
Posts: 10
Rep Power: 8
tbraun84 is on a distinguished road
Following `e`'s advice, I exported the names using /define/bc/list-zones and copied the text to a file. Then, I did a find and replace for redundant words replacing <redundant name> with <>. I used a python script to recursively do this through all 500 names that I had! You could do the same thing in any text editor. My script then took the new lines with the zone numbers and stored them in an array. I then went through the array and recursively added "/mesh/modify-zones/zone-name" to each member of the new array. Finally I wrote that result out to another text file. It gives a list like stated above and which can be read in as a journal file.

Code:
/mesh/modify-zones/zone-name 1 inlet
/mesh/modify-zones/zone-name 2 outlet
/mesh/modify-zones/zone-name 3 wall
You could do all of this in vi or excel or many other tools I'm sure. I'm documenting this in case it helps anyone in the future.

Last edited by tbraun84; June 15, 2018 at 15:28. Reason: Added "can be read in as journal"
tbraun84 is offline   Reply With Quote

Reply

Tags
meshing, named selections, zones


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
sliding mesh problem in CFX Saima CFX 46 September 11, 2021 08:38
[Gmsh] 2D Mesh Generation Tutorial for GMSH aeroslacker OpenFOAM Meshing & Mesh Conversion 12 January 19, 2012 04:52
[snappyHexMesh] snappyHexMesh won't work - zeros everywhere! sc298 OpenFOAM Meshing & Mesh Conversion 2 March 27, 2011 22:11
[snappyHexMesh] external flow with snappyHexMesh chelvistero OpenFOAM Meshing & Mesh Conversion 11 January 15, 2010 20:43
fluent add additional zones for the mesh file SSL FLUENT 2 January 26, 2008 12:55


All times are GMT -4. The time now is 16:22.