CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   FLUENT (http://www.cfd-online.com/Forums/fluent/)
-   -   UDF works in windows workstation but not in UNIX w (http://www.cfd-online.com/Forums/fluent/49838-udf-works-windows-workstation-but-not-unix-w.html)

J Fernandes November 19, 2008 18:45

UDF works in windows workstation but not in UNIX w
 
Hi people, I seek your help. I made an udf for mass transfer, to run in parallel mode. I am transfering a substance from a phase to another, and it works in windows workstation. The substance really transfers from one phase to the other. When I perform the calculations in a UNIX cluster there is no mass transfer. I send here my UDF (everything seems to be ok):

#include "udf.h" #include "stdio.h"

DEFINE_MASS_TRANSFER(mass_transf_coef,cell,thread, from_index,from_species_index,to_index,to_species_ index) {

#if !RP_HOST

Thread *borra = THREAD_SUB_THREAD(thread,from_index) ;

Thread *co2 = THREAD_SUB_THREAD(thread,to_index) ;

real mtc = 1.2E-5 ;

real d = 2.02E-4 ;

real Re ;

real Sc ;

real Sh ;

real Sh_forced ;

real Sh_natural ;

real Gr ;

real Diff ;

real Tc = 304.1282 ;

real Roc = 467.600 ;

real Ror ;

real Vc = 3200 ;

real miu ;

real Temp ;

real Tr ;

miu = C_MU_L(cell,co2) ; /* Message("Viscosity: %g\n",miu) ; */

Temp = C_T(cell,co2) ;

Tr = Temp * pow(Tc,-1) ;

Ror = C_R(cell,co2) * pow(Roc,-1) ;

Re = C_U(cell,co2) * C_R(cell,co2) * d / miu ; /* Message("Reynolds Number: %g\n",Re) ; */

Sc = miu / (C_R(cell,co2) * Diff) ; /* Message("Schmidt Number: %g\n",Sc) ; */

Gr = d * d * d * 9.81 * C_R(cell,co2) / miu ; /* Message("Grashoff Number: %g\n",Gr) ; */

Sh = Sh_forced ; /* Message("Sherwood Number: %g\n",Sh) ; */

Sh_forced = 0.3954 * pow(Re,58/100) * pow(miu/(C_R(cell,co2)*Diff),1/3) ; /* Message("Sherwood Number: %g\n",Sh_forced) ; */

mtc = Sh * Diff / d ; /* Message("Mass Transfer Coefficient: %g\n",mtc) ; */

Diff = 2.543E-7 * Tr * (pow(Ror,-2/3) - 0.4511) * pow(1 + 44.01 / 885.47,0.5) / ((1 + pow(Vc / 93.9,1/3)) * (1 + pow(Vc / 93.9,1/3))) ; /* Message("CO2 diffusivity: %g\n",Diff) ; */

return (mtc) ;

#endif }

Can anyone shed some light on this problem, please? I have to solve this problem the soon as possible! Many thanks in advance! Best regards,

Joćo Fernandes


All times are GMT -4. The time now is 14:27.