CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS

Save Results automatically by APDL Command

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 4, 2017, 09:14
Default Save Results automatically by APDL Command
  #1
New Member
 
Join Date: Jun 2017
Posts: 2
Rep Power: 0
ansyxyz is on a distinguished road
I run a parameterized simulation and I would like to save the results after the harmonic analysis of each Design Point as a table in an Excel file. The result parameters, which I want to export, are "frequency", "amplitude" and "phase angle". They are already shown in Ansys Workbench as a frequency diagram and also as a table (see attachment).

The name of the file to be saved should contain the current date and time or a number with iteration, otherwise the results of the parametric study would always overwrite itself.

I have already written a code, but I have following problems:
- I defined a fixed Node by it’s ID (here: 179778;see attachment) to get the results “amplitude” and “phase”. But I would like to get the results for a variable point, which should be defined before by a name.
- Moreover, I am not sure whether the code for the iteration of the name of the file is correct.


/title, threedof.inp, three dof vibration class model

! ***************** output frequencies *******************
/post1
/output,threedof,frq ! write out frequency list to ascii file .frq
set,list
/output,term ! returns output to terminal

!***************** output eigenvectors *********************
!define nodes for output
allsel
/output,threedof,eig ! write out eigenvectors to ascii file .eig
*do,i,1,3
set,,i
prdisp
*enddo
/output,term

/post26
threedof,,rfrq ! frequency response results
xvar,0 ! display versus frequency
lines,1000 ! specifies the length of a printed page for frequency response listing
Test1=179778 ! node ID of the point, where the force is applied
nsol,2,Test1,u,y,duy ! specifies nodal data to be stored in results file
! u - displacement, y direction
! note that nsol,1 is frequency vector

*dim,my_path,string,80
my_path(1) = 'c:\meinpfadzurdatei\''

*dim,iter_file_path,string,80
iter_file_path(1) = strcat(my_path(1),'my_iteration_file')

*vread,warten(1,1),%iter_file_path(1)%,'txt'
(f2.0)

/output,'threedof',chrval(warten(1,1)),dat
prcplx,1 ! stores phase angle in asci file .dat
prvar,2,3

/output,tmp
*dim,warten,array,1,1,1,,

warten(1,1) = warten(1,1)+1 ! increase iterator

*cfopen,strcat(my_path(1),'my_iteration_file'),'tx t'
*vwrite,1
(f2.0)
*cfclose
Attached Images
File Type: jpg Bild2.jpg (86.0 KB, 20 views)
File Type: jpg Bild3.jpg (186.9 KB, 16 views)
ansyxyz is offline   Reply With Quote

Old   June 5, 2018, 09:16
Default
  #2
New Member
 
Nick Verhoeven
Join Date: Jun 2018
Posts: 2
Rep Power: 0
0ldnick is on a distinguished road
same question over here. Anybody knows the answer? I want to export automatically the frequency response for several nodal points.
0ldnick is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Working directory via command line Luiz CFX 4 March 6, 2011 21:02
Problem of compilation OF 14Allwmake command not found erik_d OpenFOAM Bugs 13 September 13, 2008 22:45
How to save macro results in the output file? Peggy FLUENT 0 May 21, 2007 04:36
Help! How i save in a .txt some results? Toni Cominceanu Main CFD Forum 0 May 11, 2005 20:21
COMMAND -Multi-plot&store data sam FLUENT 0 August 22, 2002 04:59


All times are GMT -4. The time now is 02:50.