• This forum is the machine-generated translation of www.cad3d.it/forum1 - the Italian design community. Several terms are not translated correctly.

export to excel

  • Thread starter Thread starter folle76
  • Start date Start date

folle76

Guest
Hello.
I have to interface with ansys version workbench 13.0 to make a basic processing. it is possible to extract from the post-processor an excel file that contains the following columns:
1) element number
2) element volume
3) voltage value for that element.
Thank you very much.
 
the answer is yes, but there are "but".
1-export you can do it in a properly formatted text file that then you can import into excel
2-It will need to write a macro in apdl in the postprocessor environment

Maybe today I have a few minutes to think about it and send you some advice, okay?
 
in the postprocessor part you have to insert a "command snippet".
then make a copy-paste of the commands below
Code:
!creo an element table with the volume of the elements
avprin,0,
etable,volume,volu,
!creo an element table with equivalent stress for each element
avprin,0,
etable,streqv,s,eqv
Reverse in two arrays the value of the newly created two element tables
*vget,volume,elem,1,etab,volume, ,2
*vget,stress,elem,1,etab,streqv, ,2
!write on pippo.txt i 3 arrays, the first contains the element number
!the second volume, the third stress
*cfopen,'pippo,'txt,'
*vwrite,sequ,volume(1,1),stress(1,1)
(f5.0, f10.5, f10.5)
*cfclos
!note that the values are separated by a comma, in excel it amounts them as ".csv"
reopen the simulation and it should work.
then you will need to search for the file "pippo.txt" in the structure of the project directories.
 
ciao! hanno fatto come hai detto ma hanno ottenuto questi risultati:

calculate nodal principal values from element component
values averaged at each node

store volume from item=volu for all selected elements

*** warning *** cp = 4.524 time= 20:19:17
item volu has not been stored in the database. the etable command is
ignored.

calculate nodal principal values from element component
values averaged at each node

store streqv from item=s comp=eqv for all selected elements

*** warning *** cp = 4.524 time= 20:19:17
the requested s data is not available. the etable command is ignored.

vector get operation volume vector length= 7900
name= elem 1 etab volume
itlvl= 2

*** error *** cp = 4.524 time= 20:19:17
label volume not recognized.


number of warning messages encountered= 4
number of error messages encountered= 1

saresti in grado di darmi una mano? grazie ancora!
 
test so
Code:
Allsel,all
set,last
!creo an element table with the volume of the elements
avprin,0,
etable,volume,volu,
!creo an element table with equivalent stress for each element
avprin,0,
etable,streqv,s,eqv
Reverse in two arrays the value of the newly created two element tables
*vget,volume,elem,1,etab,volume, ,2
*vget,stress,elem,1,etab,streqv, ,2
!write on pippo.txt i 3 arrays, the first contains the element number
!the second volume, the third stress
*cfopen,'pippoaa,'txt,'
*vwwrite
(article , volume , stress )
*vwrite,sequ,volume(1,1),stress(1,1)
(f10.0, f12.5, f12.5)
*cfclos
!note that the values are separated by a comma, in excel it amounts them as ".csv"
 
It works! I'll kick you one last time. look at this list:

Allsel,all
set,last
!creo an element table with the volume of the elements
avprin,0,
etable,volume,volu,
!creo an element table with equivalent stress for each element
avprin,0,
etable,streqv,s,eqv
!creo an element table with equivalent stress for each element
avprin,0,
etable,x,cent,x
Reverse in two arrays the value of the newly created two element tables
*vget,volume,elem,1,etab,volume, ,2
*vget,stress,elem,1,etab,streqv, ,2
*vget,x,elem,1,etab,x,2
!write on pippo.txt i 3 arrays, the first contains the element number
!the second volume, the third stress
*cfopen,'pippoaa,'txt,'
*vwwrite
(' element , volume , stress ', 'x' )
*vwrite,sequ,volume(1,1),stress(1,1),x(1,1)
(f10.0,',f30.18,',f30.18,',',f30.18)
*cfclos

cent.x gives me the "center" of the element compared to the absolute coordinate system? If so, then we're good. I hope I can return the favor one day. If you need some vba, I'm here! No, huh? I think you know better than me...
 
etable,x,cent,x
it returns to "x" the x coordinate (nb in the active coordinate system, normally the general Cartesian, but it is not said) of the element's center of gravity indeformed configuration. So be careful!

Vba? for me now is a distant memory, along with the fortran... But if I needed to know who to call!
 

Forum statistics

Threads
44,997
Messages
339,767
Members
4
Latest member
ibt

Members online

No members online now.
ciao
Back
Top