Hallo mir ist noch eine andere Lösung per script eingefallen. Ich suche im Script die Elemente die min. 3 Knoten (bei Tetraeder, 4 bei Hexaederelementen) im Knotenset der Komponente "FAC" haben. Am Schluss werden dann die entsprechenden elemente selektiert.
Ein Beispiel ist als zip angehängt und für das Funktionert es recht gut.
Wer hat eine bessere Idee oder schlankere Lösung?
**************** Script **************************
/post1
neededanz=3 ! 3 Corner nodes per tetraeder
!neddedanz=4 ! 4 corner nodes per hexaeder
cmsel,s,fac,node ! Select the nodes of the named selected area
esln,s,0,all ! Select element only if all of its nodes are in the selected nodal set
*get,elemcount,ELEM,0,count ! How many elements contain the selected node
*del,elemlist
*set,elemlist $ *dim,elemlist,Array,elemcount
! Fill up an array with the element how contain the selected element
*vget,elemlist,ELEM,,ELIST
*del,foundedelem
*set,foundedelem $ *dim,foundedelem,ARRAY,elemcount,2
*do,eindex,1,elemcount,1 ! Elemente durchlaufen
esel,s,elem,,elemlist(eindex) ! select element of the list
nsle,s,corner ! only the corner Nodes selected
*get,nodecount,NODE,0,COUNT ! How many corner nodes have the element
*del,nodelist
*set,nodelist $ *dim,nodelist,ARRAY,nodecount
*vget,nodelist,NODE,,NLIST ! Fill up a list of the element nodes
cmsel,s,fac,node ! Select nodes of the component
tmpanzselect=0
*do,nindex,1,nodecount,1
isselect=0
isselect=NSEL(nodelist(nindex)) ! Controlled if the node of the element selected, if the node of element at the componoent
*if,isselect,eq,1,THEN ! Node are selected
tmpanzselect=tmpanzselect+1
*endif
*enddo
! save the element, and which are at teh component
*if,tmpanzselect,ge,neededanz,Then
foundedelem(eindex,2)=1 ! for founded element in the component fac
*endif
foundedelem(eindex,1)=elemlist(eindex)
*enddo
esel,none !unselect all elements
*do,eindex,1,elemcount,1
*if,foundedelem(eindex,2),eq,1,Then
esel,a,elem,,foundedelem(eindex,1) ! select elements are only founded
*endif
*enddo
ETABLE,GX,CENT,X
ETABLE,GY,CENT,Y
ETABLE,GZ,CENT,Z
ETABLE,S1,s,1
ETABLE,S3,s,3
pretab,GX,GY,GZ,S1,S3
Eine Antwort auf diesen Beitrag verfassen (mit Zitat/Zitat des Beitrags) IP