# udfGetSdData()

Return the data for a variable.

## Syntax

data = udfGetSdData( udfHd, dataName ) ;

## Type

AcuSolve User-Defined Subdomain Routine

## Parameters

- udfHd
- The opaque handle (pointer) which was passed to the user function.
- dataName (integer)
- Symbolic name of a data variable.
- UDF_SD_VELOCITY
- Velocity.
- UDF_SD_ACCELERATION
- Acceleration.
- UDF_SD_PRESSURE
- Pressure.
- UDF_SD_TEMPERATURE
- Temperature.
- UDF_SD_SPECIES
- Species.
- UDF_SD_EDDY_VISCOSITY
- Turbulence eddy viscosity.
- UDF_SD_KINETIC_ENERGY
- Turbulence kinetic energy.
- UDF_SD_EDDY_FREQUENCY
- Turbulence eddy frequency.
- UDF_SD_MESH_DISPLACEMENT
- Mesh displacement.
- UDF_SD_MESH_VELOCITY
- Mesh velocity.
- UDF_SD_TURBULENCE_Y
- Distance to nearest turbulence wall.
- UDF_SD_TURBULENCE_YPLUS
- Turbulence y+ based on distance to nearest turbulence wall and shear at that wall.

## Return Value

- data (Real*)
- Pointer to two dimensional real array of the requested data variable. The first (fast) dimension of the array is the number of nodes, and the second (slow) dimension is the dimension of the variable.

## Description

```
Integer nNodes, dataDim, node ;
Real u, v, w ;
Real* data ;
...
nNodes = udfGetNSdNodes( udfHd ) ;
dataDim = udfGetSdDataDim( udfHd, UDF_SD_VELOCITY ) ;
data = udfGetSdData( udfHd, UDF_SD_VELOCITY ) ;
for ( node = 0 ; node < nNodes ; node++ ) {
u = data[0*nNodes+node] ;
v = data[1*nNodes+node] ;
w = data[2*nNodes+node] ;
...
}
```

## Errors

- This routine expects a valid udfHd.
- This routine may only be called within an external code.
- dataName must be one of the values given above.
- The subdomain must contain the equation associated with the data variable.