# DPM - UDF for fluctuating bubble size

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

 April 18, 2006, 11:06 DPM - UDF for fluctuating bubble size #1 Jaroslav Kotara Guest   Posts: n/a I am concerning with DPM model for the gas bubble tracking in viscous liquid. I use UDF to simulate fluctuating bubble diameter with respect to the temperature and pressure of the continuum. I have an empirical formula for the bubble diameter but probably have problem to set this in the DEFINE_DPM_LAW(name, p, ci). My UDF causes fatal error and doesn't work. DEFINE_DPM_LAW(bubble_size,p,ci) { Thread *t; cell_t c; real A; real T = C_T(c,t); real ro = C_R(c,t); real eta = C_MU_L(c,t); /* compute variable A*/ A = 0.382 * 8.31434 * T * pow(9.81,(1/3)) * pow(ro,(1/3)) * pow(eta,(1/3)); /* compute new particle diameter */ P_DIAM(p) = P_DIAM0(p) + A/101325/44*(1.4e-9 - 1.04e-14 * 101325) * P_TIME(p); } Does anyone know where is the problem? This UDF doesn't work yet and causes fatal error while DPM is beeing calculated in the 10th flow iteration.

 April 19, 2006, 09:02 Re: DPM - UDF for fluctuating bubble size #2 nicholas Guest   Posts: n/a you should define the varialbe in the same line ,may be this is problem, fluent documentation said if you don't do like this ,it may some problem. I suggest you ,first,only calculate A,if there is no problem ,then calculate P_DIAM(p)=P_TIME(p) or P_DIAM(p)=A/101325/44*(1.4e-9 - 1.04e-14 * 101325) * P_TIME(p),last ,assume P_DIAM0(p) is a constant ,then try, you will find the problem.