Fluids

Fluids

UDF to extract swirl velocities returns empty

    • heaven
      Subscriber

      I'm running an axisymmetric simulation with swirl. For my simulation I need to extract the velocities at the wall in all directions. To do this have written a UDF which works fine when I use a full stick boundary condition.

      My problem occurs when I apply shear boundary conditions on the wall. Suddenly the F_W function doesn't seem to work anymore and returns the velocity it found latest, which is not correct. The F_U and the F_V function do return their correct values.

      At the moment i'm still runing Ansys Fluent 2019 R3

      Does someone have a clue what could cause such a problem? or could it be that this is a bug?


      This is the UDF I use

    • Konstantine Kourbatski
      Ansys Employee
      is there more to the UDF? What is ID_sub?n
    • heaven
      Subscriber
      Not really, I intend to extend it. But at the moment I'm stuck with these velocities. nI do have another UDF to save the shear stress (and modify it), but I don't think that's what causes this problem.nThe ID_sub is the ID of one of the walls.n
    • DrAmine
      Ansys Employee
      Can you try with the near wall cell value?n
    • heaven
      Subscriber
      Using the values of the cell near the wall does give me valid results, and they do approach the results i'm expecting quite ok. However I am modifying the wall shear stress (so on the faces) using velocities near the wall which gives me some error. I'd preferably would use only the wall values. n
    • DrAmine
      Ansys Employee
      Can you paste the content of the UDF here? The only thing which I am thinking about and I am not sure about it that it might be that the value is empty if shear boundary is applied. Worthin checking on 3D case too.n
    • heaven
      Subscriber
      Can you paste the content of the UDF here? Do you mean the UDF where I extract the velocity using the cell near the wall? nChecking the 3D case is indeed a good idea Array.n
    • DrAmine
      Ansys Employee
      I think F_W will be always emnpty for swirl 2D independent of the boundary condition you are using.n
    • Konstantine Kourbatski
      Ansys Employee
      what is the value of ID_sub or ID_tool, where is it defined? This is what I was asking in my previous post? Do you have any lines above DEFINE_ON_DEMAD? n
    • heaven
      Subscriber
      Sorry for the late reply.nI think F_W will be always emnpty for swirl 2D independent of the boundary condition you are using. That's the weird thing, if I don't have a shear stress condition F_W does return accurate values, if I apply a rotation to the wall I do get (non-zero) velocities in the swirl direction.what is the value of ID_sub or ID_tool, where is it defined? This is what I was asking in my previous post? Do you have any lines above DEFINE_ON_DEMAD?nID_Sub and ID_Tool are respectively 5 and 6 and they match the ID's of the wall in fluent.
    • DrAmine
      Ansys Employee
      Did you check on 3D? I also not really understand what you wrote regarding rotational wall etc..n
    • Konstantine Kourbatski
      Ansys Employee
      To add to DrAmine's comments, once you specify shear stress on the wall, then this condition is used to calculate tangential velocity, as per Sec. 7.4.15.11. Shear-Stress Calculation Procedure at Wall Boundaries, and the tangential velocity won't be zero unless your specified shear exactly matches that for the no-slip condition.n
Viewing 11 reply threads
  • You must be logged in to reply to this topic.