|
[Sponsors] |
UDF compilation problem -- "undeclared variable" |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
September 20, 2005, 09:26 |
UDF compilation problem -- "undeclared variable"
|
#1 |
Guest
Posts: n/a
|
Hello!
I would be very happy if someone could help me with this... Probably not too complicated since I am quite new to C programming.. I am working on a bigger UDF but to isolate the problem I have tried to compile smaller parts of code, but I still can't see what I do wrong. When I try to load a UDF I've written into FLUENT (via Defined->User-Defined->Functions->Interpreted) I get an error message during compilation: "line 7: P_CURRENT_LAW: undeclared variable". This is when I'm trying to use the P_CURRENT_LAW(p) macro inside a DEFINE_DPM_SWITCH command. The code is more or less directly copied from the UDF User Guide, only slightly simplified: --- #include "udf.h" #include "dpm.h" DEFINE_DPM_SWITCH(dpm_switch,p,coupled) { if(5.0 > 1.0) P_CURRENT_LAW(p) = DPM_LAW_INITIAL_INERT_HEATING; else P_CURRENT_LAW(p) = DPM_LAW_VAPORIZATION; } --- What is wrong?? I get the same error message when I try to use P_MATERIAL(p) inside a DEFINE_DPM_SCALAR_UPDATE command. In other parts of my bigger UDF I use macros such as P_RHO(p), P_MASS(p), P_INIT_MASS(p), VaporizationLaw(p) etc without trouble. Any help is highly appreciated! Thank you very much, Henrik |
|
September 21, 2005, 06:25 |
Re: UDF compilation problem -- "undeclared variabl
|
#2 |
Guest
Posts: n/a
|
I solved this problem by compiling the UDF instead.
/Henrik |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
A problem about 'printf' and 'Message' in UDF. | LICH | Fluent UDF and Scheme Programming | 2 | May 2, 2013 03:45 |
UDF compiling problem | Wouter | Fluent UDF and Scheme Programming | 6 | June 6, 2012 05:43 |
what's the problem with my udf | zzyan | FLUENT | 0 | November 4, 2010 04:56 |
Help! Compiled UDF problem 4 Wave tank tutorial | Shane | FLUENT | 1 | September 3, 2010 03:32 |
UDF variables F1, y / problem with UDF | Fabian | FLUENT | 6 | June 2, 2003 11:22 |