|
[Sponsors] |
Internal Surface Selection in Ansys Workbench using Script |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
November 11, 2014, 11:17 |
Internal Surface Selection in Ansys Workbench using Script
|
#1 |
New Member
Arjun Kothidar
Join Date: Nov 2014
Posts: 2
Rep Power: 0 |
I am sure those of you who have worked in cfd as well as structural mechanics would have come across cases where there are hundreds of parts and internal faces need to be selected. Manually, this process is both time consuming and prone to error.
I am wondering if in WORKBENCH, anyone has tackled this issue but calling a script that using ansys API to select internal faces of parts. I have close to 500 part bodies. So, manually i have to select one, hide others, click on internal faces of that part and create a named selection. towards the end there would be say 500 named selection which i can group and then I have to apply hydrostatic pressure on those faces. Looping a script so that it would go Part body 1... till 500 > at each loop select all internal faces > create named selection seems more reasonable. I would appreciate some hint on this. Thanks Arjun |
|
November 12, 2014, 19:05 |
|
#2 | |
Senior Member
Join Date: Apr 2014
Location: Melbourne
Posts: 584
Rep Power: 14 |
Hi Arjun,
You can go to each body and its faces by looping in you script but to select a particular face you need its PartID and TopoID. First find these IDs and then use the below mentioned code to actually select them. Quote:
Edit: By the way are you looking for selection in geometry or meshing stage? The above code is for mesh. |
||
November 12, 2014, 23:42 |
|
#3 |
Senior Member
Join Date: Apr 2014
Location: Melbourne
Posts: 584
Rep Power: 14 |
Hi all,
Have a look at his link to get more idea about it. http://www.eureka.im/4978.html Cheers Kapi |
|
November 13, 2014, 02:07 |
|
#4 |
New Member
Arjun Kothidar
Join Date: Nov 2014
Posts: 2
Rep Power: 0 |
Hi Kapi,
Thanks for the suggestion. I did look at the code in the last post. I am doing this at DM stage. Named selections would appear in Mesh and then I can apply BC or load to those. Lets check this code. for(i = 1; i <= parts.Count; i++) { partID = parts(i).Id; faces = assembly.PartById(partID).BRep.Cells(2); for(j = 1; j <= faces.Count; j++) { topoID = faces(j).Id; SM.Clear(); SM.ForceSelect(partID, topoID); ns = cgroup.AddComponent(SM); ns.Name = "Part" + i + "_Face" + (topoID-0x80000000); I had thought about this as well, but problem is that this loops over all the faces associated with the given part id. If you think of this problem then imagine a cylinder (very thin so you can neglect faces that appear due to thickness at both ends). You need to apply pressure only to internal face. If you have to do this programatically then you need a way to tell workbench that out of 2 faces it needs to select internal one and not external. There needs to be a method from Ansys API that would help me identify such faces from others. Logic of the method can be: drop normals from the axis of cylinders in radial dir., whichever face they hit first is the internal face. So, you see this is bit twisted, than selecting all faces. Thanks again! Arjun |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Ansys 12 Workbench 2D surface question | justincase | ANSYS Meshing & Geometry | 4 | February 24, 2020 04:22 |
Cluster ID's not contiguous in compute-nodes domain. ??? | Shogan | FLUENT | 1 | May 28, 2014 16:03 |
Generation of new surface in fluid flow(fluent) in Ansys Workbench | Arp2607 | FLUENT | 0 | April 5, 2014 14:12 |
Gambit vs. Ansys workbench mesh generating | sanlee39 | Main CFD Forum | 2 | April 8, 2013 07:09 |
[Commercial meshers] Fluent Mesh to OpenFoam: Internal Surface has to be a wall | sebastian | OpenFOAM Meshing & Mesh Conversion | 6 | October 21, 2010 05:36 |