We’re putting the final touches on our new badges platform. Badge issuance remains temporarily paused, but all completions are being recorded and will be fulfilled once the platform is live. Thank you for your patience.
Fluids

Fluids

Topics related to Fluent, CFX, Turbogrid and more.

getting a plug flow when implementing a parabolic velocity profile UDF in a 3D pipe

    • Leen
      Subscriber

      Hi everyone,


      I'm trying to implement a parabolic velocity profile at the inlet of a 3D pipe (for a steady flow case), the inlet itself is not perpendicular to any of the primary axes.


      I used the following UDF:



      After running the simulation, the result was a plug flow at the inlet of 7.07[m/s] as I implemented instead of parabolic profile. Furthermore, changing the radius units to [m] led to non-converged solution. I also tried implementing the UDF as a velocity magnitude (which gave a plug flow that developed to parabolic at the outlet) and as an axial velocity in cylindrical coordinates (gave reversed flow for all iterations). 


      I've tried other manipulations but nothing worked.


      Finally, the easiest way to deal with this situation is to elongate the pipe and insert a constant velocity, then get the profile to develop, but in this case, the profile I get is not precise enough, Not to mention that it takes additional computational time which I'm trying to avoid due the complex geometry. 


      I'd appreciate your help,


      Thanks,

    • Kalyan Goparaju
      Ansys Employee

      Hello, 


      Since you know the equation of the parabola, you can use Expressions to directly input the velocity profile at the inlet, instead of using a UDF. Expressions are tailor-made for situations like. 


      Thanks, 


      Kalyan

    • Leen
      Subscriber

      Hi Kalyan,


       


      I've tried doing so and got reversed flow for all the iterations.

    • Kalyan Goparaju
      Ansys Employee

      Hello, 


      Can you share the screenshot of how you setup the expression at the inlet? 


      Thanks,


      Kalyan

    • Leen
      Subscriber

      7.07[m/s]*(1-(x**2+y**2+z**2)/(1.5[mm])**2)


      I tried inserting the expression into velocity magnitude and axial velocity (cylindrical coordinates)

    • Leen
      Subscriber

      Hi everyone,


      I found the problem, it looks like it is happening because my tube centroid wasn't at (0,0,0).


      Does anyone how can I modify my UDF in order to calculate the inlet centroid? I tried using "begin_f_loopend_f_loop" twice, first I called it and searched for min and max f_centroid over all the faces and then I called it again in order to implement the profile over all the faces. 


      The UDF had no errors when interpreted but it gave me an error during initializing, I tried other UDF that worked previously and there was no issue, that is why I'm sure something is wrong with the current UDF. 


      Can anyone please help me?


       


      Thanks, 

    • Rob
      Forum Moderator

      You just need to provide an offset to the coordinate, or move the mesh. 

    • Leen
      Subscriber

      I know how to do that manually, but it would take a lot of time to do that for all the meshes. In addition, the tube is a part of complex geometries which makes it hard to transform the mesh.  

    • peppers
      Subscriber

      hello leen,

      Have you found a solution, how to overcome it so that the parabolic velocity profile does not occur reversed flow? because I also experienced that and when changing at a constant velocity reversed flow did not occur
       
      Thank You
    • Rob
      Forum Moderator

      Ansys will answer in /forum/forums/topic/parabolic-velocity-profile-causes-reversed-flow/ but I'll leave this open for Leen if they're still monitoring the forum. 

Viewing 9 reply threads
  • The topic ‘getting a plug flow when implementing a parabolic velocity profile UDF in a 3D pipe’ is closed to new replies.