CFD Online Discussion Forums

CFD Online Discussion Forums (
-   FLUENT (
-   -   need helpe (

rubis December 12, 2011 10:54

need helpe
hi ;
i try to write udf for adding the concentration and the surface tension of surfactant using uds but i have problems with declaration of uds in my udf.
this is my udf.
/************************************************** **********************/
/* Implementation of the surface tension using user-defined scalars */
/************************************************** *********************/

#include "udf.h"

#define MW 288.38 /*SDS Molecular weight*/
#define rho 370 /*SDS density kg/m^3*/
#define CST 0.001 /*convert dyn/cm to N/m*/

real yi; /*mass fraction*/

/********concentration equation*********/
DEFINE_SOURCE(surf_concen, c, t, dS, eqn)

surf_concen = C_UDSI(c,t,0);

return UDSI(cell, thread, surf_concen);

/*********surface tension equation************/

DEFINE_SOURCE(surface_tension, c, t, dS, eqn)
C_UDSI(c, t,surf_tens) = (68.49-log(exp(surf-concen))*(6.516+3.353*log(exp(surf-concen))))*CST;

return C_UDSI_DIFF(c, t,surf_tens) ;

thank you .
please help me.

All times are GMT -4. The time now is 06:21.