CFD Online Logo CFD Online URL
Home > Forums > Fluent UDF and Scheme Programming

Energy source for cell that are adjacent to wall

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

LinkBack Thread Tools Display Modes
Old   December 28, 2016, 01:15
Default Energy source for cell that are adjacent to wall
New Member
Join Date: Dec 2016
Posts: 3
Rep Power: 2
BIANBOSHEN is on a distinguished road
Dear all,
Now I am writing an UDF to define a energy source for cell that are adjacent to wall. The purpose is to add the heat transfer from wall to droplet in mist flow. Following is my UDF code. But after 12 iterations ,there is an error saying Error: > (greater-than): invalid argument : wrong type Error Object: 1.#inf.
I will be sincerely appreciate if you can solve my provblem.
Here is the code
DEFINE_SOURCE(liq_enrg_src, c, sec_th, dS, eqn)

Thread *mix_th, *pri_th, *t;
Domain *domain=Get_Domain(1);
int zone_ID=18;/*wall ID*/
real m_dot_d=0;
real kd;
real Cnt;
real a;
real Area[ND_ND];
real b;
real d;
real vg;
real Reg;
real tr;
real Enrg_Source=0;
face_t f;
mix_th = THREAD_SUPER_THREAD(sec_th);
pri_th = THREAD_SUB_THREAD(mix_th,0);
begin_f_loop(f, t)
if(c == F_C0(f,t))
vg=sqrt(pow(C_U(c,pri_th),2)+pow(C_V(c,pri_th),2)+ pow(C_W(c,pri_th),2));




b=pow(18*pow(C_K_L(c,pri_th)*tr,3)*C_R(c,pri_th)*L AT_HT*pow(m_dot_d,5)/pow(C_R(c,sec_th),4)/C_MU_EFF(c,pri_th)/(1.0-C_VOF(c,pri_th))/(F_T(f,t)-T_SAT),0.25);
Enrg_Source=(F_T(f,t)-T_SAT)*b/C_VOLUME(c,mix_th)/(1-C_VOF(c, pri_th))*NV_MAG(Area);
return Enrg_Source;
end_f_loop(f, t)
BIANBOSHEN is offline   Reply With Quote


error, source term, udf code

Thread Tools
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 On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
OpenFOAM Installation for navalFoam sachinlb OpenFOAM Installation 22 July 28, 2017 05:26
Patches to compile OpenFOAM 2.2 on Mac OS X gschaider OpenFOAM Installation on Windows, Mac and other Unsupported Platforms 134 December 5, 2015 04:30
swak4foam building problem GGerber OpenFOAM Installation 54 April 24, 2015 16:02
Natural convection in a closed domain STILL NEEDING help! Yr0gErG FLUENT 3 June 12, 2013 02:12
Why FVM for high-Re flows? Zhong Lei Main CFD Forum 23 May 14, 1999 13:22

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