# Udf...define_profile

 User Name Remember Me Password
 Register Blogs Members List Search Today's Posts Mark Forums Read

 LinkBack Thread Tools Display Modes
 February 21, 2013, 04:12 Udf...define_profile #1 New Member   Hwang Jin Sung Join Date: Jan 2013 Location: korea Posts: 2 Rep Power: 0 Dear users. i am student at the postech in korea i hope to know solution how to exchange UDF C code. /* neutral */ #include "udf.h" #define ro 1.225 /* constants */ #define K 0.41 #define mu 1.7894e-05 #define C_p 1006.43 #define L 10000000000 /* Monin-Obukhov length */ #define z_0 0.02 #define q 0 #define u_fric 0.3899 #define g 9.81 #define T_w 292 #define C_mu 0.09 /* profile for kinetic energy */ DEFINE_PROFILE(k_profile,t,i) { real x[ND_ND]; face_t f; begin_f_loop(f,t) { F_CENTROID(x,f,t); F_PROFILE(f,t,i)=pow(u_fric,2.)/sqrt(C_mu); } end_f_loop(f,t) } DEFINE_PROFILE(dissip_profile,t,i) { real x[ND_ND]; real height; face_t f; begin_f_loop(f,t) { F_CENTROID(x,f,t); height=x[1]; F_PROFILE(f,t,i)=u_fric/(sqrt(C_mu)*K*height); } end_f_loop(f,t) } DEFINE_PROFILE(velo_profile,t,i) { real x[ND_ND]; real height; face_t f; begin_f_loop(f,t) { F_CENTROID(x,f,t); height=x[1]; F_PROFILE(f,t,i) = u_fric/K*(log(height/z_0)); } end_f_loop(f,t) it is 2D C code.. i want to exchange from 2D to 3D... help me .... Dear Users ...^^

 February 21, 2013, 10:59 #2 Senior Member     Alex Join Date: Jun 2012 Location: Germany Posts: 1,647 Rep Power: 26 Where exactly do you see the problem? Do the formulas you used change in 3D? Or is your 3D domain not aligned with the cartesian coordinates?

February 21, 2013, 21:06
#3
New Member

Hwang Jin Sung
Join Date: Jan 2013
Location: korea
Posts: 2
Rep Power: 0
Quote:
 Originally Posted by flotus1 Where exactly do you see the problem? Do the formulas you used change in 3D? Or is your 3D domain not aligned with the cartesian coordinates?

the problem is not match the cartesian coortinates !!

VBM in CFD Fluent is 3D coordinate system.

 February 22, 2013, 05:00 #4 Senior Member     Alex Join Date: Jun 2012 Location: Germany Posts: 1,647 Rep Power: 26 I recommend you review the chapter about coordinate transformations from your maths or mechanics lessons. Or perhaps you could introduce local coordinate systems for each of the boundaries affected.

 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 Qureshi FLUENT 7 March 23, 2017 08:37 shankara.2 Fluent UDF and Scheme Programming 1 January 16, 2012 23:14 kim FLUENT 3 October 26, 2011 21:38 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 11:37.

 Contact Us - CFD Online - Privacy Statement - Top