CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (https://www.cfd-online.com/Forums/fluent-udf/)
-   -   Motion UDF (https://www.cfd-online.com/Forums/fluent-udf/124907-motion-udf.html)

kailingkk October 15, 2013 10:56

Motion UDF
 
Hello people! :)

After reading through ANSYS UDF manual and several paper references and going through this forum, I have been trying to create a UDF for a fixed downward unit acceleration. I have come up with several UDF functions but to no avail my dynamic mesh remains stationary. No motion is detected during previewing of mesh motion!

Here are the few UDF that I have came up with:

#include "udf.h"

DEFINE_SDOF_PROPERTIES(falling_box, prop, dt, time, dtime)
{
prop[SDOF_MASS] = 301125;
prop[SDOF_IXX] = 784179;
prop[SDOF_IYY] = 853188;
prop[SDOF_IZZ] = 382679;
prop[SDOF_LOAD_F_Y] = 265291.25;
printf ("\n2d_test_box: Updated 6DOF properties");
}




2nd try:
DEFINE_CG_MOTION(object_mov, dt, vel, omega, time, dtime)
{
real a;
/* define motion variables */
t = RP_Get_Real("flow-time");
a = -1; /* 1ms2 acceleration */
/* define object movement law */
vel[0] = 0;
vel[1] = -5 + a*t;
vel[2] = 0;
}


3rd try:


DEFINE_ADJUST(moveplease, domain)
{
double AlnrX;
AlnrX = -1;
printf("accel = %f\n", AlnrX);
}

Could anybody tell me what is wrong with any of my UDFs? Thank you!:)

If it helps, I'm trying to simulate a lowering of an object into a tank of water (in 2 scenarios; with and without waves)

Thank you once again :)


All times are GMT -4. The time now is 16:13.