# UDF

 Register Blogs Members List Search Today's Posts Mark Forums Read

 July 21, 2005, 05:21 UDF #1 Vinod Guest   Posts: n/a Hello, I just want to know how to create a logarithmic profile in the inlet plane of the domain using UDF. I tried by using C prog and hook it into fluent and seems its doesn't work.please look over the prog... #include "udf.h" DEFINE_PROFILE(velocity_profile,t,i) { real x[ND_ND]; /* hold the position vector */ real z; real U=0.68; /* Frictional velocity (UABL )*/ real k=0.42; /*Von-karman constant */ real z0=0.03; /*Ground roughness length*/ real tmp=0; face_t f; begin_f_loop(f,t) { F_CENTROID(x,f,t); z = x[1]; tmp=(z+z0)/z0; F_PROFILE(f,t,i) = (U/k)*log(tmp); /*lag-law */ } end_f_loop(f,t) } Please help me to solve this problem Regards, Vinod

 July 21, 2005, 21:24 Re: UDF #2 Sham Guest   Posts: n/a #include "udf.h" #include "math.udf" /* This UDF defines a positive, steady current profile that varies with depth. */ /* Velocity U = 0.38m/s Re=1.423x10^5*/ #define Ur 0.02044 /* reference current velocity (m/s)*/ #define Zo 0.0003 /* bottom roughness parameter */ DEFINE_PROFILE(ux_steady_current, thread, index) { real x[ND_ND]; /* this will hold the position vector */ real y; face_t f; begin_f_loop(f, thread) { F_CENTROID(x, f, thread); y = x[1]; if ((y+Zo)>0) F_PROFILE(f, thread, index) = (Ur/0.4)*log((y+Zo)/Zo); else F_PROFILE(f, thread, index) = 0.0; } end_f_loop(f, thread) }

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post shankara.2 Fluent UDF and Scheme Programming 1 January 16, 2012 23:14 kim FLUENT 3 October 26, 2011 21:38 Qureshi FLUENT 1 December 2, 2009 01:27 Luc SEMINEL FLUENT 0 November 25, 2002 05:03 Luc SEMINEL Main CFD Forum 0 November 25, 2002 05:01

All times are GMT -4. The time now is 02:45.