Fluids

Fluids

Topics relate to Fluent, CFX, Turbogrid and more

UDF FOR DEFINE_CG_MOTION

    • qamar
      Subscriber

      Hi Everyone, Hope you are doing well. I was trying to run the UDF with CG_MESH_MOTION in one of the case studies and I can not find the mesh motion in mesh preview. I am hereby attaching the video file and udf that I am compiled in fluent. Can this forum please update me on where I am going wrong that I am not getting the mesh motion preview? I will appreciate your help. Thank you very much.


    • Rob
      Forum Moderator
      Which part tells the solver how fast to move? n
    • qamar
      Subscriber
      Hi Rob, thank you for your reply. n/* Motion Angular Velocity */nif (t > Start && t <= Stop )n{ omega[2] = ((0.5*wo*(amin - amax))*sin(wo*(t-Start))); }n/* Stop Condition */nelsen{ /* After completeting the motion, the angular velocitynreturns to 0 rad/s. */nif (t > Stop)n{ omega[2] = 0; }n}n}n}nnI have seen few tutorials and they provide the similar UDF and mesh preview motion can be seen by using time step size and number of time steps. At least, some motion, no matter how small. But in my case, i cant see the motion at all. The attached video shows how I am proceeding. Any help? Thank you.n
    • Rob
      Forum Moderator
      Where's that in the original file? n
    • qamar
      Subscriber
      Hi Mr. Rob, I do not understand what you mean. I am following this video for example,
      &ab_channel=VishalGanore.nIn this video, the UDF is used and mesh motion is analyzed before proceeding for the analysis. I want to see the same. The UDF in this study, what part tells it how fast to move. Can you please elaborate so that I can understand it easily. Thank you.n
    • Rob
      Forum Moderator
      In the original code, where is the omega[2] definition? n
    • qamar
      Subscriber
      /* For anytime less than 2s, the velocity remains constant */nif (t <= Start)n{ omega[2] = 0; }nelsen{ /* For any time between Start [s] and Stop [s], then,nthe angular velocity will vary as function of time innorder to simulate an oscillatory movement. */n/* Motion Angular Velocity */nif (t > Start && t <= Stop )n{ omega[2] = ((0.5*wo*(amin - amax))*sin(wo*(t-Start))); }n/* Stop Condition */nelsen{ /* After completeting the motion, the angular velocitynreturns to 0 rad/s. */nif (t > Stop)n{ omega[2] = 0; }n}n}n}nnHi, THE definition of omega[2] is given. n
    • qamar
      Subscriber
      n
    • Rob
      Forum Moderator
      Which isn't in the code you posted. As staff we're not permitted to open files or download attachments. n
Viewing 8 reply threads
  • You must be logged in to reply to this topic.