Export text file of an harmonic analysis using APDL

  • 25 Views
  • Last Post 31 July 2019
  • Topic Is Solved
jordimarce posted this 30 July 2019

Hi, I need to write my frequency response results (deformation, velocity, phase, for example) in a text file. I can write thew array for each substep and include the frequency of each substep and the displacement in the freuqency range. But I did not find how to include the respective velocity or the phase in the array. (I include the code I am using, which works). 

/post1

*set,last

*get,freq_count,active,,set,sbst

*dim,freq_array,ARRAY,freq_count,2

*do,ii,1,freq_count     

   SET,1,ii    

   *GET,temp_b,ACTIVE,0,SET,FREQ             

   freq_array(ii,1)=temp_b       

   cmsel,s,MY_KEYPOINT   

   *get,node_id,NODE,0,num,max     

   *get,displ,NODE,node_id,U,sum     

   freq_array(ii,2)=displ

*enddo

 

*cfopen,'myharmonic','txt'

*vwrite,'Freq','displ'

(A8,X,A8)

*vwrite,freq_array(1,1),freq_array(1,2)

(F6.0,X,F10.2)

*cfclos

jj77 posted this 31 July 2019

The velocity is simple. Multiply displacements with frequency array and time it with 2*pi. That is because velocity is angular frequency times displacement.

For the phase have a look at plcplx commands and search for examples.

https://books.google.co.uk/books?id=o9K-q9G6pgIC&pg=PA99&lpg=PA99&dq=plcplx+and+/output+and+ansys&source=bl&ots=pSc04cIwgM&sig=ACfU3U3axpySQD2zFjgVJp3llMSRuSIcTA&hl=en&sa=X&ved=2ahUKEwjI9vO0ud7jAhWIUcAKHT1OBX4Q6AEwGHoECAkQAQ#v=onepage&q=plcplx%20and%20%2Foutput%20and%20ansys&f=false

  • Liked by
  • jordimarce
Close