udfGetNbcData()
Return nodal solution data for the nodal boundary condition.
Syntax
data = udfGetNbcData( udfHd, dataName ) ;
Type
AcuSolve User-Defined Nodal Boundary Condition
Parameters
- udfHd
- The opaque handle (pointer) which was passed to the user function.
- dataName (integer)
- Symbolic name of the requested data.
- UDF_NBC_VELOCITY
- Velocity.
- UDF_NBC_ACCELERATION
- Acceleration.
- UDF_NBC_PRESSURE
- Pressure.
- UDF_NBC_TEMPERATURE
- Temperature.
- UDF_NBC_DENSITY
- Density.
- UDF_NBC_SPECIES
- Species.
- UDF_NBC_EDDY_VISCOSITY
- Turbulence eddy viscosity.
- UDF_NBC_KINETIC_ENERGY
- Turbulence kinetic energy.
- UDF_NBC_EDDY_FREQUENCY
- Turbulence eddy frequency.
- UDF_NBC_EDDY_TIME
- Turbulence eddy time.
- UDF_NBC_TRANSITION_RETHETA
- Transition Re-Theta.
- UDF_NBC_INTERMITTENCY
- Transition intermittency.
- UDF_NBC_MESH_DISPLACEMENT
- Mesh displacement.
- UDF_NBC_MESH_VELOCITY
- Mesh velocity.
- UDF_NBC_TURBULENCE_Y
- Distance to nearest turbulence wall.
- UDF_NBC_TURBULENCE_YPLUS
- Turbulence y+ based on distance to nearest turbulence wall and shear at that wall.
- UDF_NBC_VISCOELASTIC
- Viscoelastic.
Return Value
- data (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 dimension is one, then
the array may be treated as one dimensional.
dataName First Dimension Second Dimension UDF_NBC_VELOCITY nItems 3 UDF_NBC_ACCLERATION nItems 3 UDF_NBC_PRESSURE nItems 1 UDF_NBC_TEMPERATURE nItems 1 UDF_NBC_SPECIES nItems udfGetNumSpecs() UDF_NBC_EDDY_VISCOSITY nItems 1 UDF_NBC_MESH_DISPLACEMENT nItems 3 UDF_NBC_MESH_VELOCITY nItems 3 UDF_NBC_KINETIC_ENERGY nItems 1 UDF_NBC_EDDY_FREQUENCY nItems 1 UDF_NBC_EDDY_TIME nItems 1 UDF_NBC_TRANSITION_RETHETA nItems 1 UDF_NBC_INTERMITTENCY nItems 1 UDF_NBC_TURBULENCE_Y nItems 1 UDF_NBC_TURBULENCE_YPLUS nItems 1 UDF_NBC_VISCOELASTIC nItems 6
Description
This routine returns the requested nodal solution data. For
example,
Real* data ;
Real u, v, w ;
Real spec ;
Integer node, nSpecs, specId ;
...
data = udfGetNbcData( udfHd, UDF_NBC_VELOCITY ) ;
for ( node = 0 ; node < nItems ; node++ ) {
u = data[0*nItems+node] ;
v = data[1*nItems+node] ;
w = data[2*nItems+node] ;
...
}
...
data = udfGetNbcData( udfHd, UDF_NBC_SPECIES ) ;
nSpecs = udfGetNumSpecs( udfHd ) ;
for ( specId = 0 ; specId < nSpecs ; specId++ ) {
for ( node = 0 ; node < nItems ; node++ ) {
spec = data[specId*nItems+node] ;
...
}
}
The quantities UDF_NBC_TURBULENCE_Y and UDF_NBC_TURBULENCE_YPLUS are based on the distance to the nearest turbulence wall. These are defined by TURBULENCE_WALL and SIMPLE_BOUNDARY_CONDITIONtype=wall commands. UDF_NBC_TURBULENCE_YPLUS also uses the shear at these walls.
Errors
- This routine expects a valid udfHd.
- This routine may only be called within an Nodal Boundary Condition user function.
- dataName must be one of the values given above.
- The problem must contain the equation associated with the requested data.