You can use the low-level routines described in Accessing ANSYS Binary Files to retrieve data from the results file. Alternatively, you can use the routines described in this section that retrieve the data specific to the format of the results file.
These files reside in the subdirectory \Program Files\ANSYS Inc\V182\ANSYS\customize\user (on Windows systems) or /ansys_inc/v182/ansys/customize/misc (on Linux systems). See Access Routines to Results, Substructure, and Matrix Files for information on compiling and linking these routines.
For each data record in the results file, routines exist that:
Read the record index and allocate space for the data. These are
named ResRd,
where recordBeginrecord is a descriptive name of the
record, e.g., ResRdNodeBegin
Read the data itself. These are named
ResRd,
e.g., recordResRdNode
Deallocate space for the data. These are named
ResRd,
e.g., recordEndResRdNodeEnd
Below is a complete listing of all the routines with the indentation indicating the required nested calling sequence:
function ResRdBegin (Nunit,Lunit,Fname,ncFname,Title,JobName,
subroutine ResRdGeomBegin (MaxType,MaxReal,MaxCsys)
subroutine ResRdTypeBegin (NumType)
function ResRdType (itype,ielc)
subroutine ResRdTypeEnd
subroutine ResRdRealBegin (NumReal,NumPerReal)
function ResRdReal (iReal,Rcon)
subroutine ResRdRealEnd
subroutine ResRdCsysBegin (NumCsys)
function ResRdCsys (iCsys,Csys)
subroutine ResRdCsysEnd
subroutine ResRdNodeBegin
function ResRdNode (iNode,xyzang)
subroutine ResRdNodeEnd
subroutine ResRdElemBegin
function ResRdElem (iElem,nodes,ElemData)
subroutine ResRdElemEnd
subroutine ResRdGeomEnd
subroutine ResRdSectMatBegin
subroutine ResRdSectBegin
function ResRdSect
subroutine ResRdSectEnd
subroutine ResRdMatBegin
function ResRdMat
subroutine ResRdMatEnd
subroutine ResRdSectMatEnd
function ResRdSolBegin (key,lstep,substep,ncumit,kcmplx,time,
subroutine ResRdDispBegin
function ResRdDisp (node,Disp)
subroutine ResRdDispEnd
subroutine ResRdRforBegin (nRForce)
function ResRdRfor (node,idof,value)
subroutine ResRdRforEnd
subroutine ResRdBCBegin (BCHeader)
subroutine ResRdFixBegin (BCHeader,nFixed)
function ResRdFix (node,idof,value)
subroutine ResRdFixEnd
subroutine ResRdForcBegin (BCHeader,nForces)
function ResRdForc (node,idof,value)
subroutine ResRdForcEnd
subroutine ResRdBCEnd
subroutine ResRdEresBegin
function ResRdEstrBegin (iElem)
function ResRdEstr (iStr,Str)
subroutine ResRdEstrEnd
subroutine ResRdEresEnd
subroutine ResRdSolEnd
subroutine ResRdEnd
These routines are contained in the file ResRd.F. See the demonstration routine ResRdDemo.F on the distribution medium for an example of the usage of these routines.
The memory allocation scheme is described in Memory Management Routines in Part II: Guide to User-Programmable Features.
The following sections describe the data-reading routines. See the file ResRd.F and its corresponding include deck ResRd.inc for listings of the corresponding Begin/End routines.
*deck,ResRdBegin
function ResRdBegin (Nunit, Lunit, Fname, ncFname, Title, JobName,
x Units, NumDOF, DOF, UserCode,
x MaxNode, NumNode, MaxElem, NumElem,
x MaxResultSet,NumResultSet)
c primary function: Open result file and return global information
c object/library: ResRd
c input arguments:
c Nunit (int,sc,in) - Fortran Unit number for file (ANSYS uses 12)
c Lunit (int,sc,in) - Current print output unit (usually 6 <STDOUT>)
c Fname (ch*(ncFname),sc,in) - The name (with extension) for the file
c ncFname (int,sc,in) - Number of characters in Fname
c output arguments:
c Title (ch*80,ar(2),out) - Title and First subtitle
c JobName (ch*32,sc,out) - Jobname from file
c Units (int,sc,out) - unit system
c = 0 - user defined units
c = 1 - SI
c = 2 - CSG
c = 3 - U.S. Customary, using feet
c = 4 - U.S. Customary, using inches
c = 5 - MKS
c = 6 - MPA
c = 7 - uMKS
c NumDOF (int,sc,out) - Number of DOF per node
c DOF (int,ar(*),out) - The DOFs per node
c UserCode (int,sc,out) - Code for this application
c MaxNode (int,sc,out) - Maximum node number used
c NumNode (int,sc,out) - Number of nodes attached to elements
c MaxElem (int,sc,out) - Maximum element number used
c NumElem (int,sc,out) - Number of elements used
c MaxResultSet (int,sc,out) - Maximum number of result sets (usually 1000)
c NumResultSet (int,sc,out) - Number of result sets on file
c ResRdBegin (int,sc,out) - 0, successful other, error in file open
*deck,ResRdGeomBegin
subroutine ResRdGeomBegin (MaxType, MaxReal, MaxCsys, nXYZ)
c primary function: Read Geometry Header Record
c object/library: ResRd
c input arguments: none
c output arguments:
c MaxType (int,sc,out) - Maximum element type
c MaxReal (int,sc,out) - Maximum real constant set number
c MaxCsys (int,sc,out) - Maximum coordinate system number
c nXYZ (int,sc,out) - number of nodes with coordinates
*deck,ResRdType
function ResRdType (itype,ielc)
c primary function: Read an element type record
c object/library: ResRd
c input arguments:
c itype (int,sc,on) - Element type number
c output arguments: none
c ielc (int,ar(IELCSZ),out)- Element characteristics
c ResRdType (int,sc,out - number of words read
*deck,ResRdReal
function ResRdReal (iReal,Rcon)
c primary function: Read real constant record
c object/library: ResRd
c input arguments:
c iReal (int,sc,in) - Real set number
c output arguments: none
c Rcon (dp,ar(ResRdReal),out) - Real Constants
c ResRdReal (int,sc,out) - Number of real constants in set
*deck,ResRdCsys
function ResRdCsys (iCsys,Csys)
c primary function: Read a coordinate system record
c object/library: ResRd
c input arguments:
c iCsys (int,sc,in) - Coordinate system number
c output arguments:
c Csys (dp,ar(ResRdCsys),out)- Coordinate system description
c ResRdCsys (int,sc,out) - Number of values
c output arguments:
*deck,ResRdNode
function ResRdNode (iNode,xyzang)
c primary function: Get a node
c object/library: ResRd
c input arguments:
c iNode (int,sc,in) - node sequence number
c (1 to nXYZnode)
c output arguments:
c xyzang (dp,ar(6),out) - x,y,z,thxy,thyz,thzx for node
c ResRdNode (int,sc,out) - Node number
*deck,ResRdElem
function ResRdElem (iElem, nodes, ElemData)
c primary function: Read an element
c object/library: ResRd
c input arguments:
c iElem (int,sc,in) - The element number
c output arguments:
c ResRdElem(int,sc,out) - Number of nodes
c nodes (int,ar(n),out) - Element nodes
c ElemData (int,ar(10),out) - Element information
c mat - material reference number
c type - element type number
c real - real constant reference number
c secnum - section number
c esys - element coordinate system
c death - death flag
c = 0 - alive
c = 1 - dead
c solidm - solid model reference
c shape - coded shape key
c elnum - element number
c pexcl - P-Method exclude key
*deck,ResRdSectMatBegin
subroutine ResRdSectMatBegin (MaxSect, MaxMat)
c primary function: Read maximum section and material number
c from the Geometry Header Record
c object/library: ResRd
c input arguments: none
c output arguments:
c MaxSect (int,sc,out) - Maximum section number
c MaxMat (int,sc,out) - Maximum material number
*deck,ResRdSect
function ResRdSect (iSect,SecData)
c primary function: Read section record
c object/library: ResRd
c input arguments:
c iSect (int,sc,in) - Section set number
c output arguments:
c SecData (dp,ar(ResRdSect),out) - Section data
c ResRdSect (int,sc,out) - Number of section data in set
*deck,ResRdMat
function ResRdMat (iMat,iprop,MatData)
c primary function: Read material record
c object/library: ResRd
c input arguments:
c iMat (int,sc,in) - Material set number
c iprop (int,sc,in) - Property reference number
c See mpinqr for details
c output arguments:
c MatData (dp,ar(ResRdMat),out) - Material data for type iprop
c ResRdMat (int,sc,out) - Number of material data in set
See mpinqr Function (Getting Information About a Material Property) for details on the property reference number (iprop).
*deck,ResRdSolBegin
function ResRdSolBegin (key,lstep,substep,ncumit,kcmplx,time,
x Title,DofLab)
c primary function: Read the solution header records
c object/library: ResRd
c input arguments:
c key (int,sc,in) - 0, find by set number
c 1, find by lstep/substep
c 2, find by ncumit
c 3, find by time
c lstep (int,sc,in/out) - Load step number
c if key=0, this is the set number
c substep (int,sc,in/out) - Substep of this load step
c ncumit (int,sc,in/out) - Cumulative iteration number
c kcmplx (int,sc,in) - 0, Real solution 1, Imaginary solution
c time (dp,sc,in/out) - Current solution time
c output arguments:
c Title (ch*80,ar(5),out) - Title and 4 subtitles
c DofLab (ch*4,ar(nDOF),out)- Labels for DOFs
c ResRdSolBegin (int,sc,out) - 0, requested solution set found
c 1, not found
*deck,ResRdDisp
function ResRdDisp (node,Disp)
c primary function: Retrieve a nodal displacement
c object/library: ResRd
c input arguments:
c node (int,sc,in) - Node number
c output arguments: none
c Disp (dp,ar(nDOF),out) - Displacements
c ResRdDisp(int,sc,out) - Number of displacements
*deck,ResRdRfor
function ResRdRfor (node,idof,value)
c primary function: Retrieve a reaction force
c object/library: ResRd
c input arguments:
c node (int,sc,in) - External node number
c idof (int,sc,in) - Internal dof number
c output arguments:
c value (dp,sc,in) - Value of reaction force
c ResRdRfor (int,sc,out) - Number of returned values (0 or 1)
*deck,ResRdFix
function ResRdFix (node,idof,value)
c primary function: Retrieve a constraint value
c object/library: ResRd
c input arguments:
c node (int,sc,in) - External node number
c idof (int,sc,in) - Internal dof number
c output arguments:
c value (dp,ar(4),in) - Real,Imag, RealOld,ImagOld
c ResRdFix (int,sc,out) - Number of returned values (0 or 4)
*deck,ResRdForc
function ResRdForc (node,idof,value)
c primary function: Retrieve an applied force value
c object/library: ResRd
c input arguments:
c node (int,sc,in) - External node number
c idof (int,sc,in) - Internal dof number
c output arguments:
c value (dp,ar(4),in) - Real,Imag, RealOld,ImagOld
c ResRdForc (int,sc,out) - Number of returned values (0 or 4)