udfGetEbcData()

Return data at the surface quadrature point.

Syntax

data = udfGetEbcData( udfHd, dataName ) ;

Type

AcuSolve User-Defined Example Boundary Condition

Parameters

udfHd
The opaque handle (pointer) which was passed to the user function.
dataName (integer)
Symbolic name of the requested data.
UDF_EBC_VELOCITY
Velocity.
UDF_EBC_ACCELERATION
Acceleration.
UDF_EBC_PRESSURE
Pressure.
UDF_EBC_TEMPERATURE
Temperature.
UDF_EBC_SPECIES
Species.
UDF_EBC_EDDY_VISCOSITY
Turbulence eddy viscosity.
UDF_EBC_KINETIC_ENERGY
Turbulence kinetic energy.
UDF_EBC_EDDY_FREQUENCY
Turbulence eddy frequency.
UDF_EBC_GRAD_VELOCITY
Gradient of velocity.
UDF_EBC_GRAD_PRESSURE
Gradient of pressure.
UDF_EBC_GRAD_TEMPERATURE
Gradient of temperature.
UDF_EBC_GRAD_SPECIES
Gradient of species.
UDF_EBC_MESH_DISPLACEMENT
Mesh displacement.
UDF_EBC_MESH_VELOCITY
Mesh velocity.

Return Value

data (Real*)
Pointer to one, two, or three dimensional real array of the requested data. The dimensions of the array depend on dataName as follows. If the third (slowest) dimension of the array is equal to one, then the array may be treated as two dimensional. If the second dimension is likewise one, then the array is one dimensional. The x, y, z components of the gradient for gradient quantities are always contained in the last nontrivial dimension.
dataName First Dimension Second Dimension Third Dimension
UDF_EBC_VELOCITY nItems 3 1
UDF_EBC_ACCLERATION nItems 3 1
UDF_EBC_PRESSURE nItems 1 1
UDF_EBC_TEMPERATURE nItems 1 1
UDF_EBC_SPECIES nItems udfGetNumSpecs() 1
UDF_EBC_EDDY_VISCOSITY nItems 1 1
UDF_EBC_KINETIC_ENERGY nItems 1 1
UDF_EBC_EDDY_FREQUENCY nItems 1 1
UDF_EBC_GRAD_VELOCITY nItems 3 3
UDF_EBC_GRAD_PRESSURE nItems 3 1
UDF_EBC_GRAD_TEMPERATURE nItems 3 1
UDF_EBC_GRAD_SPECIES nItems udfGetNumSpecs() 3
UDF_EBC_MESH_DISPLACEMENT nItems 3 1
UDF_EBC_MESH_VELOCITY nItems 3 1

Description

This routine returns the requested solution data at the surface quadrature point. For example,
Real* data ;
Real u, v, w ;
Real u_x, v_x, w_x, u_y, v_y, w_y, u_z, v_z, w_z ;
Real spec_x, spec_y, spec_z ;
Integer surf, nSpecs, specId ;
...
data = udfGetEbcData( udfHd, UDF_EBC_VELOCITY ) ;
for ( surf = 0 ; surf < nItems ; surf++ ) {
   u = data[0*nItems+surf] ;
   v = data[1*nItems+surf] ;
   w = data[2*nItems+surf] ;
   ...
}
...
data = udfGetEbcData( udfHd, UDF_EBC_GRAD_VELOCITY ) ;
for ( surf = 0 ; surf < nItems ; surf++ ) {
   u_x = data[0*nItems+surf] ;
   v_x = data[1*nItems+surf] ;
   w_x = data[2*nItems+surf] ;
   u_y = data[3*nItems+surf] ;
   v_y = data[4*nItems+surf] ;
   w_y = data[5*nItems+surf] ;
   u_z = data[6*nItems+surf] ;
   v_z = data[7*nItems+surf] ;
   w_z = data[8*nItems+surf] ;
   ...
}
...
data = udfGetEbcData( udfHd, UDF_EBC_GRAD_SPECIES ) ;
nSpecs = udfGetNumSpecs( udfHd ) ;
for ( specId = 0 ; specId < nSpecs ; specId++ ) {
   for ( surf = 0 ; surf < nItems ; surf++ ) {
      /* 3 components of gradient of species */
      spec_x = data[nItems*(0*nSpecs+specId)+surf] ;
      spec_y = data[nItems*(1*nSpecs+specId)+surf] ;
      spec_z = data[nItems*(2*nSpecs+specId)+surf] ;
      ...
   }
}

Errors

  • This routine expects a valid udfHd.
  • This routine may only be called within an Element Boundary Condition user function.
  • dataName must be one of the values given above.
  • The problem must contain the equation associated with the requested data.