A zone is defined as groups of nodes or faces that are located
on the external boundaries of the domain. The following routines provide
functionality for returning the number of zones in the open CFX results
file specifying and requesting the current zone, and destroying any
internal storage associated with a zone. All other routines in the
Export API refer to quantities in the current zone being accessed
by the API. By default the current zone is the global zone (a combination
of all zones in the Ansys CFX results file), but this can be the current
zone can be altered by making a call to cfxExportZoneSet
(see cfxExportZoneSet). Once this call has been made,
any other function returns information about this zone until a subsequent
call is made.
int cfxExportZoneCount ()
Return the number of zones in the CFX results file.
int cfxExportZoneSet (int zone, int counts[cfxCNT_SIZE])
Set the current zone being accessed by the Export API.
The value of zone should be between 1 and the value returned
by cfxExportZoneCount
(see cfxExportZoneCount) or 0 if the global zone is to be accessed.
The function returns 0 if the value of zone is invalid or the value zone if setting of the zone was successful.
The argument counts can be passed as a NULL pointer. In this case no information is returned to the calling function other than the return value mentioned above. If counts is specified it must be at least cfxCNT_SIZE in size, not specifying an array large enough can result in errors. In the case when counts is supplied correctly the total number of nodes, elements, volumes, regions and variables will be returned.
void cfxExportZoneFree ()
While a zone is being accessed, internal storage is allocated,
this storage should be deallocated when no longer required. This can
be done by calling cfxExportZoneFree
or by calling cfxExportNodeFree
, cfxExportElementFree
, cfxExportVolumeFree
, cfxExportRegionFree
and cfxExportVariableFree
. Details on each
of these routines is available; see:
int cfxExportZoneIsRotating(double rotationAxis[2][3], double *angularVelocity)
Query whether the current zone is rotating and describe axis
and angular velocity of the rotation if applicable. Returns 1 if the
current zone is rotating and 0 if it is not; for the combined zone
the return value is always -1. If successful the rotation axis is
returned in rotationAxis
and the velocity in angularVelocity
in radians/second.
int cfxExportZoneMotionAction(const int zone, const int flag)
Specify whether grid coordinates and variables should have the
appropriate rotation applied to them if the zone is rotating so that
grid coordinates appear in their correct locations and velocities
(for examples) take this rotation into consideration. If cfxExportZoneList
and cfxExportVariableList
should return rotated values, flag should be set to cfxMOTION_USE
. The default behavior for a particular zone will be used if cfxMOTION_IGNORE
is specified or this function
is not called. If zone is not valid or flag is not cfxMOTION_USE
, cfxMOTION_IGNORE
the return value will
be -1 otherwise 0 is returned.