|
[Sponsors] |
August 8, 2016, 14:53 |
Log Profile UDF for FLUENT
|
#1 |
New Member
U.S
Join Date: Jan 2016
Posts: 16
Rep Power: 10 |
Hello everyone. For my wind analysis I am trying to implant an udf for inlet boundry condition. However its not working as i expected. I expected a log profile but its constant. Can anyone see the bug ? Thanks in advance.
#include "udf.h" /* BOUNDARY PROFILES FOR WIND SPEED Uref = 10 m/s */ /* ROUGHESS LENGTH yo= 0.5 m */ real v = 10; real uf = 1.38; real yo = 0.5; /* CALCULATION OF THE PROFILE FOR HORIZONTAL WIND SPEED */ DEFINE_PROFILE(vel, thread, nv) /* function name, thread and variable number */ { face_t f; real x[ND_ND]; real y; begin_f_loop (f,thread) { F_CENTROID(x,f,thread); y=x[1]; F_PROFILE(f,thread,nv) = (uf/(0.42))*log((y+11+yo)/yo); } end_f_loop(f,thread) } /* CALCULATION OF THE PROFILE FOR TURBULENT KINETIC ENERGY */ DEFINE_PROFILE(tke, thread, nv) /* function name, thread and variable number */ { face_t f; real x[ND_ND]; real y; begin_f_loop (f,thread) { F_CENTROID(x,f,thread); y=x[1]; F_PROFILE(f,thread,nv) = 3.33*(uf*uf); } end_f_loop(f,thread) } /* CALCULATION OF THE PROFILE FOR TURBULENCE DISSIPATION RATE */ DEFINE_PROFILE(eps, thread, nv) /* function name, thread and variable number */ { face_t f; real x[ND_ND]; real y; begin_f_loop (f,thread) { F_CENTROID(x,f,thread); y=x[1]; F_PROFILE(f,thread,nv) = (uf*uf*uf)/(0.42*(yo+x[2]+11)); } end_f_loop(f,thread) } |
|
August 9, 2016, 02:45 |
|
#2 |
Senior Member
Paritosh Vasava
Join Date: Oct 2012
Location: Lappeenranta, Finland
Posts: 732
Rep Power: 23 |
Can you replace
Code:
real v = 10; real uf = 1.38; real yo = 0.5; Code:
#define v 10 #define uf 1.38 #define yo 0.5 |
|
August 15, 2016, 06:58 |
|
#3 |
New Member
U.S
Join Date: Jan 2016
Posts: 16
Rep Power: 10 |
It did not work. Do you have any other suggestion ?
|
|
Tags |
fluent, udf |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Accessing profile data from a UDF | ral007 | Fluent UDF and Scheme Programming | 1 | October 14, 2015 10:21 |
Read profile file from UDF | DonQuijote | Fluent UDF and Scheme Programming | 0 | February 18, 2013 12:56 |
udf for velocity profile in a geometry having two inlets | shubham208011 | Fluent UDF and Scheme Programming | 0 | April 6, 2009 16:13 |
UDF :Unsteady concentration profile | umesh | FLUENT | 4 | July 13, 2003 18:07 |
UDF update profile | ramesh | FLUENT | 0 | June 29, 2003 15:14 |