|
[Sponsors] |
June 23, 2016, 06:33 |
Plese help me for debugging UDF's thanks
|
#1 |
New Member
Join Date: Jun 2013
Posts: 8
Rep Power: 12 |
#include "udf.h"
#define YMIN 0.0 /* constants */ #define YMAX 600 /* max domain height*/ #define DELOVRH 0.5 /* fully turbulent at centre of pipe*/ #define uABL_star 0.745 /* friction velocity for particular angle*/ #define k 0.4 /* Von karman constant*/ #define y0 1.5 /* rougness length*/ /* profile for x-velocity */ DEFINE_PROFILE(x_velocity,t,i) { real y, del, h, x[ND_ND]; /* variable declarations */ face_t f; h = YMAX - YMIN; del = DELOVRH*h; /* it shows fully turbulent profile*/ begin_f_loop(f,t) { F_CENTROID(x,f,t); y = x[1]; if (y <= del) F_PROFILE(f,t,i) = ((uABL_star)/k)* ln ((y+y0/y); else F_PROFILE(f,t,i) = ((uABL_star)/k)* ln (((h-y)+y0/y);; } end_f_loop(f,t) } /* profile for kinetic energy */ DEFINE_PROFILE(k_profile,t,i) { real y, del, h, ufree, x[ND_ND]; real I, umean, σ ; face_t f; h = YMAX - YMIN; del = DELOVRH*h; I=σ/umean; /* umean =(( uABL star/k)*(ln((y+y0)/y))*/ begin_f_loop(f,t) { F_CENTROID(x,f,t); y=x[1]; if (y <= del) F_PROFILE(f,t,i)= (3/2)*[ σ/(( uABL star/k)*(ln((y+y0)/y))]; Else F_PROFILE(f,t,i)= (3/2)*[ σ/(( uABL star/k)*(ln(((h-y)+y0)/(h-y)))]; } end_f_loop(f,t) } /* profile for dissipation rate */ DEFINE_PROFILE(dissip_profile,t,i) { realω real y, x[ND_ND], del, h,real K, umean, real ε; face_t f; h = YMAX - YMIN; del = DELOVRH*h; ε=(uABL star)^3/k(y+y0); begin_f_loop(f,t) { F_CENTROID(x,f,t); y=x[1]; if (y <= del) ω=[((uABL star)^3/k(y+y0))/[ (3/2)*[ σ/(( uABL star/k)*(ln((y+y0)/y))]]; else ω=[((uABL star)^3/k((h-y)+y0))/[ (3/2)*[ σ/(( uABL star/k)*(ln(((h-y)+y0)/(h-y)))]]; } end_f_loop(f,t) } |
|
June 23, 2016, 08:21 |
|
#2 |
Senior Member
Michael Prinkey
Join Date: Mar 2009
Location: Pittsburgh PA
Posts: 363
Rep Power: 25 |
You have double ;; on this line:
F_PROFILE(f,t,i) = ((uABL_star)/k)* ln (((h-y)+y0/y);; ln isn't a math.h function. Natural Log is double log (double). Base-10 Log is double log10 (double); I stopped looking after those. These are very simple errors. I recommend that you review basic C syntax and review how to interpret compiler errors for your particular compiler. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
how to check UDFs code errors? | gjm89 | Fluent UDF and Scheme Programming | 5 | December 10, 2014 17:57 |
problem using property udfs in parallel mode | EllenW | Fluent UDF and Scheme Programming | 5 | July 10, 2009 04:31 |
problem using property udfs in parallel mode | EllenW | FLUENT | 0 | June 23, 2009 17:18 |
Unsteady and Flux UDFs for UDSs | tom | FLUENT | 0 | February 13, 2009 10:27 |
Experimental Repository for UDFs, Journal Files and Scheme Scripts | Jonas Larsson | FLUENT | 0 | March 5, 2000 15:36 |