XANSYS Forum Index
    Register    

FAQ    Search    Memberlist    Usergroups    SmartFeedSmartFeed    Profile    Log in
get/vget element data(area,stress,strain) to array
 
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
andreas.talmon
User


Joined: 15 Nov 2011
Posts: 44

PostPosted: Tue Jan 24, 2012 1:43 am  Reply with quote

Hi all

Is there an elegant way of retrieving element data of the selected set of elements to an array. I am interested in the element area, the stress components and the strain components. I already had a look at the following commands:

*vget
*get
etable
esol

Unfortunately I couldn't think of a nice way how to get the results to an array. I am thankful for any ideas or experiences to share?


Thanks for help,

Andreas Talmon l'Armée
Fraunhofer Institut Darmstadt
64295 Darmstadt
Germany






--


Besuchen Sie uns - please meet us:

"Antrieb Zukunft" - interaktive Ausstellung im Fraunhofer LBF, Darmstadt, www.lbf.fraunhofer.de/antrieb-zukunft <http://www.lbf.fraunhofer.de/antrieb-zukunft>
Leichtbau-Konferenz der Fraunhofer Allianz Leichtbau, Darmstadt, 31.01.-1.02.2012
AMA Seminar "Schwingungsmesstechnik und -analyse", Darmstadt, 6.03.2012
DAGA 2012 - 38. Jahrestagung für Akustik, Darmstadt, 19.-22.03.2012

Mehr Infos - further information: www.lbf.fraunhofer.de/veranstaltungen

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


Joined: 16 Sep 2011
Posts: 55

PostPosted: Tue Jan 24, 2012 2:41 am  Reply with quote

Well you definitely can use the *get command to extract all the stress and strain tensors. You can select al the elements you are interested in and select all the nodes associated with them and use something similar to the example below. I dont know if this is the most elegant, but it works. Also you can add formating commands if you want.

Concerning the area of the elements you can use the *get if you have area elements. If you have 3D elements, you can create a surface mesh (using say surf154 elements) on the exterior of your 3D mesh and then use the *get command to calculate the area. Again, I am not saying this is the best way, but I just thought about this and it should work! Of course it would require some coding on your part.

!Create array that will contain the stresses
*dim,ns,array,10,4
!
*do,i,1,10
ns(i,1)=i !Collumn 1 is node #
*get,ns(i,2),node,ns(i,1),s,x !Collumn 2 is can be Sx
*get,ns(i,3),node,ns(i,1),s,y !Collumn 2 is can be Sy
*get,ns(i,4),node,ns(i,1),s,z !Collumn 2 is can be Sz
!add other stress components
*Enddo
!
*cfopen,I_love_FEA,txt !Create file
!
*do,i,1,10
*CFWRITE,node,ns(i,1),ns(i,2),ns(i,3),ns(i,4)
*Enddo
!
*cfclos
_________________
Andreas Goumas

Structural Engineer
Rolls-Royce Deutschland Ltd
Back to top
View user's profile Send private message
andreas.talmon
User


Joined: 15 Nov 2011
Posts: 44

PostPosted: Tue Jan 24, 2012 3:02 am  Reply with quote

Hi thanks for your reply,
Here is my solution up to now:


esel,s,mat,,3
eplot

*del,EMASK ! Delete NMASK array, if it exists
*del,EARRAY ! Delete NARRAY array, if it exists
*GET, numberofelements, element, 0, count,
*dim,EMASK,array,enummax ! Define NMASK array
*dim,EARRAY,array,numberofelements,8! Define NARRAY array to hold results

*vget,EMASK,elem,1,esel ! Get status of selected nodes

*vmask,EMASK(1) ! Use NMASK as masking array

*VGET, EARRAY(1,8), elem,, elist,

etable,volu,volu,
etable,stressx,s,x
etable,stressy,s,y
etable,stressxy,s,xy
etable,eptox,epto,x
etable,eptoy,epto,y
etable,eptoxy,epto,xy

*do,i1,1,numberofelements
*GET,earray(i1,1), ETAB, 1,elem, earray(i1,8)
*GET,earray(i1,2), ETAB, 2,elem, earray(i1,8)
*GET,earray(i1,3), ETAB, 3,elem, earray(i1,8)
*GET,earray(i1,4), ETAB, 4,elem, earray(i1,8)
*GET,earray(i1,5), ETAB, 5,elem, earray(i1,8)
*GET,earray(i1,6), ETAB, 6,elem, earray(i1,8)
*GET,earray(i1,7), ETAB, 7,elem, earray(i1,8)
*enddo




Thanks for the help,

Andreas Talmon l'Armée
Fraunhofer Institut Darmstadt
64295 Darmstadt
Germany



-----Ursprüngliche Nachricht-----
Von: xansys-bounces@xansys.org [mailto:xansys-bounces@xansys.org] Im Auftrag von andreas.goumas
Gesendet: Dienstag, 24. Januar 2012 10:42
An: xansys@xansys.org
Betreff: Re: [Xansys] get/vget element data(area,stress,strain) to array

Well you definitely can use the *get command to extract all the stress and strain tensors. You can select al the elements you are interested in and select all the nodes associated with them and use something similar to the example below. I dont know if this is the most elegant, but it works. Also you can add formating commands if you want.

Concerning the area of the elements you can use the *get if you have area elements. If you have 3D elements, you can create a surface mesh (using say surf154 elements) on the exterior of your 3D mesh and then use the *get command to calculate the area. Again, I am not saying this is the best way, but I just thought about this and it should work! Of course it would require some coding on your part.

!Create array that will contain the stresses
*dim,ns,array,10,4
!
*do,i,1,10
ns(i,1)=i !Collumn 1 is node #
*get,ns(i,2),node,ns(i,1),s,x !Collumn 2 is can be Sx
*get,ns(i,3),node,ns(i,1),s,y !Collumn 2 is can be Sy
*get,ns(i,4),node,ns(i,1),s,z !Collumn 2 is can be Sz
!add other stress components
*Enddo
!
*cfopen,I_love_FEA,txt !Create file
!
*do,i,1,10
*CFWRITE,node,ns(i,1),ns(i,2),ns(i,3),ns(i,4)
*Enddo
!
*cfclos

------------------------
Andreas Goumas

Structural Engineer
Rolls-Royce Deutschland Ltd






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




--


Besuchen Sie uns - please meet us:

"Antrieb Zukunft" - interaktive Ausstellung im Fraunhofer LBF, Darmstadt, www.lbf.fraunhofer.de/antrieb-zukunft <http://www.lbf.fraunhofer.de/antrieb-zukunft>
Leichtbau-Konferenz der Fraunhofer Allianz Leichtbau, Darmstadt, 31.01.-1.02.2012
AMA Seminar "Schwingungsmesstechnik und -analyse", Darmstadt, 6.03.2012
DAGA 2012 - 38. Jahrestagung für Akustik, Darmstadt, 19.-22.03.2012

Mehr Infos - further information: www.lbf.fraunhofer.de/veranstaltungen

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


Joined: 10 Nov 2008
Posts: 27

PostPosted: Tue Jan 24, 2012 9:41 am  Reply with quote

Andreas,

You might consider the ETAB label on the *VGET command to move etable items to arrays.


Best regards,
Dean Brown
Principal Engineer
Microvision, Inc.
USA
www.microvision.com


-----Original Message-----
From: xansys-bounces@xansys.org [mailto:xansys-bounces@xansys.org] On Behalf Of Talmon, Andreas
Sent: Tuesday, January 24, 2012 2:03 AM
To: ANSYS User Discussion List
Subject: Re: [Xansys] get/vget element data(area,stress,strain) to array

Hi thanks for your reply,
Here is my solution up to now:


esel,s,mat,,3
eplot

*del,EMASK ! Delete NMASK array, if it exists
*del,EARRAY ! Delete NARRAY array, if it exists
*GET, numberofelements, element, 0, count,
*dim,EMASK,array,enummax ! Define NMASK array
*dim,EARRAY,array,numberofelements,8! Define NARRAY array to hold results

*vget,EMASK,elem,1,esel ! Get status of selected nodes

*vmask,EMASK(1) ! Use NMASK as masking array

*VGET, EARRAY(1,8), elem,, elist,

etable,volu,volu,
etable,stressx,s,x
etable,stressy,s,y
etable,stressxy,s,xy
etable,eptox,epto,x
etable,eptoy,epto,y
etable,eptoxy,epto,xy

*do,i1,1,numberofelements
*GET,earray(i1,1), ETAB, 1,elem, earray(i1,8)
*GET,earray(i1,2), ETAB, 2,elem, earray(i1,8)
*GET,earray(i1,3), ETAB, 3,elem, earray(i1,8)
*GET,earray(i1,4), ETAB, 4,elem, earray(i1,8)
*GET,earray(i1,5), ETAB, 5,elem, earray(i1,8)
*GET,earray(i1,6), ETAB, 6,elem, earray(i1,8)
*GET,earray(i1,7), ETAB, 7,elem, earray(i1,8)
*enddo




Thanks for the help,

Andreas Talmon l'Armée
Fraunhofer Institut Darmstadt
64295 Darmstadt
Germany



-----Ursprüngliche Nachricht-----
Von: xansys-bounces@xansys.org [mailto:xansys-bounces@xansys.org] Im Auftrag von andreas.goumas
Gesendet: Dienstag, 24. Januar 2012 10:42
An: xansys@xansys.org
Betreff: Re: [Xansys] get/vget element data(area,stress,strain) to array

Well you definitely can use the *get command to extract all the stress and strain tensors. You can select al the elements you are interested in and select all the nodes associated with them and use something similar to the example below. I dont know if this is the most elegant, but it works. Also you can add formating commands if you want.

Concerning the area of the elements you can use the *get if you have area elements. If you have 3D elements, you can create a surface mesh (using say surf154 elements) on the exterior of your 3D mesh and then use the *get command to calculate the area. Again, I am not saying this is the best way, but I just thought about this and it should work! Of course it would require some coding on your part.

!Create array that will contain the stresses
*dim,ns,array,10,4
!
*do,i,1,10
ns(i,1)=i !Collumn 1 is node #
*get,ns(i,2),node,ns(i,1),s,x !Collumn 2 is can be Sx
*get,ns(i,3),node,ns(i,1),s,y !Collumn 2 is can be Sy
*get,ns(i,4),node,ns(i,1),s,z !Collumn 2 is can be Sz
!add other stress components
*Enddo
!
*cfopen,I_love_FEA,txt !Create file
!
*do,i,1,10
*CFWRITE,node,ns(i,1),ns(i,2),ns(i,3),ns(i,4)
*Enddo
!
*cfclos

------------------------
Andreas Goumas

Structural Engineer
Rolls-Royce Deutschland Ltd






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




--


Besuchen Sie uns - please meet us:

"Antrieb Zukunft" - interaktive Ausstellung im Fraunhofer LBF, Darmstadt, www.lbf.fraunhofer.de/antrieb-zukunft <http://www.lbf.fraunhofer.de/antrieb-zukunft>
Leichtbau-Konferenz der Fraunhofer Allianz Leichtbau, Darmstadt, 31.01.-1.02.2012
AMA Seminar "Schwingungsmesstechnik und -analyse", Darmstadt, 6.03.2012
DAGA 2012 - 38. Jahrestagung für Akustik, Darmstadt, 19.-22.03.2012

Mehr Infos - further information: www.lbf.fraunhofer.de/veranstaltungen

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


________________________________

CONFIDENTIAL OR PROPRIETARY COMMUNICATION: This message (including any attachments) is for the sole use of the intended recipient and is assumed to contain confidential or proprietary information of Microvision, Inc. Review, publication, use or distribution of this message, in whole or in part, by an unintended recipient is prohibited and may be a violation of law. If you are not the intended recipient, please contact the sender by reply e-mail and delete this e-mail and any copies.

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