CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (http://www.cfd-online.com/Forums/fluent-udf/)
-   -   incorrect cg motion UDF sdof_properties::libudf on zone 6 (assuming no motion) (http://www.cfd-online.com/Forums/fluent-udf/114847-incorrect-cg-motion-udf-sdof_properties-libudf-zone-6-assuming-no-motion.html)

M.Magdy March 18, 2013 20:51

incorrect cg motion UDF sdof_properties::libudf on zone 6 (assuming no motion)
 
Hi,
I'm trying to simulate the movement of floating body in sea.
I'm using a udf for wall movement :
#include "udf.h"
#include "dynamesh_tools.h"
DEFINE_CG_MOTION(wave,dt,vel,omega,time,dtime )
{
vel[0]=((4)*(sin((63)*(time))));
}


and another one for the floating body six_dof_property:

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

DEFINE_SDOF_PROPERTIES(sdof_properties, prop, dt, time, dtime)
{
prop[SDOF_MASS] = 85167.33;
prop[SDOF_IXX] = 174112.84;
prop[SDOF_IYY] = 28237716.54;
prop[SDOF_IZZ] = 28237716.54;

prop[SDOF_ZERO_TRANS_X] = TRUE;
prop[SDOF_ZERO_TRANS_Y] = TRUE;
prop[SDOF_ZERO_ROT_X] = TRUE;
prop[SDOF_ZERO_ROT_Z] = TRUE;
printf ("\n updated 6DOF properties");
}

when i check the "six DOF" option in dynamic mesh the wall doesn't move and this message appears:
Unable to read motion history

while if i unchecked it an error appears -
but the waves are generated correctly-:
incorrect cg motion UDF sdof_properties::libudf on zone 6 (assuming no motion)

Can someone please help. Thanks.

vasava March 19, 2013 04:42

Try this

#include "udf.h"
#include "dynamesh_tools.h"
DEFINE_CG_MOTION(wave, dt, cg_vel, cg_omega, time, dtime)
real t = CURRENT_TIME;
{
cg_vel[0] = ((4)*(sin((63)*(t))));
cg_vel[1] = 0.0;
cg_vel[2] = 0.0;

cg_omega[0] = 0.0;
cg_omega[1] = 0.0;
cg_omega[2] = 0.0;

}

vasava March 19, 2013 05:15

Also you do not need 'dynamesh_tools.h'.

M.Magdy March 19, 2013 09:28

Thank you but the problem is still the same

vasava March 19, 2013 10:51

Sorry initially I thought that there is problem with the first part and did not pay any attention to the second part.

Anyways, there are two things here

1. 'prop[SDOF_ZERO_TRANS_X] = TRUE;' and 'prop[SDOF_ZERO_TRANS_Y] = TRUE;' means that you want/allow the object to move in X and Y direction but not in Z-direction.

2. 'prop[SDOF_ZERO_ROT_X] = TRUE;' and 'prop[SDOF_ZERO_ROT_Z] = TRUE;' means that you want/allow the object to rotate in X and Z axes but not over Y-axis.

Don't you think that these two are not consistent with each other? Remove the line with 'prop[SDOF_ZERO_ROT_X] = TRUE;' and then try again.


Don't forget to compile and not interpret.

M.Magdy March 20, 2013 10:59

Hi Vasava,
Thanks for your reply but I'm afraid it didn't solve the problem.
if you could tell me whether I should in my case check the box beside "six DOF" in dynamic mesh options or not.
knowing that :
  • when i check it -----------> no waves are generated (the wall doesn't move)
  • when i uncheck it ---------> waves are generated but the floating body make no motion

    Thanks,

vasava March 21, 2013 04:20

You say that mass of the box is 85167.33 (kg I suppose). Isnt that too heavy to be moved by wave of water?

M.Magdy March 22, 2013 01:50

No because the body is a cylinder of length 30m and diameter 3m and 4cm thickness

stefanos March 28, 2013 09:59

If you allow me, i would like to add a comment that may seem helpful, according to my experience.
Sometimes this occurs if the moving zones aren't adequately defined. In recent fluent editions you don't have to define the meanflow deforming zone. You just need to set the rigid body motion of the moving zone (the moving wall and/or a sourrounding moving fluid zone that includes the boundary layer, around the body, if turbulence modeling is employed). In addition, if there are edge zones recognized by fluent as borders between the rigid-deforming zones, they should also be introduced in the dynamic mesh zones panel as rigidly moving zones, according to the same udf.


All times are GMT -4. The time now is 04:41.