Fluids

Fluids

Topics relate to Fluent, CFX, Turbogrid and more

Inlet profile at an angle to inlet

    • namrata mishra
      Subscriber

      Hii

      I am using a UDF at the inlet to simulate wind flow inside the domain. Now, I need this wind profile at 30 degrees to the inlet. how can i specify angle in my boundary conditions without changing the udf. I am attaching some screenshots for reference.

      Also, I chose velocity specification method normal to boundary. If I change it to magnitude and direction, I cant clearly understand what to specify in X, Y and Z directions.

       

    • SRP
      Ansys Employee

      Hi,

      You need to make changes in the UDF itself to make flow at 30 degree or make an expression at the inlet corresponding to 30 degree.

      Thank you.

    • namrata mishra
      Subscriber

      Ok. Can you please suggest me what changes do I need to make . My udf code is as follows:

      #include "udf.h"
      #define UREF 4.7/* ref. speed 3.0 m/s */
      #define CMU 0.09 
      #define H 12
      #define u_star 0.52
      #define delta 36
      #define p_constant 0.4
       
       
      DEFINE_PROFILE(velocity_profile, thread, position)
      {
      float x[ND_ND];
      float y;
      float u_in;
              face_t f;
       
       
      begin_f_loop(f, thread)
      {
      F_CENTROID(x,f,thread);
      y=x[1];
      u_in = UREF*pow(y/H,0.3);
      F_PROFILE(f,thread,position) = u_in;
      }
      end_f_loop(f, thread)
      }
       
      /*  profile for kinetic energy  */
       
       
      DEFINE_PROFILE(k_profile, thread, position)
      {
      float x[ND_ND];
        face_t f;
              float y;
              float k;
       
              begin_f_loop(f, thread)
          {
            F_CENTROID(x,f,thread);
            y=x[1];
                      k=(u_star*u_star/pow(CMU,0.5))*(1-(y/delta));
            F_PROFILE(f,thread,position)=k;
           
          }
        end_f_loop(f, thread)
      }
       
      /* profile for dissipation rate  */
       
       
      DEFINE_PROFILE(dissip_profile, thread, position)
      {
        float x[ND_ND];
        face_t f;
      float y;
              float eps;
              
        begin_f_loop(f, thread)
          {
            F_CENTROID(x,f,thread);
      y=x[1];
            eps=(pow(u_star,3)/(p_constant*y))*(1-(y/delta));
                      F_PROFILE(f,thread,position)=eps;
          }
        end_f_loop(f,thread)
      }
    • Rob
      Forum Moderator

      Change to "components" rather than magnitude normal to boundary. You then need two DEFINE_PROFILE(velocity_profile, thread, position) blocks for the two components. Hint, don't call them both "velocity_profile". 

       

Viewing 3 reply threads
  • The topic ‘Inlet profile at an angle to inlet’ is closed to new replies.