TAGGED: cfd-udf-fleunt, fluent, yplus
-
-
December 24, 2024 at 7:40 am
thamilmani
Subscriber#include "udf.h"real get_yplus(cell_t c, Thread* t, Domain* domain){// Declarationreal 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 am
Rob
Forum ModeratorYou 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.
Innovation Space
Trending discussions
- Varying Bond model parameters to mimic soil particle cohesion/stiction
- Issue to compile a UDF in ANSYS Fluent
- JACOBI Convergence Issue in ANSYS AQWA
- affinity not set
- Resuming SAG Mill Simulation with New Particle Batch in Rocky
- Continuing SAG Mill Simulation with New Particle Batch in Rocky
- Is it able to solve turbomachinery using density-based solver in Fluent?
- Two-way FSI simulation
- Ensight Force_per_unit area_EV
- Question about generating Porous Jumps
Top Contributors
-
4557
-
1494
-
1386
-
1209
-
1021
Top Rated Tags
© 2025 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.