CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   FLUENT (http://www.cfd-online.com/Forums/fluent/)
-   -   Species Mass Fraction inside UDF using PDF? (http://www.cfd-online.com/Forums/fluent/27902-species-mass-fraction-inside-udf-using-pdf.html)

Daniel Schneider September 20, 2000 06:34

Species Mass Fraction inside UDF using PDF?
 
Hi, I've been trying to compile UDF that includes Pdf_Yi(c, t, n) Fluent variable:

#include "udf.h"

#include "sg_pdf.h"

real cellYi(cell_t c, Thread *t, int n)

{

if (sg_pdf) return Pdf_Yi(c, t, n);

else return C_YI(c,t,n);

}

DEFINE_SOURCE(source_test, c, t, dS, eqn)

{

real temp;

dS[eqn] = 10.;

temp=cellYi(c,t,2);

return temp;

}

But what I'm getting is "error: unresolved external symbol _Pdf_Yi" during linking. It seems to me that is not possible to use Species Mass Fraction inside UDF using PDF (I am using Fluent 5.3.18 on NT4.0).

Did anybody succeed to use it?

The full compiling/linking report is:

__________________________________________________ ___

Microsoft (R) Program Maintenance Utility Version 6.00.8168.0 Copyright (C) Microsoft Corp 1988-1998. All rights reserved.

cl /c /Za /Dextern=__declspec(dllimport) -Ic:\fluent.inc\fluent5.3\ntx86 \3d -Ic:\fluent.inc\fluent5.3\src -Ic:\fluent.inc\fluent5.3\cortex\src -Ic:\f luent.inc\fluent5.3\client\src -Ic:\fluent.inc\fluent5.3\tgrid\src -Ic:\fluent .inc\fluent5.3\multiport\src ..\..\src\mass_fraction.c Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 12.00.8168 for 80x86 Copyright (C) Microsoft Corp 1984-1998. All rights reserved.

mass_fraction.c # Generating udf_names.c because of makefile mass_fraction.obj

cl /c /Za -Ic:\fluent.inc\fluent5.3\ntx86\3d -Ic:\fluent.inc\fluent5.3\ src -Ic:\fluent.inc\fluent5.3\cortex\src -Ic:\fluent.inc\fluent5.3\client\src -Ic:\fluent.inc\fluent5.3\tgrid\src -Ic:\fluent.inc\fluent5.3\multiport\src u df_names.c Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 12.00.8168 for 80x86 Copyright (C) Microsoft Corp 1984-1998. All rights reserved.

udf_names.c # Linking libudf.dll because of makefile user_nt.udf udf_names.obj mass_fraction .obj

link /Libpath:c:\fluent.inc\fluent5.3\ntx86\3d /dll /debug /out:libudf .dll /def:udfdll.def udf_names.obj mass_fraction.obj fl5318s.lib Microsoft (R) Incremental Linker Version 6.00.8447 Copyright (C) Microsoft Corp 1992-1998. All rights reserved.

Creating library libudf.lib and object libudf.exp mass_fraction.obj : error LNK2001: unresolved external symbol _Pdf_Yi libudf.dll : fatal error LNK1120: 1 unresolved externals NMAKE : fatal error U1077: 'link' : return code '0x460' Stop.



All times are GMT -4. The time now is 14:44.