|
[Sponsors] |
May 18, 2021, 08:31 |
UDF for shear stress
|
#1 |
New Member
pxy
Join Date: Apr 2021
Posts: 5
Rep Power: 5 |
Hello everyone,
I'm writing a code to define the wall shear stress, but it's always wrong. How to write it correctly? τzx=-(σz*f+(ρ*g*vx^2)/ξ) #include"udf.h" #define F 0.3 /*friction coefficient*/ #define B 1000 /*turbulence parameter*/ #define D 1630 /*density*/ #define g 9.81 DEFINE_PROFILE(taux_profile, t, i) { real u, p; face_t f; Thread* t0; cell_t c0; begin_f_loop(f, t) { t0 = THREAD_T0(t); c0 = F_C0(f, t); p = C_P(c0, t0); u = C_U(c0, t0); F_PROFILE(f, t, i) = p * F + D * g * u * u / B; } end_f_loop(f, t) } DEFINE_PROFILE(tauy_profile, t, i) { real v, p; face_t f; Thread* t0; cell_t c0; begin_f_loop(f, t) { t0 = THREAD_T0(t); c0 = F_C0(f, t); p = C_P(c0, t0); v = C_V(c0, t0); F_PROFILE(f, t, i) = p * F + D * g * v * v / B; } end_f_loop(f, t) } |
|
May 19, 2021, 12:23 |
|
#2 |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 |
Please explain how you concluded that it's wrong.
__________________
"The UDF library you are trying to load (libudf) is not compiled for parallel use on the current platform" is NOT the error after compiling. It is the error after loading. To see compiler errors, look at your screen after you click "build". |
|
May 19, 2021, 21:45 |
|
#3 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
check values of P and V/U you are extracting from adjusted to wall cells
you may do it using Messages to console Code:
p = C_P(c0, t0); u = C_U(c0, t0); Message0("u = %f, p = %f\n",u,p);
__________________
best regards ****************************** press LIKE if this message was helpful |
|
May 20, 2021, 00:55 |
|
#4 |
New Member
pxy
Join Date: Apr 2021
Posts: 5
Rep Power: 5 |
||
June 5, 2021, 06:57 |
|
#5 |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 |
Initialize, don't run, plot the shear stress.
Is it what you expect?
__________________
"The UDF library you are trying to load (libudf) is not compiled for parallel use on the current platform" is NOT the error after compiling. It is the error after loading. To see compiler errors, look at your screen after you click "build". |
|
June 9, 2021, 02:14 |
|
#6 | |
New Member
pxy
Join Date: Apr 2021
Posts: 5
Rep Power: 5 |
Quote:
I checked the units, length (m), Pressure (Pascal), but when I run it, it shows that the shear stress of wall is especially small. |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to validate udf for shear stress on a fluid | cibi | FLUENT | 0 | December 11, 2020 06:44 |
Fluent UDF Wall Shear Stress Segmentation Fault | a1ananth | Fluent UDF and Scheme Programming | 3 | February 24, 2015 04:23 |
Fluent UDF for interfacial stress in VOF | rsingh7 | Fluent UDF and Scheme Programming | 0 | July 18, 2014 17:54 |
UDF parallel error: chip-exec: function not found????? | shankara.2 | Fluent UDF and Scheme Programming | 1 | January 16, 2012 23:14 |
UDF, UDF, UDF, UDF | Luc SEMINEL | Main CFD Forum | 0 | November 25, 2002 05:01 |