TAGGED: cfd-udf-fleunt, fluent, yplus
-
-
December 24, 2024 at 7:40 amthamilmaniSubscriber#include "udf.h"real get_yplus(cell_t c, Thread* t, Domain* domain){  // Declaration  real result, cell_x_value, face_x_value, shear;  real cell_centroid[ND_ND];  real NV_VEC(face_centroid);  face_t f;
Â
  shear = 10;  C_CENTROID(cell_centroid, c, t);  cell_x_value = cell_centroid[0];Â
  thread_loop_f(t, domain)  {    begin_f_loop(f, t)    {      if ((BOUNDARY_FACE_THREAD_P(t)) && (THREAD_TYPE(t) == THREAD_F_WALL))      {        F_CENTROID(face_centroid, f, t);        face_x_value = face_centroid[0];        if (cell_x_value == face_x_value)        {          shear = 1;        }      }    }    end_f_loop(f, t)  }Â
  return shear;}DEFINE_ADJUST(yplus, domain){  Thread* t;  cell_t c;  face_t f;Â
  /* Fill UDS with the variable. */  thread_loop_c(t, domain)  {    begin_c_loop(c, t)    {      C_UDSI(c, t, 0) = get_yplus(c, t, domain);    }    end_c_loop(c, t)  }Â
  thread_loop_f(t, domain)  {    if (THREAD_STORAGE(t, SV_UDS_I(0)) != NULL)    {      begin_f_loop(f, t)      {        if (BOUNDARY_FACE_THREAD_P(t))        {          F_UDSI(f, t, 0) = 0;        }        else        {          F_UDSI(f, t, 0) = ((get_yplus(F_C0(f, t), THREAD_T0(t), domain) + get_yplus(F_C1(f, t), THREAD_T1(t), domain)) / 2);        }      }      end_f_loop(f, t)    }  }}ÂThis UDF returns 10 only at all cell centres that is the internal face thread loop did not matched for any cell. Can anyone point what could be the logical flaw in the get_yplus function.
This is a 2D axisymmetric pipe, with a constant heat flux at the wall. -
December 24, 2024 at 10:14 amRobForum Moderator
You may find some hints here  https://ansyshelp.ansys.com/account/Secured?returnurl=/Views/Secured/corp/v242/en/flu_udf/flu_udf_ModelSpecificDEFINE.html%23flu_udf_sec_define_wall_functions   You may find y+ is only defined in the near wall cell, so also have a look at the adjacent cell/thread section of the manual.Â
-
Viewing 1 reply thread
- You must be logged in to reply to this topic.
Ansys Innovation Space
Trending discussions
- Non-Intersected faces found for matching interface periodic-walls
- Unburnt Hydrocarbons contour in ANSYS FORTE for sector mesh
- Script error Code: 800a000d
- Help: About the expression of turbulent viscosity in Realizable k-e model
- Cyclone (Stairmand) simulation using RSM
- Fluent fails with Intel MPI protocol on 2 nodes
- error udf
- Diesel with Ammonia/Hydrogen blend combustion
- Mass Conservation Issue in Methane Pyrolysis Shock Tube Simulation
- Script Error
Top Contributors
-
1241
-
543
-
523
-
225
-
209
Top Rated Tags
© 2024 Copyright ANSYS, Inc. All rights reserved.
Ansys does not support the usage of unauthorized Ansys software. Please visit www.ansys.com to obtain an official distribution.