Parse error in UDF
Hello,
I am trying to implement following UDF at a air-water boundary. While interpreting it is giving " line 3: parse error" I have even tried copying both case and UDF into C:\Fluent.Inc\ntbin\ntx86, but of no use. Please try to help me what went wrong #include "udf.h" static real mu = 1.7894e-05 /*** viscosity of gas (in this case air) ***/ DEFINE_PROFILE(liquid, t, i) { face_t f; cell_t c; Thread *gaswall, *cellthread; Domain *d; int zone_ID = 1; d = Get_Domain(1); /*** returns fluid domain pointer ***/ airwall = Lookup_Thread(d,zone_ID); begin_f_loop(f, t) { c = F_C0(f,gaswall); cellthread = THREAD_T0(gaswall); F_PROFILE(f, t, i) = -mu*C_U_G(c,cellthread)[1]; } end_f_loop(f, t) } DEFINE_PROFILE(gas, t, i) { face_t f; Thread *liquidwall; Domain *d; int zone_ID = 2; d = Get_Domain(1); /* returns fluid domain pointer */ waterwall = Lookup_Thread(d,zone_ID); begin_f_loop(f, t) { F_PROFILE(f, t, i) = F_U(f,waterwall); } end_f_loop(f, t) } |
You're missing a semicolon on your static variable initialisation, your code should be:
Code:
static real mu = 1.7894e-05; |
Thanks for your quick reply.
Though I have inserted ; as you said, I am still getting the parse error message. Any other suggestions? Is there anything wrong with "line 3" ? |
All times are GMT -4. The time now is 07:03. |