Fluids

Fluids

Problems Loading UDF for Moving Mesh in fluent

    • jmt714
      Subscriber

      Hi


      I'm a student, using for first time Fluent and I am using the following UDF. My Ansys version is 18th. But when I try to compile it I get this error:  The UDF library you are trying to load ( libudf) is not compiled for parallel use on the current platform (win64).nnThe system cannot find the file specified.C:UsersUserDesktopProva_3 libudfwin643d_hostlibudf.dll.


       I don't know if is because the lack of any compiler or because the udf is wrong.


      Any suggestions? Thank you very much in advance and sorry for the inconveniences,  

    • jmt714
      Subscriber


      My UDF is the following:  I am trying to do a simple movement of a plane in one axis. Thus, all the nodes of the surface would move equally (either up or down). I have already the displacements and it's a 106 steps simulation. That's why I define a vector (106 positions), each position of the vector is the displacement of the surface at that step.


       


      #include "udf.h"


      #include "dynamesh_tools.h"


      int last_ts = -1;


       


      DEFINE_GRID_MOTION(mitral,domain,dt,time, dtime)


      {


      Thread *tf = DT_THREAD(dt);


      face_t f;


      Node *v;


      real NV_VEC(axis);


      int n;


      real displ[106]= {0,   -0.0000912592592592591, ...  until reach 106 values};


      NV_D(axis, =, 1.0, 0.0, 0.0);


      int curr_ts;


         curr_ts = N_TIME;


       begin_f_loop(f,tf)


      {


      f_node_loop(f,tf,n)


      {


      v = F_NODE(f,tf,n); 


      if (NODE_POS_NEED_UPDATE (v) && last_ts != curr_ts)


      {


      last_ts = curr_ts;


      NODE_POS_UPDATED(v);


      NV_V_VS(NODE_COORD(v),=, axis,*,displ[last_ts]); 


      }


      }


      }


      end_f_loop(f,tf);}


    • seeta gunti
      Ansys Employee

      Hi,


      The error is because of lack of compiler. For compilation and loading the UDF, please check the below link which gives complete idea on installation of Visual Studio and compilation of UDF using VS command editor.



       



       


      Regards,


      Seeta


       

    • jmt714
      Subscriber

      Many thaanks!!!

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