udfGetNicData()
Return nodal solution data for the nodal initial condition.
Syntax
data = udfGetNicData( udfHd, dataName ) ;
Type
AcuSolve User-Defined Name Initial Condition
Parameters
- udfHd
- The opaque handle (pointer) which was passed to the user function.
- dataName (integer)
- Symbolic name of the requested data.
- UDF_NIC_VELOCITY
- Velocity.
- UDF_NIC_ACCELERATION
- Acceleration.
- UDF_NIC_PRESSURE
- Pressure.
- UDF_NIC_TEMPERATURE
- Temperature.
- UDF_NIC_SPECIES
- Species.
- UDF_NIC_EDDY_VISCOSITY
- Turbulence eddy viscosity.
- UDF_NIC_KINETIC_ENERGY
- Turbulence kinetic energy.
- UDF_NIC_EDDY_FREQUENCY
- Turbulence eddy frequency.
- UDF_NIC_MESH_DISPLACEMENT
- Mesh displacement.
- UDF_NIC_MESH_VELOCITY
- Mesh velocity.
- UDF_NIC_VISCOELASTIC
- Viscoelastic stress.
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_NIC_VELOCITY nItems 3 UDF_NIC_ACCELERATION nItems 3 UDF_NIC_PRESSURE nItems 1 UDF_NIC_TEMPERATURE nItems 1 UDF_NIC_SPECIES nItems udfGetNumSpecs() UDF_NIC_EDDY_VISCOSITY nItems 1 UDF_NIC_MESH_DISPLACEMENT nItems 3 UDF_NIC_MESH_VELOCITY nItems 3 UDF_NIC_KINETIC_ENERGY nItems 1 UDF_NIC_EDDY_FREQUENCY nItems 1 UDF_NBC_TURBULENCE_Y nItems 1 UDF_NBC_TURBULENCE_YPLUS nItems 1 UDF_NIC_VISCOELASTIC nItems 6
Description
Real* data ;
Real u, v, w ;
Real spec ;
Integer node, nSpecs, specId ;
...
data = udfGetNicData( udfHd, UDF_NIC_VELOCITY ) ;
for ( node = 0 ; node < nItems ; node++ ) {
u = data[0*nItems+node] ;
v = data[1*nItems+node] ;
w = data[2*nItems+node] ;
...
}
...
data = udfGetNicData( udfHd, UDF_NIC_SPECIES ) ;
nSpecs = udfGetNumSpecs( udfHd ) ;
for ( specId = 0 ; specId < nSpecs ; specId++ ) {
for ( node = 0 ; node < nItems ; node++ ) {
spec = data[specId*nItems+node] ;
...
}
}
Errors
- This routine expects a valid udfHd.
- This routine may only be called within a Nodal Initial Condition user function.
- dataName must be one of the values given above.
- The problem must contain the equation associated with the requested data.