[ANSYS, Inc. Logo] return to home search
next up previous contents index

2.6.5 DEFINE_SDOF_PROPERTIES



Description


You can use DEFINE_SDOF_PROPERTIES to specify custom properties of moving objects for the six-degrees of freedom (SDOF) solver in ANSYS FLUENT. These include mass, moment and products of inertia, and external forces and moment properties. The properties of an object which can consist of multiple zones can change in time, if desired. External load forces and moments can either be specified as global coordinates or body coordinates. In addition, you can specify custom transformation matrices using DEFINE_SDOF_PROPERTIES.



Usage



DEFINE_SDOF_PROPERTIES( name, properties, dt, time, dtime)


Argument Type Description
symbol name UDF name.
real *properties Pointer to the array that stores the SDOF properties.
Dynamic_Thread *dt Pointer to structure that stores the dynamic mesh
  attributes that you have specified (or that are calculated
  by ANSYS FLUENT).
real time Current time.
real dtime Time step.
   
Function returns  
void  
   

There are four arguments to DEFINE_SDOF_PROPERTIES: name, properties, dt, and dtime. You provide the name of the UDF. properties, dt, and dtime are variables that are passed by the ANSYS FLUENT solver to your UDF. The property array pointer that is passed to your function allows you to specify values for any of the following SDOF properties:

   SDOF_MASS         /* mass */
   SDOF_IXX,         /* moment of inertia */
   SDOF_IYY,         /* moment of inertia */
   SDOF_IZZ,         /* moment of inertia */
   SDOF_IXY,         /* product of inertia */
   SDOF_IXZ,         /* product of inertia */
   SDOF_IYZ,         /* product of inertia */
   SDOF_LOAD_LOCAL,  /* boolean */
   SDOF_LOAD_F_X,    /* external force */
   SDOF_LOAD_F_Y,    /* external force */
   SDOF_LOAD_F_Z,    /* external force */ 
   SDOF_LOAD_M_X,    /* external moment */
   SDOF_LOAD_M_Y,    /* external moment */
   SDOF_LOAD_M_Z,    /* external moment */

The boolean prop[SDOF_LOAD_LOCAL] can be used to determine whether the forces and moments are expressed in terms of global coordinates ( FALSE) or body coordinates ( TRUE). The default value for prop[SDOF_LOAD_LOCAL] is FALSE.



Custom Transformation Variables


The default transformations used by ANSYS FLUENT are typical for most aerospace and other types of applications. However, if your model requires custom transformations, you can specify these matrices in your SDOF UDF. First set the SDOF_CUSTOM_TRANS boolean to TRUE. Then use the macros listed below to define custom coordination rotation and derivative rotation matrices. CTRANS is the body-global coordinate rotation matrix and DTRANS is the body-global derivative rotation matrix.

   SDOF_CUSTOM_TRANS,       /* boolean */
   SDOF_CTRANS_11,          /* coordinate rotation matrices */
   SDOF_CTRANS_12,
   SDOF_CTRANS_13,
   SDOF_CTRANS_21,
   SDOF_CTRANS_22,
   SDOF_CTRANS_23,
   SDOF_CTRANS_31,
   SDOF_CTRANS_32,
   SDOF_CTRANS_33,
   SDOF_DTRANS_11,          /* derivative rotation matrices */
   SDOF_DTRANS_12,
   SDOF_DTRANS_13,
   SDOF_DTRANS_21,
   SDOF_DTRANS_22,
   SDOF_DTRANS_23,
   SDOF_DTRANS_31,
   SDOF_DTRANS_32,
   SDOF_DTRANS_33,



Example 1


The following UDF, named stage, is a simple example of setting mass and moments of inertia properties for a moving object. This UDF is typical for applications in which a body is dropped and the SDOF solver computes the body's motion in the flow field.

/************************************************************
 Simple example of a SDOF property UDF for a moving body
**************************************************************/
#include "udf.h"

DEFINE_SDOF_PROPERTIES(stage, prop, dt, time, dtime)
{
   prop[SDOF_MASS]       = 800.0;
   prop[SDOF_IXX]        = 200.0;
   prop[SDOF_IYY]        = 100.0;
   prop[SDOF_IZZ]        = 100.0;

   printf ("\nstage: updated 6DOF properties");
}



Example 2


The following UDF named delta_missile specifies case injector forces and moments that are time-dependent. Specifically, the external forces and moments depend on the current angular orientation of the moving object. Note that this UDF must be executed as a compiled UDF.

/*******************************************************
SDOF property compiled UDF with external forces/moments
*******************************************************/
#include "udf.h"

DEFINE_SDOF_PROPERTIES(delta_missile, prop, dt, time, dtime)
{
   prop[SDOF_MASS]       = 907.185;
   prop[SDOF_IXX]        = 27.116;
   prop[SDOF_IYY]        = 488.094;
   prop[SDOF_IZZ]        = 488.094;

   /* add injector forces, moments */
   {
     register real dfront = fabs (DT_CG (dt)[2] - 
                            (0.179832*DT_THETA (dt)[1]));
     register real dback  = fabs (DT_CG (dt)[2] +
                            (0.329184*DT_THETA (dt)[1]));

     if (dfront <= 0.100584)
       {
         prop[SDOF_LOAD_F_Z] = 10676.0;
         prop[SDOF_LOAD_M_Y] = -1920.0;
       }

     if (dback <= 0.100584)
       {
         prop[SDOF_LOAD_F_Z] += 42703.0;
         prop[SDOF_LOAD_M_Y] += 14057.0;
       }
   }

   printf ("\ndelta_missile: updated 6DOF properties");
}



Hooking a DEFINE_SDOF_PROPERTIES UDF to ANSYS FLUENT


After the UDF that you have defined using DEFINE_SDOF_PROPERTIES is interpreted (Chapter  4) or compiled (Chapter  5), the name of the argument that you supplied as the first DEFINE macro argument will become visible in the Six DOF UDF drop-down list in the Dynamic Mesh Zones dialog box in ANSYS FLUENT. See Section  6.5.5 for details on how to hook your DEFINE_SDOF_PROPERTIES UDF to ANSYS FLUENT.


next up previous contents index Previous: 2.6.4 DEFINE_GRID_MOTION
Up: 2.6 Dynamic Mesh DEFINE
Next: 2.7 User-Defined Scalar (UDS)
Release 12.0 © ANSYS, Inc. 2009-01-14