It seems like a minor thing. For many users who have not known the glory that is APDL selection logic, they are not even aware of the power that surges through your fingers when you grab all the vertices between X = 1.2 and X=1.8, grab the lines attached to those vertices, then the areas defined by those lines. It sometimes borders on a magical incantation. It is not a minor thing. It is reaching into your model and grabbing it by the throat and asserting your control over it.
OK, maybe that is an exaggeration. But it has been a frustration for many of us to only be able to create named selections by clicking on geometry in Workbench. At release 13 the friendly developers working on ANSYS Mechanical have added a very cool adaptation of the MAPDL selection logic into the workbench world: Worksheet Named Selections. Right now they only work with geometry, but look for nodes in future releases.
Creating a Worksheet Based Named Selection
Most people don’t know about this feature because it is not really obvious that it is there. If you have no Named Selections in your model, the Named Selections Icon in the toolbar doesn’t even show up unless you click on the Model top branch of your tree:
Figure 1: Accessing Names Selections for the first time in a model
If you have some already in your model, just click on the Named Selection branch and you will see the Named Selection icon on the tool bar.
To create a Named Selection… OK. Stop.
<RANT> Someday I’ll find the committee that decided to call these groups of entities “Named Selections” and give them a bill for my coming carpal tunnel syndrome. I think it is a good descriptive name and as long as I’m just clicking on it in a GUI, the name is fine. But when I’m talking or typing about it… what a pain to have two words to describe it. I miss the days of only having 8 characters for entity and routine names in FORTRAN. There is too much verbosity in the world! Down with long, descriptive names! Up with short, non-descriptive names that you have to “know” in order to use! Why couldn’t we call it a set, or a group, or an assembly – better yet, asmb. Anyhow, from now on I will refer to Named Selections as NSs or a NS.</RANT>
To create a NS using a worksheet, you simply clock on the NS icon. This adds a NS Branch and a NS to that branch. If you look at the details View for the NS you will see that the Scoping Method is set to Geometry Selection by default. Click on the Geometry Selection and you get a drop down menu that now offers you the choice of using the Worksheet. Make that choice:
Figure 2: Telling Workbench you want it to reveal Worksheet method of creating a NS
Now you should see a new tab in your graphics window called Worksheet, and in that Worksheet you should see a Generate button and a table. If you window is large enough, it will look like this:
If it is too small to show the whole table, a scroll bar will be at the bottom and cover up that blank row. Don’t panic, it is supposed to do that.
Figure 4: The NS Worksheet with Scroll Bar covering the first row
If you are like me you get to this point and you go “What Next” It is not obvious what the next step is (well, to me anyway. But it may be trivial to those with younger brains). Clicking on the blank row doesn’t do anything. To start creating you selection you right click on the table and choose Add. You are now ready to specify your NS.
Building a Worksheet Based Named Selection
This tool is pretty clever. You basically add rows to the table that act on geometry from top to bottom. In many cases you just use one line. But for more sophisticated selections, you can really stack them up and get complicated. After each line is executed, the active set changes based on what is on that row. The final active set is what goes into the named selection.
Lets take a look at the table and each column in it.
Action
This is the most important column. It tells workbench what you want to do in this step of applying the filter. Under action you have the following options:
- Add: Adds the entities defined by the row to the active set.
- This is a UNION in set theory
- For the first row in the table:
- This is a CREATE operation in set theory
- There is no “active set” so the first line add’s to a null set (xSEL,S,,, in APDL)
- For the second and subsequent rows:
- In order for it to work, the value in the Type column has to be the same. If they are not the same, then nothing gets selected.
- This is an OR operation. So if you have one line that selects all vertices with X > 0 and a second with Y > 0 you will get vertices that are X > 0 OR Y>0.
- xSEL,A,,, in APDL
- Remove: Removes the entities specified on the row from the set.
- Think of it as an unselect: xSEL,U,,, in APDL
- Filter: Selects a subset from the active set
- This is an INTERSECTION in set theory
- This is an AND operation. It puts everything in the active set that is also defined by the row in the active set.
- xSEL,R,,, in APDL
- Invert: Selects everything not in the active set of the current active set type, and makes it active
- This is a COMPLIMENT in set theory
- This is a NOT using the everything of the current type vs. the active set.
- xSEL,INVE in APDL
- Convert: Selects all of the entities of the type specified in the Geometry Type column that are connected to the active set and makes those entities the new active set
- Must go up or down in topology tree by one step: vertex <-> Edge <-> Face <-> Body
- When going up it selects ANY entity that is attached to the current select set. There is no way to specify just those that are fully defined
- xSLx in APDL: LSLA, ASLL, KSLL, LSLK, etc…
Geometry Type
Right now it only selects the standard geometry topology types:
Workbench |
CAD Name |
MAPDL Name |
Body |
Solid | Volume |
Face | Surface | Area |
Edge | Curve | Line |
Vertex | Vertex | Key Point |
Remember that you can only have one Geometry Type in the active set at a time.
Criterion
This tells the program what filter you want to apply to select geometry. The table below shows the different criterion and what Geometry Type’s they apply to:
Vertex | Edge | Face | Body | Comment | |
Size |
X |
X |
X |
Selects entities by whose Length (Edge), Area (Face), Volume (Body) fall within the specified values |
|
Type |
X |
X |
X |
Finds entities of a certain underlying shape: |
|
Location X |
X |
X |
X |
You can specify a value or a range and you can also specify a coordinate system to use! |
|
Location Y |
X |
X |
X |
X |
You can specify a value or a range and you can also specify a coordinate system to use! |
Location Z |
X |
X |
X |
X |
You can specify a value or a range and you can also specify a coordinate system to use! |
Face Connections |
X |
Used to pick edges by the number of faces they are connected to: 0 would be all free edges, 1 would be all edge on only one face, 2 would be shared by 2 faces, etc… |
Operator
This is where you specify how you want to control your selection. You have your standard if() type operators as well as the ability to specify a range. For range you put values in the Lower and Upper Bound columns and for all others, the Value column. The options are:
- Equal, Not Equal, Less Than, Less than or Equal, Greater Than, Greater Than or Equal
- Range
Units
Like most things in Workbench, you can change the units here if you want.
Value
Here is where you put in value you want to select on (unless it is a range). Put in a numerical value for Criterion = Size or Location X/Y/Z. Use the values in the table above for Criterion = Type. And lastly, if you are doing Face Connections, put in the number of faces.
Lower Bound, Upper Bound
When Criterion is set to Range, you specify the range here.
The other thing you should know is how to modify your table. To change a value in a cell, just click on it. To delete a row, click on a cell in the row then RMB and select delete. Do the same thing to insert a new row before the currently selected row.
Lastly, remember to hit the generate button! If you don’t, it does not update and even though you have a green checkbox next to your NS in the tree, it is not up to date. You have to hit generate or select the NS branch and RMB->Generate Named Selections
Starting with Picking
A nice way to start a NS using a worksheet is to actually pick an entity on the screen then RMB->Create Named Selection. this brings up a dialog box where you can specify the name and if you want to turn it into a Worksheet named selection:
Figure 6: Selection Name and Options Dialog
If you choose “Apply Selected Geometry” it makes a standard Scoping Method of “Geometry Selection” This is the default. But if you pick “Apply geometry items of same:” and then pick one of the options, it creates a NS with a Scoping Method of “Worksheet.” Now you can go into the worksheet and add rows to it.
Tips on Using the Worksheet Named Selections
That was a lot of information! If you need more clarification you can get even more from the Help menu:
// Mechanical User’s Guide // Basics // The Mechanical Application Interface // Named Selections // Worksheet Rules for Specifying Named Selection Criteria
When you want to use these selections it is fairly simple. Each time you add a row you modify the selected set. Like most things it is a good idea to take a crawl-walk-run approach. Add a row and click the generate button and see how many entities you get in the details view. Or simply click on the graphics tab to visually see what was selected. Then add the next row, and so on until you have what you want.
As always, it is a good idea to give descriptive names to your NSs. The default of Selection, Selection 1, Selection 2 doesn’t hold up in 4 months when you try to figure out what you were trying to do.
Some Examples
The most common way that we have used this is to select all the holes of a certain size. There are a couple of ways to do this, but the one I prefer has the following steps.
-
First you need to know the circumference of an edge on your hole. You can do this by multiplying your diameter by PI or just select one of the edges and read the length of the edge on the bottom of the screen (because multiplying by PI is too hard)
Figure 7: Avoiding the use of the first thing you learned in 5th grade geometry - Now click on the Named Selection icon and change the Scoping Method to Worksheet. Add a line and set it to: ADD, EDGE, TYPE, EQUAL, CIRCLE
This gives you all the circle edges -
Next Add another row and set it to: FILTER, EDGE, SIZE, EQUAL, 0.7854 (That is the length of my hole’s circumference for this example). Note that we used FILTER, not ADD!
View the results and you should now see the edges of you holes. It is often good to switch to wireframe to see all the edges:Figure 8: Edges Selected on Holes of Diameter 0.25”
- The next step is to get the cylinders. We do this with a new row that uses Convert To: CONVERT TO, FACE. This gives us the holes we want, but also the top and bottom faces that are attached to the hole edge:
Figure 9: Faces attached to hole edges -
The last step is to select all the cylinders in the active group. Add a row with: FILTER, FACE, TYPE, EQUAL, CYLINDER:
Figure 10: Holes are selected!
Final Thoughts
And that is a basic introduction to using the worksheet to do selections. As always, the best way to get good with this is to use it. The help is a pretty good reference as well. Users can get very creative with this and really make some big improvements to productivity, eliminating the need for a few more APDL Code Snippets in the tree.