CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT > Fluent UDF and Scheme Programming

UDF for shear stress

Register Blogs Community New Posts Updated Threads Search

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   May 18, 2021, 07:31
Post UDF for shear stress
  #1
PXY
New Member
 
pxy
Join Date: Apr 2021
Posts: 5
Rep Power: 5
PXY is on a distinguished road
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)
}
PXY is offline   Reply With Quote

 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


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 05:44
Fluent UDF Wall Shear Stress Segmentation Fault a1ananth Fluent UDF and Scheme Programming 3 February 24, 2015 03:23
Fluent UDF for interfacial stress in VOF rsingh7 Fluent UDF and Scheme Programming 0 July 18, 2014 16:54
UDF parallel error: chip-exec: function not found????? shankara.2 Fluent UDF and Scheme Programming 1 January 16, 2012 22:14
UDF, UDF, UDF, UDF Luc SEMINEL Main CFD Forum 0 November 25, 2002 04:01


All times are GMT -4. The time now is 15:23.