|
[Sponsors] |
![]() |
![]() |
#1 |
New Member
Anvesh
Join Date: Jan 2014
Posts: 25
Rep Power: 13 ![]() |
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) } |
|
![]() |
![]() |
![]() |
![]() |
#2 |
Senior Member
Join Date: Mar 2015
Posts: 892
Rep Power: 19 ![]() |
You're missing a semicolon on your static variable initialisation, your code should be:
Code:
static real mu = 1.7894e-05; |
|
![]() |
![]() |
![]() |
![]() |
#3 |
New Member
Anvesh
Join Date: Jan 2014
Posts: 25
Rep Power: 13 ![]() |
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" ? |
|
![]() |
![]() |
![]() |
Tags |
parse error, udf |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
parse error while interpreting udf | Kristin | Fluent UDF and Scheme Programming | 3 | March 15, 2012 06:43 |
parse error in transient udf | spring | FLUENT | 1 | July 6, 2010 06:26 |
UDF parse error at profile function line | Wiggy | Fluent UDF and Scheme Programming | 1 | July 27, 2009 15:59 |
Parse Error Message While interpreting UDF in FLUENT | dhimans | Fluent UDF and Scheme Programming | 1 | July 10, 2009 06:29 |
UDF parse error on line 1 ..... (Unusual) | Amit Maha | FLUENT | 4 | June 30, 2006 12:15 |