Fluids

Fluids

Topics related to Fluent, CFX, Turbogrid and more.

Swirl velocity gradient in 2D axisymmetric domain

    • Luuk van der Tuin
      Subscriber

      In a 2D, axisymmetric domain, I am modeling a turbulent swirl flow. I want the turbulent viscosity to be dependent on the velocity gradient in the y-direction (x-axis is the symmetry axis) of the swirl velocity. In the UDF, I use "C_W_G(c,t)[1]" to find the gradient of the swirl velocity. I can compile and load the UDFs, but when I start the initialization, the error : "999999 mpt_accept error accept failed no such file or directory " occurs and fluent closes. The error does not occur when I use "C_U_G(c,t)[1]. 

      #include "udf.h"
       
      DEFINE_TURBULENT_VISCOSITY(user_mu_t,c,t)
      {
        real mu_t;
        real R;
        real rho = C_R(c,t);
        real L;
        real y;
        real dUdy = C_U_G(c,t)[1];
        real dSwirldy = C_W_G(c,t)[1];
        real x[ND_ND];
        C_CENTROID(x,c,t);
        y = x[1];
        R = 0.05;
       
        L = R*(0.14 - 0.08*(y/R)*(y/R) - 0.06*(y/R)*(y/R)*(y/R)*(y/R) );
       
        mu_t = rho*L*L*pow( pow(dSwirldy,2.) ,0.5);
       
        return mu_t;
      }
    • Rob
      Forum Moderator

      Check the C_U_G and C_W_G terms have a value: ie read https://ansyshelp.ansys.com/account/Secured?returnurl=/Views/Secured/corp/v241/en/flu_udf/flu_udf_DataAccessMacros.html  and check you've retained the data. 

    • Luuk van der Tuin
      Subscriber

      Are C_W and C_W_G the right macros to use to get the swirl velocity and its gradient? When I run a simulation with the standard k-epsilon model, I get zero velocity when I plot 'Velocity.z' and a non-zero velocity profile when I plot 'Swirl Velocity', while plotting 'Velocity.x' and ' Axial velocity' gives the same result.

    • Rob
      Forum Moderator

      I think so, check you used axisymmetric with swirl when you set the options in the General panel. Swirl should tie in with the "z" component in some way. https://ansyshelp.ansys.com/account/Secured?returnurl=/Views/Secured/corp/v241/en/flu_udf/flu_udf_DataAccessMacros.html

    • Luuk van der Tuin
      Subscriber

      Yes, I selected axisymmetric Swirl. I checked whether C_W(c,t) returns the swirl velocity component, and it does. The program runs just fine when I use C_W in the udf. But, when I use C_W_G(c,t), I receive the error "999999: mpt_accept: error: accept failed: No error" and the program closes immediately. This happens also if I do the initialization before I select the user-defined turbulent viscosity in the k-epsilon model. 

    • Rob
      Forum Moderator

      Did you retain the data? Read the paragraphs above the table.   https://ansyshelp.ansys.com/account/Secured?returnurl=/Views/Secured/corp/v241/en/flu_udf/flu_udf_DataAccessMacros.html

    • Luuk van der Tuin
      Subscriber

      I'm sorry, but I don't have access to the link you sent. How can I check if I retained the data?

    • Rob
      Forum Moderator

      Click on Help in Fluent, then paste the link into the browser. 

    • Luuk van der Tuin
      Subscriber

      If I retain the data with the command "solve/set/advanced/retain-temporary-solver-mem.", I receive the same error message.

    • Rob
      Forum Moderator

      As far as I know it should work, I'll check. You may need to cheat using UDM and UDS  https://ansyshelp.ansys.com/account/Secured?returnurl=/Views/Secured/corp/v241/en/flu_udf/flu_udf_DataAccessMacros.html%23flu_udf_example_udm_uds_usage  for gradients. 

    • Rob
      Forum Moderator

      Can you try on just one core if you're not? 

    • Luuk van der Tuin
      Subscriber

      I have run the solver in serial mode, and I also tried runnig the simulation on the cluster instead of my local computer but in any case I still receive an error.

    • Rob
      Forum Moderator

      OK, looks like the macro isn't available, and I'm harassing the developer to see if we can do something about it for a future release. For now, have a look at the UDM/UDS gradients in the link I shared. 

    • Rob
      Forum Moderator

      OK, I can't share the solution as it's not (yet) public: it should show up in the Knowledge materials once it's signed off. 

Viewing 13 reply threads
  • The topic ‘Swirl velocity gradient in 2D axisymmetric domain’ is closed to new replies.