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

How to get C_K_L

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By alains
  • 1 Post By pakk

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 27, 2017, 09:17
Default How to get C_K_L
  #1
New Member
 
Alain P. González
Join Date: Sep 2016
Posts: 3
Rep Power: 10
alains is on a distinguished road
Hello everybody, I'm programming an UDF to calculate heat transfer coefficient but my UDF can't read thermal conductivity with C_K_L, what's wrong, please?


DEFINE_PROFILE(htc_1, thread, position)
{
face_t f;
cell_t c;

real lambda, rho, mu, cp;

begin_f_loop(f, thread)
{
lambda = C_K_L(c,thread);
rho = C_R(c,thread);
mu = C_MU_L(c,thread);
cp = C_CP(c,thread);
x_vel = C_U(c, thread);

F_PROFILE(f, thread, position) = 0.36 * lambda * (2 + pow(cp * mu / lambda,1 / 3) * x_vel)

}
end_f_loop(f, thread)

}
parco likes this.
alains is offline   Reply With Quote

Old   December 4, 2017, 08:10
Default
  #2
Senior Member
 
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27
pakk will become famous soon enough
The problem: you are looping over faces ("begin_f_loop"), and then trying to access cells ("lambda = C_K_L(c,thread)").
Fluent does not know which cell you are talking about.

You probably mean the neighboring cell: F_C0(f,t)

So the code would be:
Code:
lambda = C_K_L(F_C0(f,t),thread)
And do this for all cell references.
parco likes this.
pakk is offline   Reply With Quote

Old   December 4, 2017, 09:25
Default
  #3
New Member
 
Alain P. González
Join Date: Sep 2016
Posts: 3
Rep Power: 10
alains is on a distinguished road
Oh, thanks pakk. I'll try it and then I tell you; I tried to do similar to the UDF User.
alains is offline   Reply With Quote

Reply


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



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