# Energy source for cell that are adjacent to wall

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

 December 28, 2016, 01:15 Energy source for cell that are adjacent to wall #1 New Member   Bob Join Date: Dec 2016 Posts: 3 Rep Power: 2 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); t=Lookup_Thread(domain,zone_ID); begin_f_loop(f, t) { if(c == F_C0(f,t)) { Cnt=(1.0-C_VOF(c,pri_th))*C_R(c,sec_th); a=Cnt/C_R(c,pri_th); if(a<0.3) { kd=0.18*sqrt(0.026/(C_R(c,pri_th)*0.008)); } else { kd=pow(a,-0.85)*sqrt(0.026/(C_R(c,pri_th)*0.008)); } m_dot_d=kd*Cnt; vg=sqrt(pow(C_U(c,pri_th),2)+pow(C_V(c,pri_th),2)+ pow(C_W(c,pri_th),2)); Reg=C_R(c,pri_th)*vg*0.008/C_MU_L(c,pri_th); d=0.00796*0.026/C_R(c,pri_th)/pow(C_VOF(c,pri_th)*vg,2)*pow(Reg,2/3)*pow(C_R(c,pri_th)/C_R(c,sec_th),-1/3)*pow(C_MU_L(c,pri_th)/C_MU_L(c,sec_th),2/3); tr=3.14*sqrt(C_R(c,sec_th)*d*d*d/16/0.026); 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); F_AREA(Area,f,t); Enrg_Source=(F_T(f,t)-T_SAT)*b/C_VOLUME(c,mix_th)/(1-C_VOF(c, pri_th))*NV_MAG(Area); dS[eqn]=0; //Enrg_Source=2; return Enrg_Source; } } end_f_loop(f, t) }

 Tags error, source term, udf code

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post sachinlb OpenFOAM Installation 22 July 28, 2017 05:26 gschaider OpenFOAM Installation on Windows, Mac and other Unsupported Platforms 134 December 5, 2015 04:30 GGerber OpenFOAM Installation 54 April 24, 2015 16:02 Yr0gErG FLUENT 3 June 12, 2013 02:12 Zhong Lei Main CFD Forum 23 May 14, 1999 13:22

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