Fluids

Fluids

Are there undocumented limitations or side-effects to using the DEFINE_TURBULENT_VISCOSITY macro?

    • sverrej
      Subscriber

      I have been working with the DEFINE_TURBULENT_VISCOSITY macro for ANSYS Fluent UDFs, to see if I can reproduce the various standard turbulence models included in ANSYS Fluent via the user-defined turbulent-viscosity hook.

      I have not been able to find any information about limitations or side-effects to the use of the DEFINE_TURBULENT_VISCOSITY macro in the ANSYS Fluent Customization manual or other knowledge resources, but my efforts so far indicate that implementing the turbulent viscosity alone is not enough to reproduce standard simulation results ("standard" denoting simulations without any udf). E.g., when employing the standard k-epsilon turbulent viscosity formulation via the user-defined turbulent-viscosity hook (see e.g. the example provided in the ANSYS Fluent Customization manual), the convergence behaviour of the simulation differs from that of the standard k-epsilon model, and simulations results may also be different (e.g. wall shear-stress in a straight pipe are off by 20% for Reynolds numbers in the transition regime).

      I have a growing suspicion that the activation of the user-defined turbulent-viscosity hook does not only have implications for the turbulent viscosity, but maybe also for other aspects such as other turbulent quantities (dissipation rate?) and solver behavior.

      I would appreciate any thoughts on this topic.

    • Rob
      Ansys Employee
      If you're changing part of a model or material property it's bound to have an effect on other parts of the solver and results.
    • sverrej
      Subscriber
      Thanks for your response, Rob.
      What you are saying seems quite obvious.
      My question is regarding the situation where you think that you have changed nothing, by using a user-defined turbulent viscosity which is implemented in the exact same way that the ANSYS Fluent Theory Guide describes. E.g., if the turbulent viscosity returned by the UDF is given by rho * Cmu * k2 / epsilon (as exemplified in the ANSYS Fluent Customization manual), why does the simulation results differ from those obtained using the standard k-epsilon turbulence model?
    • Rob
      Ansys Employee
      I'm not aware of anything, what happens if you create the same equation and plot to a UDM to compare what you calculate with what Fluent does?
    • sverrej
      Subscriber
      Thank you for the suggestion, Rob. I haven't tried what you suggest, though.
      I have, however, created a support case for ANSYS (EDRMedeso), so we'll see what comes up there.
      Problem description:
      The aim is to simulate turbulent flow in an infinitely long straight pipe using periodic boundary conditions and a user-defined turbulent viscosity formulation. Using std. k-epsilon turb. mod., two different implementations of the turbulent viscosity were considered:
      (a)Default implementation, and
      (b)User-defined implementation via the User-defined turbulent viscosity hook.
      The two simulation set-ups only differed with respect to the turbulent viscosity. The User-defined turbulent viscosity implementation was identical to the UDF example given in the ANSYS Fluent Customization Manual 2022R1, Ch. 2.3.51.2, p. 168. Simulations were performed on a coarse mesh and a fine mesh (see Figure 1 below), for a range of Reynolds numbers, to investigate if the wall shear stress predicted by ANSYS Fluent corresponds to the wall shear stress obtained from industry standard correlations (e.g. Haaland correlation). Convergence criteria were shut off and simulations were run until residuals had stabilized. User-defined residuals (convergence conditions) were used to monitor wall shear-stress, mass-flow, and center-line velocity residuals, to ensure convergence. The following was observed (see figures 2 and 3 below for results at Re=1000 and comparisons with correlations, respectively):
      ┬ÀOn the coarse mesh both simulation types agree closely with correlations for intermediate and high Reynolds numbers. Whereas at low Reynolds numbers, the wall shear stress is overpredicted.
      ┬ÀOn the fine mesh, CFD simulations agree with the correlations only at the highest Reynolds number.
      ┬ÀOn the fine mesh, for intermediate Reynolds numbers, simulations a and b disagree. Simulation b, with user-defined turbulent viscosity, underpredicts the wall shear stress compared with the standard implementation (a).
      The two first points can be explained by considering that the wall y+ values at the wall are outside the validity range of the standard k- ╬Á turbulence model. We have not been able to explain the last point, however. Hence, our questions are:
      ┬ÀWhy are we not able to reproduce standard k-epsilon results using the turbulent viscosity hook described in the ANSYS Fluent Customization Manual?
      ┬ÀAre there undocumented limitations or side-effects to using the DEFINE_TURBULENT_VISCOSITY macro?

      Figure 1: Cross-sectional grid resolution for the (a) coarse and (b) fine meshes.



      Figure 2: Comparison of computed, area-weighted average wall shear stress for default and user-defined turbulent viscosity simulations on coarse and fine meshes, for Re=1000.
      (a) Coarse mesh
      (b) Fine mesh
      Figure 3: Computed area-weighted average wall shear-stress vs. Reynolds number for the standard k-╬Á turbulence model with default (red solid curve) and user-defined (black circles) turbulent viscosity implementations compared with correlations (black curves).



    • Rob
      Ansys Employee
      If it's undocumented I can't comment on here! As you're talking to EDR Medeso I'll leave it with them: the paid support will be far more detailed than I'm able to provide here.
    • sverrej
      Subscriber
      Thanks, Rob.
      I just wanted to round off this discussion thread somehow. I'll update the thread with the conclusion from my discussion with EDR Medeso / ANSYS.
    • Rob
      Ansys Employee
      Thanks
Viewing 7 reply threads
  • You must be logged in to reply to this topic.