udfGetOeiData()

Return data from an integrated element output set.

Syntax

oeiData = udfGetOeiData( udfHd, setName, dataName ) ;

Type

AcuSolve User-Defined Function Global

Parameters

udfHd
The opaque handle (pointer) which was passed to the user function.
setName (string)
Name of the ELEMENT_OUTPUT set.
dataName (integer)
Symbolic name of the requested data.
UDF_OEI_VOLUME
Total volume.
UDF_OEI_VELOCITY
Average velocity.
UDF_OEI_ACCELERATION
Average acceleration.
UDF_OEI_PRESSURE
Average pressure.
UDF_OEI_TOTAL_PRESSURE
Average total pressure.
UDF_OEI_TEMPERATURE
Average temperature.
UDF_OEI_SPECIES
Average species.
UDF_OEI_EDDY_VISCOSITY
Average turbulence eddy viscosity.
UDF_OEI_KINETIC_ENERGY
Average turbulence kinetic energy.
UDF_OEI_EDDY_FREQUENCY
Average turbulence eddy frequency.
UDF_OEI_GRAD_VELOCITY
Average gradient of velocity.
UDF_OEI_GRAD_PRESSURE
Average gradient of pressure.
UDF_OEI_GRAD_TEMPERATURE
Average gradient of temperature.
UDF_OEI_GRAD_SPECIES
Average gradient of species.
UDF_OEI_STRESS
Average Cauchy stress.
UDF_OEI_HEAT_FLUX
Average heat flux.
UDF_OEI_SPECIES_FLUX
Average species flux.
UDF_OEI_MESH_DISPLACEMENT
Average mesh displacement.
UDF_OEI_MESH_VELOCITY
Average mesh velocity.
UDF_OEI_USER_OUTPUT
User defined output.

Return Value

oeiData (real)
Pointer to one or two-dimensional real array of the requested data. The dimensions of the array depend on dataName as follows. If the second (slower) dimension is one, then the array may be treated as a one-dimensional array. The x, y and z components of the gradient for gradient quantities are always contained in the second dimension. The six components of the Cauchy stress are, in order, xx, yy, zz, xy, yz and zx.
dataName First dimension
UDF_OEI_VOLUME 1
UDF_OEI_VELOCITY 3
UDF_OEI_ACCELERATION 3
UDF_OEI_PRESSURE 1
UDF_OEI_TOTAL_PRESSURE 1
UDF_OEI_TEMPERATURE 1
UDF_OEI_SPECIES udfGetNumSpecs()
UDF_OEI_EDDY_VISCOSITY 1
UDF_OEI_KINETIC_ENERGY 1
UDF_OEI_EDDY_FREQUENCY 1
UDF_OEI_GRAD_VELOCITY 3
UDF_OEI_GRAD_PRESSURE 1
UDF_OEI_GRAD_TEMPERATURE 1
UDF_OEI_GRAD_SPECIES udfGetNumSpecs()
UDF_OEI_STRESS 6
UDF_OEI_HEAT_FLUX 3
UDF_OEI_SPECIES_FLUX udfGetNumSpecs()
UDF_OEI_MESH_DISPLACEMENT 3
UDF_OEI_MESH_VELOCITY 3
UDF_OEI_USER_OUTPUT Determined by you

Description

This routine returns data from an output element integrated set. For example,
Real* oeiData ;
 
Real volume, ave_x_vel, ave_y_vel, ave_z_vel, spec_x, spec_y, spec_z ;
 
Real u_x, v_x, w_x, u_y, v_y, w_y, u_z, v_z, w_z ;
 
Integer specId, nSpecs ;
 
...
 
oeiData = udfGetOeiData( udfHd, "probe 1", UDF_OEI_VOLUME ) ;
 
volume = oeiData[0] ;
 
...
 
oeiData = udfGetOeiData( udfHd, "probe 1", UDF_OEI_VELOCITY ) ;
 
ave_x_vel = oeiData[0] ;
 
ave_y_vel = oeiData[1] ;
 
ave_z_vel = oeiData[2] ;
 
...
 
nSpecs = udfGetNumSpecs( udfHd ) ;
 
oeiData = udfGetOeiData( udfHd, "probe 1", UDF_OEI_GRAD_SPECIES )
 
for ( specId = 0 ; specId < nSpecs ; specId++ ) {
 
   spec_x = oeiData[0*nSpecs+specId] ;
 
   spec_y = oeiData[1*nSpecs+specId] ;
 
   spec_z = oeiData[2*nSpecs+specId] ;
 
   ...
 
}
 
...
 
oeiData = udfGetOeiData( udfHd, "probe 1", UDF_OEI_GRAD_VELOCITY )
 
u_x = oeiData[0] ;
 
v_x = oeiData[1] ;
 
w_x = oeiData[2] ;
 
u_y = oeiData[3] ;
 
v_y = oeiData[4] ;
 
w_y = oeiData[5] ;
 
u_z = oeiData[6] ;
 
v_z = oeiData[7] ;
 
w_z = oeiData[8] ;
 
...

Errors

  • This routine expects a valid udfHd.
  • setName must be a valid name.
  • dataName must be one of the values given above.
  • The problem must contain the equation system corresponding to the parameter being requested. For example, the problem must contain a heat equation in order for UDF_OEI_HEAT_FLUX to be available.