CFD Online Logo CFD Online URL
Home > Forums > Software User Forums > ANSYS > FLUENT > 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 Search this Thread 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: 5
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 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
Natural convection in a closed domain STILL NEEDING help! Yr0gErG FLUENT 4 December 2, 2019 01:04
[] Patches to compile OpenFOAM 2.2 on Mac OS X gschaider OpenFOAM Installation 136 October 10, 2017 18:25
[Other] OpenFOAM Installation for navalFoam sachinlb OpenFOAM Community Contributions 22 July 28, 2017 06:26
[swak4Foam] swak4foam building problem GGerber OpenFOAM Community Contributions 54 April 24, 2015 17:02
Why FVM for high-Re flows? Zhong Lei Main CFD Forum 23 May 14, 1999 14:22

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