CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT > Fluent UDF and Scheme Programming

Udf...define_profile

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 21, 2013, 03:12
Default Udf...define_profile
  #1
New Member
 
Hwang Jin Sung
Join Date: Jan 2013
Location: korea
Posts: 2
Rep Power: 0
jsjjangs is on a distinguished road
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 ...^^
jsjjangs is offline   Reply With Quote

Old   February 21, 2013, 09:59
Default
  #2
Super Moderator
 
flotus1's Avatar
 
Alex
Join Date: Jun 2012
Location: Germany
Posts: 3,398
Rep Power: 46
flotus1 has a spectacular aura aboutflotus1 has a spectacular aura about
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?
flotus1 is offline   Reply With Quote

Old   February 21, 2013, 20:06
Default
  #3
New Member
 
Hwang Jin Sung
Join Date: Jan 2013
Location: korea
Posts: 2
Rep Power: 0
jsjjangs is on a distinguished road
Quote:
Originally Posted by flotus1 View Post
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.
jsjjangs is offline   Reply With Quote

Old   February 22, 2013, 04:00
Default
  #4
Super Moderator
 
flotus1's Avatar
 
Alex
Join Date: Jun 2012
Location: Germany
Posts: 3,398
Rep Power: 46
flotus1 has a spectacular aura aboutflotus1 has a spectacular aura about
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.
flotus1 is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Dynamic Mesh UDF Qureshi FLUENT 7 March 23, 2017 07:37
UDF parallel error: chip-exec: function not found????? shankara.2 Fluent UDF and Scheme Programming 1 January 16, 2012 22:14
How to add a UDF to a compiled UDF library kim FLUENT 3 October 26, 2011 21:38
UDF...UDF...UDF...UDF Luc SEMINEL FLUENT 0 November 25, 2002 04:03
UDF, UDF, UDF, UDF Luc SEMINEL Main CFD Forum 0 November 25, 2002 04:01


All times are GMT -4. The time now is 15:00.