CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   Error msg on initialization (https://www.cfd-online.com/Forums/fluent/36560-error-msg-initialization.html)

Tushar May 3, 2005 15:30

Error msg on initialization
 
Thnx to all who go thru my problem.... My problem involves a porous media thru which wastewater flows and gets cleansed. I wrote two DEFINE_SOURCE terms for oxygen and cod removal.... DEFINE_SOURCE(oxy_source,c,t,dS,eqn) { real x[ND_ND]; real y,q; real source; C_CENTROID(x,c,t); y=x[1]; dS[eqn]=0; q=0.5*K1*C_YI(c,t,1)*980/(K2+C_YI(c,t,1)*980); source=ko*(C_oxy_eqm-C_YI(c,t,0)*980)-Y1*kqc*q; return (source); }

DEFINE_SOURCE(cod_source,c,t,dS,eqn) { real x[ND_ND]; real y,q; real source; C_CENTROID(x,c,t); y=x[1]; dS[eqn]=0; q=0.5*K1*C_YI(c,t,1)*980/(K2+C_YI(c,t,1)*980); source=-kac*(C_YI(c,t,1)*980-(K2*q/(K1-q))); return (source); }

I compiled these with a k-epsilon model in FLUENT 6.1

I had a velocity inlet and a pressure outlet condition set.The udfs run ok but give an error when I hook thems to the outlet mass fractions(which is the result i want)

the error returned is get_udf_function:function oxy_source has wrongtype:1!=5

I cant figure out whts wrong...can somebody help me.

tia Tushar.


All times are GMT -4. The time now is 04:20.