XANSYS Forum Index
    Register    

FAQ    Search    Memberlist    Usergroups    SmartFeedSmartFeed    Profile    Log in
read the first element number in a selected element set
 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    XANSYS Forum Index -> XANSYS
Author Message
umut.tabak
User


Joined: 08 Apr 2012
Posts: 30

PostPosted: Thu Mar 07, 2013 6:41 am  Reply with quote

Dear all,

Is that possible to select the first element from a selected element set?

I am selecting a set depending on the type number with

esel, s, type, ,i

in a loop where i is the loop counter for the type number. Is that possible to read the element number of first element in this set for other processing options?
_________________
Umut Tabak
Delft University of Technology
Precision and Microsystems Engineering
Engineering Dynamics
Mekelweg 2, Delft, The Netherlands
Back to top
View user's profile Send private message
danbohlen
User


Joined: 18 Aug 2008
Posts: 951
Location: Evendale OH

PostPosted: Thu Mar 07, 2013 6:45 am  Reply with quote

By the "first element" I assume you mean the one with the lowest number?

El=elnext(0) ! retrieves the number of the lowest numbered element selected

Esel,,,,el ! select the element.



Dan elementarymydearwatson Bohlen
Senior Staff Engineer, Military HPT Analysis
STAR review chairman, Fan and Booster
GE Aircraft Engines
1 Neumann Way
Evendale, OH 45215
Build 90 Col K1.5 cube 1N152
M/D H110 513-243-2366
Dial Comm *332-2366




-----Original Message-----
From: xansys-bounces@xansys.org [mailto:xansys-bounces@xansys.org] On Behalf Of umut.tabak
Sent: Thursday, March 07, 2013 8:41 AM
To: xansys@xansys.org
Subject: [Xansys] read the first element number in a selected element set

Dear all,

Is that possible to select the first element from a selected element set?

I am selecting a set depending on the type number with

esel, s, type, ,i

in a loop where i is the loop counter for the type number. Is that possible to read the element number of first element in this set for other processing options?

------------------------
Umut Tabak
Delft University of Technology
Precision and Microsystems Engineering
Engineering Dynamics
Mekelweg 2, Delft, The Netherlands






+-------------------------------------------------------------+
| XANSYS web - www.xansys.org/forum |
| The Online Community for users of ANSYS, Inc. Software |
| Hosted by PADT - www.padtinc.com |
| Send administrative requests to xansys-mod@tynecomp.co.uk |
+-------------------------------------------------------------+

Post generated using Mail2Forum (http://www.mail2forum.com)
_________________
Dan Bohlen
Senior Staff Engineer
GE Aircraft Engines
Back to top
View user's profile Send private message
akbey.kalkan
User


Joined: 21 Oct 2008
Posts: 6

PostPosted: Thu Mar 07, 2013 6:55 am  Reply with quote

Umut

Have a look at ndnext function, Appendix B of the help file.

a=ndnext(0) will assign the smallest node number in the currently selected nodes to variable a.

--Akbey Kalkan
Jacobs



________________________________
From: xansys-bounces@xansys.org on behalf of umut.tabak
Sent: Thu 07/03/2013 1:41 PM
To: xansys@xansys.org
Subject: [Xansys] read the first element number in a selected element set


Dear all,

Is that possible to select the first element from a selected element set?

I am selecting a set depending on the type number with

esel, s, type, ,i

in a loop where i is the loop counter for the type number. Is that possible to read the element number of first element in this set for other processing options?

------------------------
Umut Tabak
Delft University of Technology
Precision and Microsystems Engineering
Engineering Dynamics
Mekelweg 2, Delft, The Netherlands






+-------------------------------------------------------------+
| XANSYS web - www.xansys.org/forum |
| The Online Community for users of ANSYS, Inc. Software |
| Hosted by PADT - www.padtinc.com |
| Send administrative requests to xansys-mod@tynecomp.co.uk |
+-------------------------------------------------------------+


________________________________
NOTICE - This communication may contain confidential and privileged information that is for the sole use of the intended recipient. Any viewing, copying or distribution of, or reliance on this message by unintended recipients is strictly prohibited. If you have received this message in error, please notify us immediately by replying to the message and deleting it from your computer.

________________________________
Jacobs U.K. Limited
1180 Eskdale Road, Winnersh, Wokingham RG41 5TU
Registered in England and Wales under number 2594504

Post generated using Mail2Forum (http://www.mail2forum.com)
Back to top
View user's profile Send private message
Jerry Andergrahn
Guest





PostPosted: Thu Mar 07, 2013 7:00 am  Reply with quote

Hello Umut.
This little sample of code is for nodes, but it should work for elements as well if you do some editing.
It's for making a beam star. Since I don't know what you want to do with your code I don't bother changing node for elem and make it do something else.
-----
*get,ncount,node,,count
*get,nmax,node,0,num,max
*get,nmin,node,0,num,min
ii=nmin
N,201,0,0,L_rb_s
mid_node=201
*do,i,1,ncount,1
e,mid_node,ii
cmsel,s,komp
*get,ii,node,ii,nxth
*enddo
----
If you just change node for elem I think it should work. If this is what you were asking for in the first place that is.

Good luck!
/Jerry


Jerry Andergrahn | Structural Analyst
P: +46-31-725 1060 | M: +46-736-88 1060  | jerry.andergrahn@xdin.com
XDIN AB | A Odhners gata 41 | SE-421 30 V Frölunda | xdin.com

Xdin develop and deliver expertise through committed engineering and IT consultants.



-----Original Message-----
From: xansys-bounces@xansys.org [mailto:xansys-bounces@xansys.org] On Behalf Of umut.tabak
Sent: den 7 mars 2013 14:41
To: xansys@xansys.org
Subject: [Xansys] read the first element number in a selected element set

Dear all,

Is that possible to select the first element from a selected element set?

I am selecting a set depending on the type number with

esel, s, type, ,i

in a loop where i is the loop counter for the type number. Is that possible to read the element number of first element in this set for other processing options?

------------------------
Umut Tabak
Delft University of Technology
Precision and Microsystems Engineering
Engineering Dynamics
Mekelweg 2, Delft, The Netherlands






+-------------------------------------------------------------+
| XANSYS web - www.xansys.org/forum |
| The Online Community for users of ANSYS, Inc. Software |
| Hosted by PADT - www.padtinc.com |
| Send administrative requests to xansys-mod@tynecomp.co.uk |
+-------------------------------------------------------------+

Post generated using Mail2Forum (http://www.mail2forum.com)
Back to top
umut.tabak
User


Joined: 08 Apr 2012
Posts: 30

PostPosted: Thu Mar 07, 2013 7:11 am  Reply with quote

Thanks Dan, exactly what I am looking for.

danbohlen wrote:
By the "first element" I assume you mean the one with the lowest number?

El=elnext(0) ! retrieves the number of the lowest numbered element selected

Esel,,,,el ! select the element.



Dan elementarymydearwatson Bohlen
Senior Staff Engineer, Military HPT Analysis
STAR review chairman, Fan and Booster
GE Aircraft Engines
1 Neumann Way
Evendale, OH 45215
Build 90 Col K1.5 cube 1N152
M/D H110 513-243-2366
Dial Comm *332-2366




-----Original Message-----
From: xansys-bounces@xansys.org [mailto:xansys-bounces@xansys.org] On Behalf Of umut.tabak
Sent: Thursday, March 07, 2013 8:41 AM
To: xansys@xansys.org
Subject: [Xansys] read the first element number in a selected element set

Dear all,

Is that possible to select the first element from a selected element set?

I am selecting a set depending on the type number with

esel, s, type, ,i

in a loop where i is the loop counter for the type number. Is that possible to read the element number of first element in this set for other processing options?

------------------------
Umut Tabak
Delft University of Technology
Precision and Microsystems Engineering
Engineering Dynamics
Mekelweg 2, Delft, The Netherlands






+-------------------------------------------------------------+
| XANSYS web - www.xansys.org/forum |
| The Online Community for users of ANSYS, Inc. Software |
| Hosted by PADT - www.padtinc.com |
| Send administrative requests to xansys-mod@tynecomp.co.uk |
+-------------------------------------------------------------+

Post generated using Mail2Forum (http://www.mail2forum.com)
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    XANSYS Forum Index -> XANSYS
All times are GMT - 7 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

sleek template created by Andrew Charron