I'm using a udf to specify the properties of one degree of freedom body (rotation around z-axis), I compiled it using the built-in compiler in Fluent 2020 R2. I specified the cg location in the dynamic mesh zone, but it seems like the location doesn't get updated with the solution. The motion file has the same value for the cg point with different angles.
Am I missing something? Why the cg location doesn't update? I think it's affecting the solution, that's why I need to fix it.
This is the UDF I used:
DEFINE_SDOF_PROPERTIES(flap, prop, dt, time, dtime)
prop[SDOF_MASS] = 21.5;
prop[SDOF_IXX] = 5;
prop[SDOF_IYY] = 5;
prop[SDOF_IZZ] = 5.5;
prop[SDOF_ZERO_TRANS_X] = TRUE; /* boolean, suppress translation in x-direction */
prop[SDOF_ZERO_TRANS_Y] = TRUE; /* boolean, suppress translation in y-direction */
prop[SDOF_ZERO_TRANS_Z] = TRUE; /* boolean, suppress translation in z-direction */
prop[SDOF_ZERO_ROT_X] = TRUE; /* boolean, suppress rotation around x-axis */
prop[SDOF_ZERO_ROT_Y] = TRUE; /* boolean, suppress rotation around y-axis */
prop[SDOF_ZERO_ROT_Z] = FALSE; /* boolean, suppress rotation around z-axis */
printf("\nflap: updated 6DOF properties");
and the motion file I got: