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

Internal Surface Selection in Ansys Workbench using Script

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 11, 2014, 11:17
Question Internal Surface Selection in Ansys Workbench using Script
  #1
New Member
 
Arjun Kothidar
Join Date: Nov 2014
Posts: 2
Rep Power: 0
arjunkothidar is on a distinguished road
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
arjunkothidar is offline   Reply With Quote

Old   November 12, 2014, 19:05
Default
  #2
Senior Member
 
Join Date: Apr 2014
Location: Melbourne
Posts: 584
Rep Power: 14
Kapi is on a distinguished road
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:
SM.ForceSelect(partID[i], aTopoId);
once selected you can do named selection as well.

Edit: By the way are you looking for selection in geometry or meshing stage? The above code is for mesh.
Kapi is offline   Reply With Quote

Old   November 12, 2014, 23:42
Default
  #3
Senior Member
 
Join Date: Apr 2014
Location: Melbourne
Posts: 584
Rep Power: 14
Kapi is on a distinguished road
Hi all,

Have a look at his link to get more idea about it.

http://www.eureka.im/4978.html

Cheers
Kapi
Kapi is offline   Reply With Quote

Old   November 13, 2014, 02:07
Default
  #4
New Member
 
Arjun Kothidar
Join Date: Nov 2014
Posts: 2
Rep Power: 0
arjunkothidar is on a distinguished road
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
arjunkothidar is offline   Reply With Quote

Reply


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
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


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