CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   i have uds's problem~~???? (https://www.cfd-online.com/Forums/fluent/29050-i-have-udss-problem.html)

kevin November 7, 2001 21:00

i have uds's problem~~????
 
i writed C code to describe chemical phenomena , so i used macro"DEFINE_UDS_FLUX(name,f,t,i)"to calculate electro-chemical equation, for example

enum { AA, N_REQUIRED_UDS };

DEFINE_UDS_FLUX(cathode_uds1,f,t, q) { face_t f; int q=0; begin_f_loop(f,t) { Yo2=F_YI(f,t,0);

Pc=F_P(f,t);

Xo2=Yo2*(Xn2*Mn2-Xn2*Mw+Mw)/(Mo2+Yo2*Mw-Yo2*Mo2);

F_UDSI(f,t,AA)=Pc*Xo2; }end_f_loop(f,t) }

fluent give me error message is::: chip-exec: argument 3: incorrect type (5): pointer expected chip-exec:argument 4: incorrect type (0): int expected

hampton November 8, 2001 01:24

Re: i have uds's problem~~????
 
A "DEFINE_UDS_FLUX(cathode_uds1,f,t, q)" function should be used this form "DEFINE_UDS_FLUX(f,t, 0)" . Therefore, you have to define just 3 arguments. But , you defined 5 arguments(cathode_uds1,f,t, q) . So FLUENT gave you errors. To avoid this, you need to write like a following.

DEFINE_UDS_FLUX(f,t, 0)

{

F_UDSI(f,t,0)=Pc*Xo2;

}

Thanks.


hampton November 8, 2001 04:03

Re: i have uds's problem~~????
 
Sorry.I was wrong. The following is the right expression.

DEFINE_UDS_FLUX(aa,f,t, i)

{

F_UDSI(f,t,0)=Pc*Xo2;

return F_UDSI(f,t,0);

}

Thanks.



All times are GMT -4. The time now is 10:35.