We have an exciting announcement about badges coming in May 2025. Until then, we will temporarily stop issuing new badges for course completions and certifications. However, all completions will be recorded and fulfilled after May 2025.
Fluids

Fluids

Topics related to Fluent, CFX, Turbogrid and more.

Dynamic mesh-nan in cg definition

TAGGED: ,

    • Thodorisdm
      Subscriber

      Hello, 

       

      I am running a dynamic mesh problem. The walls are having a sinusoidal motion and the layering method is employed. When I run the case for a frquency of 1Hz it runs normally. When I increase to 20Hz, the mesh is not moving (in the preview mesh at every timestep I have the same volumes). When I am then checking my dynamic zones, every rigid body zone has a nan y-coordinate in the cg definition. Is it a bug?

    • Federico
      Ansys Employee

       

      Hello, 

      did you adjust your time step size accordingly when changing the frequency? 

      Also, mesh preview will deform the mesh, hence you will need to re-read the case to a previous state with undeformed mesh. To a Mesh Check and make sure the CG coordinates are valid before you initialize the motion.

       

    • Thodorisdm
      Subscriber

      Yes everything has been adjusted. If my timestep was not adjusted, I think I would have a message for negative volumes, no?

      • Federico
        Ansys Employee

        Yes and no, depending on what your ymotion UDF does, time step size can bring in other issues as well.

        As per my previous comment, do a mesh check prior to doing a Preview of Mesh Motion. Otherwise, you may share your UDF code here to give us more information.

    • Thodorisdm
      Subscriber
      I always check the mesh prior to the preview of the mesh motion. Hereby my UDF. Always works for frequency 1-5 but not for larger.
       
      #include "udf.h"
       
      #define amplitude 0.01
      #define frequency 10
       
      DEFINE_CG_MOTION(ymotion,dt,vel,omega,time,dtime)
      {
      real vmax;
      real Tper; 
       
      Tper = 1/frequency;
      vmax = (amplitude * 2*M_PI) / Tper;
      vel[1] = vmax*(cos(2 * M_PI * time / Tper));
      }
    • Federico
      Ansys Employee

      what is your dt for this case with 10Hz?

    • Thodorisdm
      Subscriber

      dt = 4.7 e-4 sec. Ideal height on the stationary zones to calculate the split and compression is 8e-4 m. and the real height of my mesh there is 6e-4 m .

      • Federico
        Ansys Employee

        Ok, all your DM settings appear to be ok. 

        However, Tper appears to be an integer division, which results in 0. Can you try with Tper = 1.0/frequency ?

    • Thodorisdm
      Subscriber

      yes, that solves everything! Thank you!

Viewing 6 reply threads
  • The topic ‘Dynamic mesh-nan in cg definition’ is closed to new replies.