Save Results automatically by APDL Command
2 Attachment(s)
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 |
same question over here. Anybody knows the answer? I want to export automatically the frequency response for several nodal points.
|
All times are GMT -4. The time now is 05:35. |