Fluids

Fluids

fluent crashes for piston motion udf with layering

    • Raaghul03
      Subscriber

      Hello,

      I am trying to simulate wave generated due to piston motion in a tank. When I simulate the fluent crashes either with dynamic mesh failed or floating point exception or Global courant number is greater than 250. I had done in 2d as well as 3d. But it fails in both. My time step is 0.01s, 0.045s, 0.05s for the mesh size of 1metre hexa cell in 50metre length domain. The udf I used are

      #include "udf.h"

      #include "dynamesh_tools.h"

      DEFINE_CG_MOTION(oscillate,dt,vel,omega,time,dtime )

      {

      real a, w, pi;

      pi = 3.1415; 

      NV_S (vel, =, 0.0);

      NV_S (omega, =, 0.0);

      /* define motion variables */

      a = 20; /* 15m movement amplitude */

      w = 2 * pi * (1);/* 1/12Hz frequency */

      vel[0]=a*sin(w*time);

      Message("time=%f, vel[0]=%f ", time, vel[0]);

      }


      #include "udf.h"

      #include "dynamesh_tools.h"

      DEFINE_CG_MOTION(oscillate,dt,vel,omega,time,dtime )

      {

      Thread *t;

      face_t f;


      t = DT_THREAD(dt);


      real a, w, pi;


      pi = 3.1415;


      NV_S (vel, =, 0.0);

      NV_S (omega, =, 0.0);


      /* define motion variables */

      a = 15; /* 15m movement amplitude */

      w = 2 * pi * (1); /* 1 sec to complete 1 oscillation */


      begin_f_loop (f, t)

      {

      vel[0]=-a *w*cos(w*time);

      }

      end_f_loop (f, t)

      Message("time=%f, vel[0]=%f ", time, vel[0]);

      }


      Whatever motion whether positive, negative, sin or cosine I define the solver is crashing after few time time steps.

    • Rob
      Ansys Employee
      If the cell size is 1m you may find the VOF model is struggling. How does the free surface look before the solver fails? n
    • Raaghul03
      Subscriber
      The problem has been fixed. I started the project from scratch and it worked fine somehow. n
Viewing 2 reply threads
  • You must be logged in to reply to this topic.