Fluids

Fluids

Topics related to Fluent, CFX, Turbogrid and more.

Pitching airfoil using overset and dynamic mesh.

    • nahian.masud
      Subscriber

      Hi there, 

      I am using a ansys to simulate pitching NACA0012 airfoil. I made a rectangular background mesh as in figure 1. then made a O shape mesh to overset on the rectangular background mesh (fig 2). I defined all the cell zones and boundary conditions (velocity inlet and pressure outlet).

      Then I created a compiled udf. given below, 

      #include "udf.h"
      #define AMPLITUDE 30.0   /* Amplitude of pitching motion in degrees */
      #define FREQUENCY 2.97  /* Frequency of pitching motion in Hz */
      #define PI 3.14159265359
       
      DEFINE_CG_MOTION(pitching_airfoil, dt, vel, omega, time, dtime)
      {
          Thread *t;
      face_t f;
          NV_S(vel, =, 0.0);  /*No translational velocity */
         NV_S(omega, =, 0.0);   /*Initially no rotational velocity */
       
          vel[0] = 0.0; // X-direction
          vel[1] = 0.0; // Y-direction
          vel[2] = 0.0; // Z-direction
          
          omega[0] = 0.0; // Rotation about X-axis
          omega[1] = 0.0; // Rotation about Y-axis
          omega[2] = 0.0; // Rotation about Z-axis
       
          /* Set the rotational velocity about the z-axis */
          omega[2] = 0.2618 * 18.66 * cos(2.0 * 180 * 2.97 * time);
       
        
      }


      now In the dynamic mesh section I did the following.
      1. turned off smoothing, remeshing and layering
      2. enabled six DOF and enabled motion history (Didnt turn on OneDOF)

      3. finally hooked UDF into the fluid-circle (passive enabled), hydrofoil(passive disabled).

      then used time step of 10^-4. The problem is, the airfoil is not moving and showing same result as steady state case. 

      Can anyone please help me about this and thell me where I am making the problem? Is it about hooking the UDF or something else?


    • Federico
      Ansys Employee

      Hello, 

      Since you are using Overset, I believe you need to set the motion to the entire moving fluid cell zone. You can use Display Zone Motion in the Dynamic Mesh task page to check if the movement is set up correctly before running the case.

      • nahian.masud
        Subscriber

        Hi,

        Thanks for responding. I tried hooking the same sine function in a TRANSIENT_profile in the cell zone. If i do that, the airfoil moves as per my prediction. But the cl value is super high (40000 to -40000). I cannot figure out what is the problem. I am attaching that udf as well. 

        #include "udf.h"
        #define PI 3.14159
         
        DEFINE_TRANSIENT_PROFILE(speed, time)
        {
        real ampl = 0.2618;
        /*real freq = 2.*PI;*/
        real omega;
         
        omega = 0.2618 * 18.66 * cos(2.0 * 180 * 2.97 * time);
         
        return omega;
         
        }

        any idea on how to get rid of this?

        thanks

        • Federico
          Ansys Employee

          Did you set the Reference values for Cl?

    • nahian.masud
      Subscriber

      hi, I tried using multiple things. Actuallly it is a hydrofoil and fluid is water. I  used transient profile fucntion as udf. for the moving fluid zone, I defined 1 udf for pitching and another udf for heaving. for the heaving udf, I used the lift.out file to get the lift force, which is used to get the transitional velocity. 

      The problem I am facing is that, the system is diverging even after I  start the simulation after the flow field is stabelized. The lift goes high positive and in the next timestep it goes very high negetive value. and keeps going on and it gives a divergence error. 

      I set the reference values for water and velocity inlet. Do you have any idea how I can fix this?

      note that i did check the mesh and did all the modifications possible for the overset interface.

Viewing 2 reply threads
  • The topic ‘Pitching airfoil using overset and dynamic mesh.’ is closed to new replies.