|
Description
You can use DEFINE_GEOM to specify the geometry of a deforming zone. By default, ANSYS FLUENT provides a mechanism for defining node motion along a planar or cylindrical surface. When ANSYS FLUENT updates a node on a deforming zone (e.g., through spring-based smoothing or after local face re-meshing) the node is "repositioned'' by calling the DEFINE_GEOM UDF. Note that UDFs that are defined using DEFINE_GEOM can only be executed as compiled UDFs.
Usage
DEFINE_GEOM( name, d, dt, position) |
Argument Type | Description |
symbol name | UDF name. |
Domain *d | Pointer to domain. |
Dynamic_Thread *dt | Pointer to structure that stores the dynamic mesh |
attributes that you have specified (or that are calculated | |
by ANSYS FLUENT). | |
real *position | Pointer to array that stores the position. |
Function returns | |
void | |
There are four arguments to DEFINE_GEOM: name, d, dt, and position. You supply name, the name of the UDF. d, dt, and position are variables that are passed by the ANSYS FLUENT solver to your UDF. The new position (after projection to the geometry defining the zone) is returned to ANSYS FLUENT by overwriting the position array.
Example
The following UDF, named parabola, is executed as a compiled UDF.
/************************************************************ * defining parabola through points (0, 1), (1/2, 5/4), (1, 1) ************************************************************/ #include "udf.h" DEFINE_GEOM(parabola,domain,dt,position) { /* set y = -x^2 + x + 1 */ position[1] = - position[0]*position[0] + position[0] + 1; } |
Hooking a Dynamic Mesh Geometry UDF to
ANSYS FLUENT
After the UDF that you have defined using DEFINE_GEOM is compiled (see Chapter 5 for details), the name of the argument that you supplied as the first DEFINE macro argument will become visible in the Dynamic Mesh Zones dialog box in ANSYS FLUENT. See Section 6.5.3 for details on how to hook your DEFINE_GEOM UDF to ANSYS FLUENT.