|
[Sponsors] |
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 |
Super Moderator
Alex
Join Date: Jun 2012
Location: Germany
Posts: 3,427
Rep Power: 49 |
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 |
||
February 22, 2013, 05:00 |
|
#4 |
Super Moderator
Alex
Join Date: Jun 2012
Location: Germany
Posts: 3,427
Rep Power: 49 |
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. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Dynamic Mesh UDF | Qureshi | FLUENT | 7 | March 23, 2017 08:37 |
UDF parallel error: chip-exec: function not found????? | shankara.2 | Fluent UDF and Scheme Programming | 1 | January 16, 2012 23:14 |
How to add a UDF to a compiled UDF library | kim | FLUENT | 3 | October 26, 2011 22:38 |
UDF...UDF...UDF...UDF | Luc SEMINEL | FLUENT | 0 | November 25, 2002 05:03 |
UDF, UDF, UDF, UDF | Luc SEMINEL | Main CFD Forum | 0 | November 25, 2002 05:01 |