Error Using UDF for Multiphase Mass Transfer Problem
Hi,
I am trying to implement a simple UDF to understand bubble growth using a VOF model. The purpose of the UDF is to identify zones where interface lies and put a constant source term. Below is the UDF. Code:
#include "udf.h" Line 7: Syntax error If I compile it, it successfully gets compiled, but when I go to the Interactions tab to use the UDF, it says: No user-defined functions have been loaded. Please let me know. I am using a linux (Red Hat Enterprise Edition) 64 bit computer. The FLUENT version is 14.0.0. Thanks, Ajinkya |
Found the error. Basically, what I think is happening, is that when you declare a variable (variable EPS is of type real) and when you define a variable (EPS = 1e-3) are two seperate things in C. It is important that all your variable declarations be at the start of the function. (eg. double EPS, tolval, y1, y2; int x1, x2; etc.) and then followed by the respective definitions (eg. x1 = 3; y1= 2.21143; etc.).
Failing to do so, the C comiler detects this as an error. This is not a limitation while using C++. Only C. |
All times are GMT -4. The time now is 13:14. |