Find elements belonging to different sets
Overview
This script looks for elements belonging to multiple sets
It is written for Abaqus user profile. For other profiles, please replace "ELSET" card image name in line 4 by the relevant card image
Elements displayed in multpile sets will be written in the HyperMesh tcl window
Usage/Installation Instructions
Run it from HyperMesh either from File drop-down menu or through an Extension
Comments
-
Hello Michael,
Thank you for script. I want to use it for ANSYS user profile , so can you please edit the script for ANSYS user profile.
Also I have modified the code (slide added in the presentation) and now the way it work is :-
- User can select which sets he want to select
- it iterates through selected sets and finds out the overlapping elements
- add the overlap elements to the user mark pannel or saves the element selection
Limitations found :-
- saving only elements from last set overlap check (check presentation slide for more information )
- If no elements are overlapping then preveously saved elements are present in the user pannel or save selection, can we modify macro to completely clean the save selection if no overlapp found.
Improvements :-
- pop up the output , showing which sets has overlap and to which it overlaps.
0 -
Sumit Shelke said:
Hello Michael,
Thank you for script. I want to use it for ANSYS user profile , so can you please edit the script for ANSYS user profile.
Also I have modified the code (slide added in the presentation) and now the way it work is :-
- User can select which sets he want to select
- it iterates through selected sets and finds out the overlapping elements
- add the overlap elements to the user mark pannel or saves the element selection
Limitations found :-
- saving only elements from last set overlap check (check presentation slide for more information )
- If no elements are overlapping then preveously saved elements are present in the user pannel or save selection, can we modify macro to completely clean the save selection if no overlapp found.
Improvements :-
- pop up the output , showing which sets has overlap and to which it overlaps.
Hello @Summit Shelke,
thanks for your feedback.
As stated in the description of the script, for any solver profile, you need to update line 4 based on the card image for the element set for this profile. I just looked at Ansys user profile, a SEGMENT card image is available, but from my understanding it is not mandatory for element sets. So the interactive selection that you set up looks like the way to go.
For performance reasons, the script is looping over selected sets and comparing set A to set B, then returning in the tcl window list of overlapping elements.
As in your case you are looking to remove the overlapping elements from one of the two sets, I am not sure we can automate this task (should we remove systematiclly the element from set A, or from set , so the script is mostly intended to return a summary of what are the overlapping elements between different sets. Then the user can fix them later on. In your presentation, you have the case of 2 elements which finally belong to 3 different sets. I'd assume in that case it is up to the user to determine from which set the elements must be removed.
Saving elements in the user mark was probably not relevant here as the macro cannot pause at each pair of set check. I could add a *clearmark elems 1 statement if there is no overlapping element between 2 sets, but I'm not sure it would help a lot.
Best Regards,
Michael Herve
0 -
Hello Michael, Can we change logic thw way, for overlapping elements we will create the new set and add or append overlapping elements to this set for every set combination0
-
Sumit Shelke said:
Hello Michael, Can we change logic thw way, for overlapping elements we will create the new set and add or append overlapping elements to this set for every set combination
Hello Sumit,
I just uploaded v0.2 version of the script where a set is created with elements belonging to multiple sets. Does it help?
Best Regards,
Michael
0 -
Hello Michael, Now it is correct. But still there are few comments from my side. 1. If there are so many elements present in the sets it takes too long to process and some times resulting in hypermesh getting crash. 2. Can we add the pop up window showing the summary for all the sets. Going to TCL console and taking look there is not so convenient and if there are large number of elements overlap then , all the element Id are listed there , which causes some inconvenience to see the results in TCL console.0
-
Sumit Shelke said:
Hello Michael, Now it is correct. But still there are few comments from my side. 1. If there are so many elements present in the sets it takes too long to process and some times resulting in hypermesh getting crash. 2. Can we add the pop up window showing the summary for all the sets. Going to TCL console and taking look there is not so convenient and if there are large number of elements overlap then , all the element Id are listed there , which causes some inconvenience to see the results in TCL console.
Hello @Sumit Shelke,
How many elements (roughly) in the sets are causing HyperMesh to fail?
That said, I'm not sure if the basik tk pop-up is a relevant option here (tk_messageBox). You can for sure copy/paste from this gui, but as long as it is exposed you cannot manipulate HyperMesh. Plus, the display won't be better than the ids in the tk console for a large number of elements...
What I would recommend is:
- either to deactivate in the macro the command for printing the elements in the tk console
- and/or write the ids of elements in a separate ASCII file
Best Regards,
Michael
0 -
Hello Michael, The Elementes for my use cases can be in 2-4 Millions . And the option you suggested for deactivating the printing of element Id's can be used. Still is there any chance we can use pop up message , for showing summary?0
-
Sumit Shelke said:
Hello Michael, The Elementes for my use cases can be in 2-4 Millions . And the option you suggested for deactivating the printing of element Id's can be used. Still is there any chance we can use pop up message , for showing summary?
Hello Sumit,
may I ask you for more details about your use case here? I don't see what could be the cause of getting 2-4 millions of elements in different sets. And such number will definitely cause performance issues wether you re prompting them in the tcl window, or through a pop-up -you can give a try to tk_messageBox, but I'll expect it to fail if you want to display all the ids...)
Best Regards,
Michael
0