- **Fluent UDF and Scheme Programming**
(*https://www.cfd-online.com/Forums/fluent-udf/*)

- - **Udf...define_profile**
(*https://www.cfd-online.com/Forums/fluent-udf/113518-udf-define_profile.html*)

Udf...define_profileDear 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 ...^^ |

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? |

Quote:
the problem is not match the cartesian coortinates !! VBM in CFD Fluent is 3D coordinate system. |

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. |

All times are GMT -4. The time now is 13:14. |