udfGetMmoRgdJac()

Return storage for rigid body external force or moment derivatives with respect to displacement or rotation.

Syntax

mmoRgdJac = udfGetMmoRgdJac(udfHd, mmoRgdName, dataName) ;

Type

AcuSolve User-Defined Function Global

Parameters

udfHd
The opaque (pointer) which was passed to the user function.
mmoRgdName (string)
Name of the MESH_MOTION command (must be of type = rigid_body).
dataName (integer)
Symbolic name of the requested data.
UDF_MMO_RGD_JAC_DISPLACEMENT
Derivative of force with respect to displacement.
UDF_MMO_RGD_JAC_ROTATION
Derivative of moment with respect to rotation.

Return Value

mmoRGDJac (real)
Pointer to one-dimensional storage array. The dimension of the array is nine for three components of the derivatives of dataName.

Description

This function will return a pointer to the Jacobian at quadrature points. The Jacobian is the derivatives of the UDF type (force or moment) with respect to the dataName which is displacement or rotation. Nine components of this pointer array should be assigned explicitly in this function.
Void usrMmoRgdExtFrc( UdfHd udfHd )
{
   Real dFrc1d1 ; /* derivetive of force to Dis. */
   Real dFrc1d2 ; /* derivetive of force to Dis. */
   Real dFrc1d3 ; /* derivetive of force to Dis. */
   Real dFrc2d1 ; /* derivetive of force to Dis. */
   Real dFrc2d2 ; /* derivetive of force to Dis. */
   Real dFrc2d3 ; /* derivetive of force to Dis. */
   Real dFrc3d1 ; /* derivetive of force to Dis. */
   Real dFrc3d2 ; /* derivetive of force to Dis. */
   Real dFrc3d3 ; /* derivetive of force to Dis. */

   udfCheckNumUsrVals( udfHd, 3 ) ;
   udfCheckNumUsrStrs( udfHd, 1 ) ;
   usrStrs = udfGetUsrstrs ( udfHd ) ;
   rgdMmoName = usrStrs[0] ;

   mmoRgdDisJac = udfGetMmoRgdJac( udfHd,        
                                   rgdMmoName,
                                   UDF_MMO_RGD_JAC_DISPLACEMENT ) ;
   mmoRgdRotJac = udfGetMmoRgdJac( udfHd,
                                   rgdMmoName,
                                   UDF_MMO_RGD_JAC_ROTATION ) ; 

   mmoRgdDisJac[0] = dFrc1d1 ;
   mmoRgdDisJac[1] = dFrc1d2 ;
   mmoRgdDisJac[2] = dFrc1d3 ;

   mmoRgdDisJac[3] = dFrc2d1 ;
   mmoRgdDisJac[4] = dFrc2d2 ;
   mmoRgdDisJac[5] = dFrc2d3 ;
 
   mmoRgdDisJac[6] = dFrc3d1 ;
   mmoRgdDisJac[7] = dFrc3d2 ;
   mmoRgdDisJac[8] = dFrc3d3 ;

} /* end of usrMmoRgdForce() */

Errors

None.