Ansys Assistant will be unavailable on the Learning Forum starting January 30. An upgraded version is coming soon. We apologize for any inconvenience and appreciate your patience. Stay tuned for updates.

Ansys Learning Forum Forums Discuss Simulation General Mechanical How to write an array to text file ? Reply To: How to write an array to text file ?

Md_Salem
Subscriber

I solved the first problem by using *MWRITE command after the DO loop and it worked properly.

Still the second problem for me : how to set parameter “my_energy” to the highest value of the steps :


*DIM,energy_array,ARRAY,10
/POST1
i=1

*DO, step, 1,19, 2
set,,,,,,,step ! store results for set step
ESEL,S,ENAME,,185
etable,energy,sene
ssum

*get,my_energy,ssum,,ITEM,energy
energy_array(i)= my_energy
ETABLE,CLEAR
ALLSEL
i=i+1
*ENDDO

*MWRITE,energy_array,C:\Users\MD\Desktop\ENERGIES,TXT
(F18.10)

Regads

[bingo_chatbox]