Fluids

Fluids

Topics related to Fluent, CFX, Turbogrid and more.

UDF for Pistion Motion in Layering technique

    • Shubham Chaudhari
      Subscriber

      I am writing the UDF of Pistion motion In Layering technique as the profile is not working. 

      This is a 3D problem.

      The compiled UDF is given as below:

      include "udf.h"
      #include "dynamesh_tools.h"
      DEFINE_CG_MOTION(piston,dt,vel,omega,time,dtime)
      {
      NV_S(vel, =, 0.0);
      NV_S(omega, =, 0.0);
      vel[0]=1;

      time = 1;

      dtime = 0.001;
      printf("\n");
      printf("\n x_velocity = %g \n", vel[0]);
      }

      as above the piston moving at 1000mm/sec speed. To lower the computational time i am moving at this only with stroke length of 260mm. But while changing the number of time step to 280 with time step size 0.001. The fluent getting crashed. 

      i am not sure what causing the problem in the solution, is it UDF or simulation setup.

    • SRP
      Ansys Employee

      Hi,

      The time step size (0.001 seconds) appears to be reasonable. However, reducing the time step even further might help stabilize the simulation. Try decreasing it and see if the issue persists.

Viewing 1 reply thread
  • The topic ‘UDF for Pistion Motion in Layering technique’ is closed to new replies.