문제

I have a model of a heating process on Ansys Multiphysics, V11.

After running the simulation, I have a script to plot a temperature profile:

!---------------- POST PROCESSING -----------------------
/post1                          ! tdatabase  postprocessor

!---define profile temperature
path,s_temp1,2,,100             ! define a path
ppath,1,,dop/2,0,0              ! create a path point
ppath,2,,dop/2,1.5,0            ! create a path point
PDEF,surf_t1,TEMP, ,noav        ! print a path

plpath,surf_t1                  ! plot a path

What I now need, is to save the resulting path in a text file. I have already looked online for a solution, and found the following code to do it, which I appended after the lines above:

/OUTPUT,filename,extension
PRPATH,surf_t1
/OUTPUT

Ansys generates the file filename.extension but it is empty. I tried to place the OUTPUT command in a few locations in the script, but without any success.

I suspect I need to define something else, but I have no idea where to look, as Ansys documentation online is terribly chaotic, and all internet pages I've opened before writing this question are not better.

A final note: Ansys V11 is an old version of the software, but I don't want to upgrade it and fit the old model to the new software.

도움이 되었습니까?

해결책

For the output of the simulation (which includes all calculation steps, and sub-steps description and node-by-node results) the output must be declared in the beginning of the code, and not in the postprocessing phase.

Declaring

/OUTPUT,filename,extension

in the preamble of the main script makes such that the output is stored in the right location, with the desired extension. At the end of the scripts, you must then declare

/OUTPUT

to reset the output file location for ANSYS.

The output to the PATH call made in the postprocessing script is however not printed in the file.

다른 팁

It is convenient to use

*CFOPEN,file,ext
*VWRITE,Vector(1,1).Vector(1,2)
(2F12.6)
*CFCLOSE

where Vector(1,1) is a two column array created by *DIM, and stores your data to output to file As this is a special command, run it from file i.e. macro_output.mac

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top