|
[Sponsors] |
March 16, 2009, 16:03 |
Parse Error
|
#1 |
New Member
Raghu Vamsee
Join Date: Mar 2009
Posts: 1
Rep Power: 0 |
Hello friends,
please help me. When I am interpreting my UDF, the following problem (parse error) is arising. please help me to solve it. C:\Fluent.Inc tbin tx86\cpp.exe -IC:\Fluent.Inc\fluent6.2.16/src -IC:\Fluent.Inc\fluent6.2.16/cortex/src -IC:\Fluent.Inc\fluent6.2.16/client/src -IC:\Fluent.Inc\fluent6.2.16/multiport/src -I. -DUDFCONFIG_H="<udfconfig.h>" source1.c Error: source1.c: line 33: parse error. My udf is #include "udf.h" #include "mem.h" #include "stdio.h" #define R 8.314 /*Universal Gas Constant- J/mol K */ #define Ea 21170 /* Activation Energy - J/ mol K */ #define xi 0.0 /* Initial Concentration */ #define xf 1 /* Final concentration */ #define dh 28000 /* Enthalpy, J/mol */ #define ds 107.2 /* Entropy - J/mol K */ #define RR 75 /* Reaction Rate - /sec */ #define Na 4 /* Number of atoms/molecule */ #define Mol 400 /* Molecular weight of metal hydride, kg/Kmol */ #define fs 0.35 /* plateau slope factor */ #define fhys 0.12 /* hysterisis factor */ #define Ps 5*e5 /* supply pressure, Pa */ #define Pb 5*e5 /* Bed Pressure,Pa */ #define e 0.5 /* void fraction */ #define Rho 8400 /* density of metal hydride, kg/m3 */ DEFINE_SOURCE(energy_source,c,t,ds,eqn) --- Line 33 { real energy_source; real time = RP_Get_Real("flow-time"); if(time==0) { C_UDMI(c,t,0) = xi; C_UDMI(c,t,1) = 0; } energy_source = (1-e)*Rho*dh*500*Na/Mol *C-UDMI(c,t,1); return energy_source; } DEFINE_EXECUTE_AT_END(execute_at_end) { double temp,K,P_eq; Cell_t c; Thread *t; int ID=3 ; /* Zone ID of Porous Zone */ Domain *domain = Get_Domain(ID); thread_loop_c(t,domain) { begin_c_loop(c,t) { Temp= C_T(c,t); P_eq= exp((-dh/(R*Temp))+(ds/R)+fs+fhys); C_UDMI(c,t,2) = P_eq; K = RR*((Pb-P_eq)/P_eq)*exp(-Ea/(R*Temp)); C_UDMI(c,t,3)=K; C_UDMI(c,t,1) = K*((C_UDMI(c,t,0)-xf)/(xi-xf)); C_UDMI(c,t,0) = C_UDMI(c,t,0)+(C_UDMI(c,t,1)*RP_Get_Real("Physical-time-step")); } end_c_loop(c,t) } } |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
parse error | brusly | FLUENT | 0 | February 1, 2007 13:09 |
ERROR MESSAGE: line 1: parse error | Lourival | FLUENT | 1 | February 18, 2006 02:35 |
parse error | Tajul | FLUENT | 5 | February 17, 2006 05:24 |
Parse error | Fernando | FLUENT | 2 | January 21, 2006 13:55 |
Parse error in udf | Karthick | FLUENT | 6 | March 30, 2004 12:35 |