Problem UDF for Turbulen viscosity
How i can retrieve variables of different domains inside the same macro? I have retrieve the liquid density value, gas density value and turbulent viscosity inside the same macro. I want set up the Turbulent viscosity in the secondary phase using "dispersed" as Turbulent Multiphase Model in the k-e model.
I tried with the following udf:
DEFINE_TURBULENT_VISCOSITY(mu_t_ke_air, c, phase_t)
Thread *mt; /* mixture or super thread*/
Thread **all_phase_threads; /* An array of all the phase threads */
mt = THREAD_SUPER_THREAD(phase_t);
all_phase_threads = THREAD_SUB_THRADS(mt);
/* all_phase_threads is primary thread, */
/* all_phase_threads first secondary phase thread */
real rho_l = C_R(c,all_phase_threads);
real rho_g = C_R(c,all_phase_threads);
real mu_tl = C_MU_T(c,all_phase_threads);
mu_tg = mu_tl*rho_g/rho_l;
But, this udf gave the following erro:
THREAD_SUB_THRADS is an undeclared variable.
Anyone know why gave this erro. If anyone knows another way to do it, using other pointer, etc..., please tell me.
|All times are GMT -4. The time now is 09:03.|