Fluids

Fluids

SDOF UDF issue

    • sugarl14
      Subscriber

      Hi,

      I have been using Example 3 from the UDF manual for my simulation but I keep running into a strange result. I am simulating a flap that rotates back and forth when it is struck with an ocean wave using mulitphase VOF and open channel wave BC. I am trying to run the exact same thing as https://www.sciencedirect.com/science/article/abs/pii/S0029801815001705.

      So the mass of my rigid body is 33kg, and the moment of inertia is 1.84 kg*m^2. The dynamic mesh is updating and remeshing just fine, so I am not having any issues there. The issue is this: each time I calculate the solution, the rigid body almost immediately "falls" over. At the point it falls over, there is no presence of external forces (such as moving waves), other than hydrostatic pressure. However, the hydrostatic pressure shouldn't cause the flap to just fall over. I've even tried to use  sdof_prop[SDOF_LOAD_M_Z] = 1000; to simulate a torque on the rigid body to try to restore it back to equilibrium, but nothing seems to work.


      I am thinking that it has to do something with the mass of the rigid body and the moment of inertia. When I change the moment of inertia to sdof_prop[SDOF_IZZ] = -1.8472, the flap falls to the right (-30 deg). When I change the moment of inertia to sdof_prop[SDOF_IZZ] = 1.8472, the flap falls to the left (+30 deg). Maybe I need to write a function for buoyancy to go in  sdof_prop[SDOF_LOAD_M_Z]?


      Here is my UDF that I am using. Again, I've tried to mimic everything done in the paper (link above):


      #include "udf.h"

      DEFINE_SDOF_PROPERTIES(flap, sdof_prop, dt, time, dtime)

      {

       Six_DOF_Object *sdof_obj = NULL;


       sdof_prop[SDOF_MASS] = 32.64;

       sdof_prop[SDOF_IXX] = 0.0;

       sdof_prop[SDOF_IYY] = 0.0;

       sdof_prop[SDOF_IZZ] = 1.8472;

       sdof_prop[SDOF_LOAD_M_X] = 0.0;

       sdof_prop[SDOF_LOAD_M_Y] = 0.0;

       sdof_prop[SDOF_LOAD_M_Z] = 0.0;


       sdof_obj = Get_SDOF_Object(DT_PU_NAME(dt));


       if (NULLP(sdof_obj))

       {

        /* Allocate_SDOF_Object must be called with the same name as the udf */

        sdof_obj = Allocate_SDOF_Object(DT_PU_NAME(dt));


        SDOFO_1DOF_T_P(sdof_obj) = FALSE;    /* one DOF translation */

        SDOFO_1DOF_R_P(sdof_obj) = TRUE;    /* one DOF rotation */

        SDOFO_DIR(sdof_obj)[0] = 0.0;

        SDOFO_DIR(sdof_obj)[1] = 0.0;

        SDOFO_DIR(sdof_obj)[2] = 1.0;

        SDOFO_CENTER_ROT(sdof_obj)[0] = 7.92;  /* only needed for one DOF rotation */

        SDOFO_CENTER_ROT(sdof_obj)[1] = 0.31019;  /* only needed for one DOF rotation */

        SDOFO_CENTER_ROT(sdof_obj)[2] = 0.0;  /* only needed for one DOF rotation */

        SDOFO_CONS_P(sdof_obj) = TRUE;     /* constrained */


        if (SDOFO_CONS_P(sdof_obj))

        {

         SDOFO_LOC(sdof_obj) = 0.0;

         SDOFO_MIN(sdof_obj) = -0.52;

         SDOFO_MAX(sdof_obj) = 0.52;

         SDOFO_F(sdof_obj) = 0.0;       /* spring preload */

         SDOFO_K(sdof_obj) = 0.0;       /* spring constant */     


         SDOFO_INIT(sdof_obj) = SDOFO_LOC(sdof_obj);

         SDOFO_LOC_N(sdof_obj) = SDOFO_LOC(sdof_obj);

        }

       }

      }

    • DrAmine
      Ansys Employee
      I think in the paper they are using Ansys Fluent so feel free to get then in touch with one of the authors. Does the same issue occur if you rely just on the GUI?
      Do you have a Fluid zone on top of the rigid wall which can undergo the 6-dof motion but in passive way? (But you said that the remeshing is working fine..)
    • sugarl14
      Subscriber
      Hi DrAmine, thank you for your reply.
      What do you mean when you say "if I just rely on the GUI"? As in, using the Six DOF Properties (picture below) instead of writing a udf?

      Regarding your second suggestion, I only have 1 rigid body (OWSC) and 1 deforming area. I did not model anything as passive. The deforming zone re-meshes just fine during simulation.


      Here are some things I have tried that didn't work:
      Increase mass of flap / decrease moment of inertia
      Increase mass of flap/ increase momnet of inertia
      Decrease mass of flap/ decrease moment of inertia
      Decrease mass of flap/ decrease moment of inertia
      defined SDOFO_F(sdof_obj) = 0.0; /*spring preload*/
      defined SDOFO_K(sdof_obj)= 0.0; /*spring constant*/

      Here are some things I am thinking of doing next:
      free decay test
      writing a function for sdof_prop[SDOF_LOAD_M_Z] to act as a buoyancy force to pull the flap back upright.

      If you have any other thoughts/ ideas, i would greatly appreciate them!!
    • sugarl14
      Subscriber
      Also, This is a good video that I have been referencing. I was wondering if anyone here knew who created it so I could contact them with some questions?
      " target="blank">

Viewing 3 reply threads
  • You must be logged in to reply to this topic.