XANSYS Forum Index
    Register    

FAQ    Search    Memberlist    Usergroups    SmartFeedSmartFeed    Profile    Log in
[Xansys] Struct: how to extract eigenvalue/eigenvectors from
 
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
Milot, Timothy
Guest





PostPosted: Mon Aug 30, 2004 4:10 pm  Reply with quote

Hello all,

We are working on a fluid structure interaction using ANSYS and Acusolve.
We are trying to get eigenvalues and eigenvectors from the ANSYS modal
results to import to Acusolve. How can we write these values to tabular
format, and/or do they already exist in the RST file?

Alternatively, how can we convert an Ansys .rst (and .db) file to I-Deas
Universal file, including the mesh (coordinates and connectivity) and the
eigenvalue and eigenvector solutions.


Tim Milot
Mechanical Engineer
50/14/B88
* Tel: (415) 768-5534
* Fax: (415) 768-5511
* Email: --email address suppressed--

Post generated using Mail2Forum (http://www.mail2forum.com)
Back to top
Barry O'Donnell
Guest





PostPosted: Tue Aug 31, 2004 12:02 am  Reply with quote

Hi,

Yhe information you require is (or used to be) stored in the jobnmae.mode
file. You can easily verfiy this by running a simple beam element model and
using the dump command to view the contents of this file. I think record 4
is the eigenvalues and record 8 is the eigenvectors.
Check out the various facilities in the customise directory whcih can
extract information from the results file for output to a 3rd party
application.

Regards

Barry


---------------------------
Barry O'Donnell (ODCS Ltd.)
T/F: 028 8775 0263
E: --email address suppressed--

Post generated using Mail2Forum (http://www.mail2forum.com)
Back to top
Christopher Wright
Guest





PostPosted: Tue Aug 31, 2004 8:15 am  Reply with quote

On Aug 31, 2004, at 2:04 AM, Barry O'Donnell wrote:

> You can easily verfiy this by running a simple beam element model and
> using the dump command to view the contents of this file. I think
> record 4
> is the eigenvalues and record 8 is the eigenvectors.
All this stuff is in the output file, including the useful stuff like
participation factors and mode coefficients. You can also use *GET
statements if you're only interested in the most recent excitation
direction. Probably it's in the summaries you can access with the POST1
SET, statement, too.

You'd be amazed at all the useful stuff in the output listing. Error
messages, explanations of exactly how PREP7 executed your commands,
memory requirements, even <gasp> tabular results. If this list had a
toggle that bounced posts made before looking in the output listing,
the traffic would be cut in half.

Christopher Wright P.E. |"They couldn't hit an elephant at
--email address suppressed-- | this distance" (last words of Gen.
.............................................| John Sedgwick,
Spotsylvania 1864)
http://www.skypoint.com/~chrisw

Post generated using Mail2Forum (http://www.mail2forum.com)
Back to top
Barry O'Donnell
Guest





PostPosted: Tue Aug 31, 2004 8:27 am  Reply with quote

Hi Chris,

Its a fair point wrt the output file and simple APDL commands. However, for
cases such as conversion of results files from Ansys to an in-house FE
package, APDL proved far too inefficient for my purposes. I guess if model
sizes are small or the required data is limited to a subset of the results
APDL might provide a good alternative, however it has its limitation (namely
execution speed) even with the vector based operations.

Regards

Barry


---------------------------
Barry O'Donnell (ODCS Ltd.)
T/F: 028 8775 0263
E: --email address suppressed--

Post generated using Mail2Forum (http://www.mail2forum.com)
Back to top
Christopher Wright
Guest





PostPosted: Tue Aug 31, 2004 9:13 am  Reply with quote

On Aug 31, 2004, at 10:29 AM, Barry O'Donnell wrote:

> However, for
> cases such as conversion of results files from Ansys to an in-house FE
> package,
I probably wasn't paying attention. You might still have some luck if
you were to request eigenvector print-out and divert the results to an
auxiliary file (/OUT,...) in the output phase.

Christopher Wright P.E. |"They couldn't hit an elephant at
--email address suppressed-- | this distance" (last words of Gen.
.............................................| John Sedgwick,
Spotsylvania 1864)
http://www.skypoint.com/~chrisw

Post generated using Mail2Forum (http://www.mail2forum.com)
Back to top
eric.miller
Site Admin


Joined: 15 Aug 2008
Posts: 930
Location: Tempe, AZ

PostPosted: Tue Aug 31, 2004 10:13 pm  Reply with quote

Dear all,

Here is a modification of some macros we have used for other things that
have been changed for this particular application. I thought others
might find it interesting. It is a good example of how to get
eigenvectors and eigenvalues when all you have is an RST file. It also
writes out nodes and elements. If you are new to APDL it is also a
typical example of how to use a combination of *vgets, *vmask and
*vwrite to get large amounts of data and write it out to a file real
quick

Eric

------------------------------------------------------------------------
-
Eric Miller
Director: Support,
Training & Development
Phoenix Analysis &
Design Technologies
(480) 813-4884, x103
www.padtinc.com



!-----------------------------------------------------------------------
!
! PADT ----------------------------------------------------------------
! Phoenix Analysis &
! Design Technologies
!
!-----------------------------------------------------------------------
-
! www.padtinc.com 1-800-293-PADT
!-----------------------------------------------------------------------
-
!
! WRTACUSIM
!
! ANSYS Macro to write modal and mesh info for acusim
!
! Arguments: None
! Change filename values as wanted
! Execute from /post1 with a valid rst file
!
! 8/31/04 Eric Miller --email address suppressed--
!
!-----------------------------------------------------------------------
-
!
/nopr
efile = 'elems.dat'
nfile = 'nodes.dat'
mfilpre = 'mode'
mfilpst = 'dat'

/post1 ! Make sure you are in the post processor
set,last ! Go to the last mode
allsel ! Make sure everything is selected
*get,lsbst,active,,set,sbst ! Get the number of the last mode
*get,mxnd,node,,num,max ! Get the max node number
*get,mxel,elem,,num,max ! Get the max element number


*dim,igvct,,mxnd,4 ! Make an array for storring eigenvectors
*dim,nmsk,,mxnd ! Make the node mask array
*dim,nds,,mxnd,4 ! Make the node array
*dim,elms,,mxel,5 ! Make the element array
*dim,emsk,,mxel ! Make the element mask array

*vfill,igvct(1,1),ramp,1,1 ! Fill igvct first column with node numbers
*vfill,nds(1,1),ramp,1,1 ! Fill nds first column with node numbers
*vfill,elms(1,1),ramp,1,1 ! Fill elms first column with elem numbers
*vget,nmsk(1),node,1,nsel ! Figure out what is selected: creates mask
*vget,emsk(1),elem,1,esel ! Figure out what is selected: creates mask

*vmask,nmsk(1) ! Mask on selected nodes
*vget,nds(1,2),node,1,loc,x ! Get node x
*vmask,nmsk(1)
*vget,nds(1,3),node,1,loc,y ! Get node y
*vmask,nmsk(1)
*vget,nds(1,4),node,1,loc,z ! Get node z

*cfopen,%nfile% ! Open that node file up
*vmask,nmsk(1) ! Mask on selection
*vwrite,nds(1,1),nds(1,2),nds(1,3),nds(1,4) ! Write numb,x,y,z
%10d %16.9g %16.9g %16.9g
*cfclose ! close
*msg,,nfile
--- Nodes written to %s

*vmask,emsk(1) ! Same for elements
*vget,elms(1,2),elem,1,node,1
*vmask,emsk(1)
*vget,elms(1,3),elem,1,node,2
*vmask,emsk(1)
*vget,elms(1,4),elem,1,node,3
*vmask,emsk(1)
*vget,elms(1,5),elem,1,node,4

*cfopen,%efile%
*vmask,emsk(1)
*vwrite,elms(1,1),elms(1,2),elms(1,3),elms(1,4),elms(1,5)
%10d %10d %10d %10d %10d
*cfclose
*msg,,efile
--- Elements written to %s

*do,i,1,lsbst ! Loop on each solved mode
set,1,i ! Open the mode
*get,frq,active,,set,freq ! Get the frequency
*vmask,nmsk(1) ! Turn on the mask
*vget,igvct(1,2),node,1,u,x ! Get X Values
*vmask,nmsk(1)
*vget,igvct(1,3),node,1,u,y ! Get Y Values
*vmask,nmsk(1)
*vget,igvct(1,4),node,1,u,z ! Get Z Values

*if,i,lt,10,then !Open up a file for each
mode
*cfopen,%mfilpre%0%i%.%mfilpst%
*else
*cfopen,%mfilpre%%i%.%mfilpst%
*endif
*vwrite,i,frq, ! write the mode number and freq
(F10.4,F10.4)
*vmask,nmsk(1) ! Mask back on
*vwrite,igvct(1,1),igvct(1,2),igvct(1,3),igvct(1,4) !Write vectros
%16.9g %16.9g %16.9g %16.9g
*cfclose ! Close the output file
*msg,,i,frq
--- Mode %d, %10.2F Hz written
*enddo ! End loop on modes
!------------- Cleanup variables

igvct=
nmsk=
lsbst=
frq=
efile=
elms=
emsk=
i=
mfilpre=
mfilpst=
mxel=
mxnd=
nds=
nfile=
*msg,,
--- Done
/go

Post generated using Mail2Forum (http://www.mail2forum.com)
_________________
Eric Miller
Principal
Director, Analysis &
Design Technologies
Phoenix Analysis & Design Technologies
www.padtinc.com
Back to top
View user's profile Send private message Visit poster's website
eric.miller
Site Admin


Joined: 15 Aug 2008
Posts: 930
Location: Tempe, AZ

PostPosted: Wed Sep 01, 2004 8:01 am  Reply with quote

I forgot to point out one obvious thing that I always forget.
If you want eigenvectors from a Modal analysis, you need to make sure
that you normalize the results to the mass matrix. If you do so, the
values stored in the displacements are the actual Eigenvectors.

Eric


------------------------------------------------------------------------
---
Eric Miller
Principal
Director Training, Support
and Software Development
Phoenix Analysis & Design Technologies
www.padtinc.com
(480) 813-4884 x103

-----Original Message-----
From: --email address suppressed-- [mailto:--email address suppressed--] On
Behalf Of Eric Miller
Sent: Tuesday, August 31, 2004 10:14 PM
To: ANSYS User Discussion List
Subject: RE: [Xansys] Struct: how to extract eigenvalue/eigenvectors
fromANSYSDB or conversion to Ideas

Dear all,

Here is a modification of some macros we have used for other things that
have been changed for this particular application. I thought others
might find it interesting. It is a good example of how to get
eigenvectors and eigenvalues when all you have is an RST file. It also
writes out nodes and elements. If you are new to APDL it is also a
typical example of how to use a combination of *vgets, *vmask and
*vwrite to get large amounts of data and write it out to a file real
quick

Eric

------------------------------------------------------------------------
-
Eric Miller
Director: Support,
Training & Development
Phoenix Analysis &
Design Technologies
(480) 813-4884, x103
www.padtinc.com



!-----------------------------------------------------------------------
!
! PADT ----------------------------------------------------------------
! Phoenix Analysis &
! Design Technologies
!
!-----------------------------------------------------------------------
-
! www.padtinc.com 1-800-293-PADT
!-----------------------------------------------------------------------
-
!
! WRTACUSIM
!
! ANSYS Macro to write modal and mesh info for acusim
!
! Arguments: None
! Change filename values as wanted
! Execute from /post1 with a valid rst file
!
! 8/31/04 Eric Miller --email address suppressed--
!
!-----------------------------------------------------------------------
-
!
/nopr
efile = 'elems.dat'
nfile = 'nodes.dat'
mfilpre = 'mode'
mfilpst = 'dat'

/post1 ! Make sure you are in the post processor
set,last ! Go to the last mode
allsel ! Make sure everything is selected
*get,lsbst,active,,set,sbst ! Get the number of the last mode
*get,mxnd,node,,num,max ! Get the max node number
*get,mxel,elem,,num,max ! Get the max element number


*dim,igvct,,mxnd,4 ! Make an array for storring eigenvectors
*dim,nmsk,,mxnd ! Make the node mask array
*dim,nds,,mxnd,4 ! Make the node array
*dim,elms,,mxel,5 ! Make the element array
*dim,emsk,,mxel ! Make the element mask array

*vfill,igvct(1,1),ramp,1,1 ! Fill igvct first column with node numbers
*vfill,nds(1,1),ramp,1,1 ! Fill nds first column with node numbers
*vfill,elms(1,1),ramp,1,1 ! Fill elms first column with elem numbers
*vget,nmsk(1),node,1,nsel ! Figure out what is selected: creates mask
*vget,emsk(1),elem,1,esel ! Figure out what is selected: creates mask

*vmask,nmsk(1) ! Mask on selected nodes
*vget,nds(1,2),node,1,loc,x ! Get node x
*vmask,nmsk(1)
*vget,nds(1,3),node,1,loc,y ! Get node y
*vmask,nmsk(1)
*vget,nds(1,4),node,1,loc,z ! Get node z

*cfopen,%nfile% ! Open that node file up
*vmask,nmsk(1) ! Mask on selection
*vwrite,nds(1,1),nds(1,2),nds(1,3),nds(1,4) ! Write numb,x,y,z
%10d %16.9g %16.9g %16.9g
*cfclose ! close
*msg,,nfile
--- Nodes written to %s

*vmask,emsk(1) ! Same for elements
*vget,elms(1,2),elem,1,node,1
*vmask,emsk(1)
*vget,elms(1,3),elem,1,node,2
*vmask,emsk(1)
*vget,elms(1,4),elem,1,node,3
*vmask,emsk(1)
*vget,elms(1,5),elem,1,node,4

*cfopen,%efile%
*vmask,emsk(1)
*vwrite,elms(1,1),elms(1,2),elms(1,3),elms(1,4),elms(1,5)
%10d %10d %10d %10d %10d
*cfclose
*msg,,efile
--- Elements written to %s

*do,i,1,lsbst ! Loop on each solved mode
set,1,i ! Open the mode
*get,frq,active,,set,freq ! Get the frequency
*vmask,nmsk(1) ! Turn on the mask
*vget,igvct(1,2),node,1,u,x ! Get X Values
*vmask,nmsk(1)
*vget,igvct(1,3),node,1,u,y ! Get Y Values
*vmask,nmsk(1)
*vget,igvct(1,4),node,1,u,z ! Get Z Values

*if,i,lt,10,then !Open up a file for each
mode
*cfopen,%mfilpre%0%i%.%mfilpst%
*else
*cfopen,%mfilpre%%i%.%mfilpst%
*endif
*vwrite,i,frq, ! write the mode number and freq
(F10.4,F10.4)
*vmask,nmsk(1) ! Mask back on
*vwrite,igvct(1,1),igvct(1,2),igvct(1,3),igvct(1,4) !Write vectros
%16.9g %16.9g %16.9g %16.9g
*cfclose ! Close the output file
*msg,,i,frq
--- Mode %d, %10.2F Hz written
*enddo ! End loop on modes
!------------- Cleanup variables

igvct=
nmsk=
lsbst=
frq=
efile=
elms=
emsk=
i=
mfilpre=
mfilpst=
mxel=
mxnd=
nds=
nfile=
*msg,,
--- Done
/go

Post generated using Mail2Forum (http://www.mail2forum.com)
_________________
Eric Miller
Principal
Director, Analysis &
Design Technologies
Phoenix Analysis & Design Technologies
www.padtinc.com
Back to top
View user's profile Send private message Visit poster's website
Christopher Wright
Guest





PostPosted: Wed Sep 01, 2004 8:50 am  Reply with quote

On Sep 1, 2004, at 9:58 AM, Eric Miller wrote:

> If you do so, the
> values stored in the displacements are the actual Eigenvectors.
>
However, the converse is untrue--the actual displacements are *not*
stored in the eigenvectors. ;->

Christopher Wright P.E. |"They couldn't hit an elephant at
--email address suppressed-- | this distance" (last words of Gen.
.............................................| John Sedgwick,
Spotsylvania 1864)
http://www.skypoint.com/~chrisw

Post generated using Mail2Forum (http://www.mail2forum.com)
Back to top
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