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.

Udf for undulating airfoil

    • CatherineIl
      Subscriber

      Hello,

      I would like to simulate an undulating airfoil using udf. Unfortunately, I do not have a lot of udf experience and I do not know how to do it. I know that I can use define_grid_motion but I am not sure how. Could anyone please help me? I would really appreciate that as I needed it for my uni project. 

      Thank you in advance, 

      Catherine 

    • Karthik Remella
      Administrator

      Hello Catherine,


      I always find the Fluent Customization Manual to be the best place for starting a UDF. Since there are multiple examples of tested UDFs illustrated in this manual, I generally tend to use them directly (at first) and then modify it to suit my modeling needs. Here is a link to the DEFINE_GRID_MOTION macro which will point you to an example. Please let me know here if you are able to access this link. I've also posted a screenshot of the UDF here for your help.


      https://ansyshelp.ansys.com/account/secured?returnurl=/Views/Secured/corp/v193/flu_udf/flu_udf_sec_define_grid_motion.html?q=define_grid_motion



      Best,


      Karthik

    • Keyur Kanade
      Ansys Employee

      also please go through some introduction to udf. 


      https://www.youtube.com/watch?v=PXTPfREgLzE


       

    • CatherineIl
      Subscriber

      Hello again, 

      Thank you very much for your reply. 

      Unfortunately, I have tested this and my airfoil does not change at all even if I change the parameters and I do not understand why as I used the same as the manual.

    • CatherineIl
      Subscriber

      The only one that I could find is the one below which deforms and increases the length but I do not how to deform it only. 
      #include"udf.h"
      #include"unsteady.h"
      #include"dynamesh_tools.h"
      #include "udf.h" 
      DEFINE_GRID_MOTION(beam,domain,dt,time,dtime) 
      { 
      Thread *tf; 
      face_t f; 
      int n; 
      Node *v; 
      /* get the thread pointer for which this motion is defined */ 
      tf=DT_THREAD(dt); 
      begin_f_loop(f,tf) 
      { 
      f_node_loop(f,tf,n) 
      { 
      v = F_NODE(f,tf,n); 
      NODE_Y(v)=NODE_Y(v)+fabs(NODE_X(v))*dtime; 
      } 
      } 
      end_f_loop(f,tf); 
      } 

    • Keyur Kanade
      Ansys Employee

      can you please insert some images of your geometry, mesh and explain what exactly you are trying to do. 

    • CatherineIl
      Subscriber

      Finally, I found my error so I managed to make it work. Thank you very much for your time. 

      • Naren B
        Subscriber

        Hello Catherine, 

        I have been working on structure deformation in Ansys using DEFINE_GRID_MOTION UDF code.. But, the available published code showing more errors. I dont know what wrong with the code...would you be kind enough to share your code, so that I can learn and develop my own code..Im eagerly waiting for positive response from you..Your help is highly helpful for me..

        Thanks in advance..

Viewing 6 reply threads
  • The topic ‘Udf for undulating airfoil’ is closed to new replies.