CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Fluent UDF and Scheme Programming

ATTN ALL: SOLUTON TO UDF COMPILE PROBLEM

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree22Likes

Reply
 
LinkBack Thread Tools Display Modes
Old   November 22, 2010, 10:52
Default
  #21
Member
 
Join Date: Apr 2010
Posts: 50
Rep Power: 7
saha2122 is on a distinguished road
Send a message via Yahoo to saha2122
i interpret the udf, thats for boundary condition, and so easy!i get this error !!!! can you help me?

cpp -I"C:\Fluent6.3.26.Inc\fluent6.3.26/src" -I"C:\Fluent6.3.26.Inc\fluent6.3.26/cortex/src" -I"C:\Fluent6.3.26.Inc\fluent6.3.26/client/src" -I"C:\Fluent6.3.26.Inc\fluent6.3.26/multiport/src" -I. -DUDFCONFIG_H="<udfconfig-host.h>" "D:\saha2\coupled\89.8
11\kaplan-sepBlade.inlet\coarse-meshed\udf-g\design\89-22.5\pen\pressure.outlet.cpp"

error: udf compiler: cannot execute cpp -I"C:\Fluent6.3.26.Inc\fluent6.3.26/src" -I"C:\Fluent6.3.26.Inc\fluent6.3.26/cortex/src" -I"C:\Fluent6.3.26.Inc\fluent6.3.26/client/src" -I"C:\Fluent6.3.26.Inc\fluent6.3.26/multiport/src" -I. -DUDFCONFIG_H="<udfco
fig-host.h>" "D:\saha2\coupled\89.8.11\kaplan-sepBlade.inlet\coarse-meshed\udf-g\design\89-22.5\pen\pressure.outlet.cpp"

cpp -I"C:\Fluent6.3.26.Inc\fluent6.3.26/src" -I"C:\Fluent6.3.26.Inc\fluent6.3.26/cortex/src" -I"C:\Fluent6.3.26.Inc\fluent6.3.26/client/src" -I"C:\Fluent6.3.26.Inc\fluent6.3.26/multiport/src" -I. -DUDFCONFIG_H="<C:/Users/YAS/AppData/Local/Temp/udfconfig
node0.h>" "C:/Users/YAS/AppData/Local/Temp/pressure.outlet.cpp.0.c"

cpp -I"C:\Fluent6.3.26.Inc\fluent6.3.26/src" -I"C:\Fluent6.3.26.Inc\fluent6.3.26/cortex/src" -I"C:\Fluent6.3.26.Inc\fluent6.3.26/client/src" -I"C:\Fluent6.3.26.Inc\fluent6.3.26/multiport/src" -I. -DUDFCONFIG_H="<C:/Users/YAS/AppData/Local/Temp/udfconfig
node1.h>" "C:/Users/YAS/AppData/Local/Temp/pressure.outlet.cpp.1.c"

cpp -I"C:\Fluent6.3.26.Inc\fluent6.3.26/src" -I"C:\Fluent6.3.26.Inc\fluent6.3.26/cortex/src" -I"C:\Fluent6.3.26.Inc\fluent6.3.26/client/src" -I"C:\Fluent6.3.26.Inc\fluent6.3.26/multiport/src" -I. -DUDFCONFIG_H="<C:/Users/YAS/AppData/Local/Temp/udfconfig
node2.h>" "C:/Users/YAS/AppData/Local/Temp/pressure.outlet.cpp.2.c"

cpp -I"C:\Fluent6.3.26.Inc\fluent6.3.26/src" -I"C:\Fluent6.3.26.Inc\fluent6.3.26/cortex/src" -I"C:\Fluent6.3.26.Inc\fluent6.3.26/client/src" -I"C:\Fluent6.3.26.Inc\fluent6.3.26/multiport/src" -I. -DUDFCONFIG_H="<C:/Users/YAS/AppData/Local/Temp/udfconfig
node3.h>" "C:/Users/YAS/AppData/Local/Temp/pressure.outlet.cpp.3.c"

cpp -I"C:\Fluent6.3.26.Inc\fluent6.3.26/src" -I"C:\Fluent6.3.26.Inc\fluent6.3.26/cortex/src" -I"C:\Fluent6.3.26.Inc\fluent6.3.26/client/src" -I"C:\Fluent6.3.26.Inc\fluent6.3.26/multiport/src" -I. -DUDFCONFIG_H="<C:/Users/YAS/AppData/Local/Temp/udfconfig
node4.h>" "C:/Users/YAS/AppData/Local/Temp/pressure.outlet.cpp.4.c"

cpp -I"C:\Fluent6.3.26.Inc\fluent6.3.26/src" -I"C:\Fluent6.3.26.Inc\fluent6.3.26/cortex/src" -I"C:\Fluent6.3.26.Inc\fluent6.3.26/client/src" -I"C:\Fluent6.3.26.Inc\fluent6.3.26/multiport/src" -I. -DUDFCONFIG_H="<C:/Users/YAS/AppData/Local/Temp/udfconfig
node5.h>" "C:/Users/YAS/AppData/Local/Temp/pressure.outlet.cpp.5.c"
saha2122 is offline   Reply With Quote

Old   February 10, 2011, 16:58
Default Can anyone help with a UDF problem
  #22
New Member
 
Dave Smith
Join Date: Jul 2010
Posts: 27
Rep Power: 6
davesmith_01 is on a distinguished road
When I open a UDF with fluent sometimes it works, I have MS Visual 2008, and open fluent using the command prompt, and using win xp 32bit. And at other times if I copy this UDF to another folder and try and open it again to run another case it crashes and displays this message

'Error: Fluent recieved a fatal signal (segmentation violation).
Error Object: ()'

How can I fix this, I don't understand why it works sometimes only, also most of the time I am recieving this error now.

Dave
davesmith_01 is offline   Reply With Quote

Old   October 17, 2011, 15:06
Default hi
  #23
New Member
 
rohit mukare
Join Date: Aug 2011
Location: rourkela
Posts: 16
Rep Power: 5
rohit.mukare7 is on a distinguished road
i m little bit confused in setting up the environment variable..could you please give me the details of environment variables setting...thanks waiting for ur reply...
rohit.mukare7 is offline   Reply With Quote

Old   January 24, 2012, 10:44
Default UDF Compile Issues
  #24
New Member
 
Khaled
Join Date: Jan 2012
Posts: 3
Rep Power: 5
kmans76 is on a distinguished road
Good morning,

I am trying to compile a UDF library, here are the steps that I take:

Open Visual Studio 2008 x64 Win64 Command Prompt
load VCVARSALLam64
change directory to my directory
launche either fluent 6.3.26 or fluent 12 in command prompt
load batch, properties, sources and tracer files, then load header and build

then when I load i get following error message:

Opening library "libudf"...
Error: open_udf_library: The system cannot find the file specified.

Error: open_udf_library: The system cannot find the file specified.
Error Object: #f




looking at the building of the UDF library:

(chdir "libudf")()
(chdir "win64\3ddp")()
# Generating ud_io1.h
batch.c
properties.c
sources.c
..\..\src\sources.c(308) : error C2275: 'Domain' : illegal use of this type as an expression
c:\program files\ansys inc\v120\fluent\fluent12.0.16\src\mem.h(591) : see declaration of 'Domain'
..\..\src\sources.c(308) : error C2065: 'd' : undeclared identifier
..\..\src\sources.c(309) : error C2275: 'Thread' : illegal use of this type as an expression
c:\program files\ansys inc\v120\fluent\fluent12.0.16\src\mem.h(691) : see declaration of 'Thread'
..\..\src\sources.c(309) : error C2065: 't' : undeclared identifier
..\..\src\sources.c(310) : error C2275: 'cell_t' : illegal use of this type as an expression
c:\program files\ansys inc\v120\fluent\fluent12.0.16\src\mem.h(186) : see declaration of 'cell_t'
..\..\src\sources.c(310) : error C2146: syntax error : missing ';' before identifier 'c'
..\..\src\sources.c(310) : error C2065: 'c' : undeclared identifier
..\..\src\sources.c(319) : error C2065: 't' : undeclared identifier
..\..\src\sources.c(319) : error C2065: 'd' : undeclared identifier
..\..\src\sources.c(319) : error C2223: left of '->c' must point to struct/union
..\..\src\sources.c(319) : error C2065: 't' : undeclared identifier
..\..\src\sources.c(319) : warning C4047: '!=' : 'void *' differs in levels of indirection from 'int'
..\..\src\sources.c(319) : error C2065: 't' : undeclared identifier
..\..\src\sources.c(319) : error C2065: 't' : undeclared identifier
..\..\src\sources.c(319) : error C2223: left of '->next' must point to struct/union
..\..\src\sources.c(322) : error C2065: 't' : undeclared identifier
..\..\src\sources.c(322) : error C2223: left of '->nelements' must point to struct/union
..\..\src\sources.c(322) : error C2065: 'c' : undeclared identifier
..\..\src\sources.c(322) : error C2065: 'c' : undeclared identifier
..\..\src\sources.c(322) : error C2065: 'c' : undeclared identifier
..\..\src\sources.c(324) : error C2065: 't' : undeclared identifier
..\..\src\sources.c(324) : error C2223: left of '->storage' must point to struct/union
..\..\src\sources.c(324) : error C2065: 'c' : undeclared identifier
..\..\src\sources.c(325) : error C2065: 't' : undeclared identifier
..\..\src\sources.c(325) : error C2223: left of '->storage' must point to struct/union
..\..\src\sources.c(325) : error C2065: 'c' : undeclared identifier
..\..\src\sources.c(326) : error C2065: 't' : undeclared identifier
..\..\src\sources.c(326) : error C2223: left of '->storage' must point to struct/union
..\..\src\sources.c(326) : error C2065: 'c' : undeclared identifier
..\..\src\sources.c(327) : error C2065: 't' : undeclared identifier
..\..\src\sources.c(327) : error C2223: left of '->storage' must point to struct/union
..\..\src\sources.c(327) : error C2065: 'c' : undeclared identifier
tracer.c
Generating Code...



cana anyone help? I have set environmental variables and all that stuff with Fluent and MSVS 2009

thanks!
kmans76 is offline   Reply With Quote

Old   January 24, 2012, 10:46
Default
  #25
New Member
 
Khaled
Join Date: Jan 2012
Posts: 3
Rep Power: 5
kmans76 is on a distinguished road
Sorry I forgot to add :

I am running a 64-bit edition of windows XP with Intel Xeon processor
kmans76 is offline   Reply With Quote

Old   January 24, 2012, 12:40
Default
  #26
Member
 
Theodoros Papadopoulos
Join Date: Mar 2011
Posts: 36
Rep Power: 6
papteo is on a distinguished road
Quote:
Originally Posted by kmans76 View Post
Good morning,

I am trying to compile a UDF library, here are the steps that I take:

Open Visual Studio 2008 x64 Win64 Command Prompt
load VCVARSALLam64
change directory to my directory
launche either fluent 6.3.26 or fluent 12 in command prompt
load batch, properties, sources and tracer files, then load header and build

then when I load i get following error message:

Opening library "libudf"...
Error: open_udf_library: The system cannot find the file specified.

Error: open_udf_library: The system cannot find the file specified.
Error Object: #f




looking at the building of the UDF library:

(chdir "libudf")()
(chdir "win64\3ddp")()
# Generating ud_io1.h
batch.c
properties.c
sources.c
..\..\src\sources.c(308) : error C2275: 'Domain' : illegal use of this type as an expression
c:\program files\ansys inc\v120\fluent\fluent12.0.16\src\mem.h(591) : see declaration of 'Domain'
..\..\src\sources.c(308) : error C2065: 'd' : undeclared identifier
..\..\src\sources.c(309) : error C2275: 'Thread' : illegal use of this type as an expression
c:\program files\ansys inc\v120\fluent\fluent12.0.16\src\mem.h(691) : see declaration of 'Thread'
..\..\src\sources.c(309) : error C2065: 't' : undeclared identifier
..\..\src\sources.c(310) : error C2275: 'cell_t' : illegal use of this type as an expression
c:\program files\ansys inc\v120\fluent\fluent12.0.16\src\mem.h(186) : see declaration of 'cell_t'
..\..\src\sources.c(310) : error C2146: syntax error : missing ';' before identifier 'c'
..\..\src\sources.c(310) : error C2065: 'c' : undeclared identifier
..\..\src\sources.c(319) : error C2065: 't' : undeclared identifier
..\..\src\sources.c(319) : error C2065: 'd' : undeclared identifier
..\..\src\sources.c(319) : error C2223: left of '->c' must point to struct/union
..\..\src\sources.c(319) : error C2065: 't' : undeclared identifier
..\..\src\sources.c(319) : warning C4047: '!=' : 'void *' differs in levels of indirection from 'int'
..\..\src\sources.c(319) : error C2065: 't' : undeclared identifier
..\..\src\sources.c(319) : error C2065: 't' : undeclared identifier
..\..\src\sources.c(319) : error C2223: left of '->next' must point to struct/union
..\..\src\sources.c(322) : error C2065: 't' : undeclared identifier
..\..\src\sources.c(322) : error C2223: left of '->nelements' must point to struct/union
..\..\src\sources.c(322) : error C2065: 'c' : undeclared identifier
..\..\src\sources.c(322) : error C2065: 'c' : undeclared identifier
..\..\src\sources.c(322) : error C2065: 'c' : undeclared identifier
..\..\src\sources.c(324) : error C2065: 't' : undeclared identifier
..\..\src\sources.c(324) : error C2223: left of '->storage' must point to struct/union
..\..\src\sources.c(324) : error C2065: 'c' : undeclared identifier
..\..\src\sources.c(325) : error C2065: 't' : undeclared identifier
..\..\src\sources.c(325) : error C2223: left of '->storage' must point to struct/union
..\..\src\sources.c(325) : error C2065: 'c' : undeclared identifier
..\..\src\sources.c(326) : error C2065: 't' : undeclared identifier
..\..\src\sources.c(326) : error C2223: left of '->storage' must point to struct/union
..\..\src\sources.c(326) : error C2065: 'c' : undeclared identifier
..\..\src\sources.c(327) : error C2065: 't' : undeclared identifier
..\..\src\sources.c(327) : error C2223: left of '->storage' must point to struct/union
..\..\src\sources.c(327) : error C2065: 'c' : undeclared identifier
tracer.c
Generating Code...



cana anyone help? I have set environmental variables and all that stuff with Fluent and MSVS 2009

thanks!
My perception is that your udf is wrong! you have all these messages that should be first solved in order to build your UDF. Read carefully at which line is the error and what was expected and is given!
papteo is offline   Reply With Quote

Old   January 24, 2012, 13:09
Default
  #27
New Member
 
Khaled
Join Date: Jan 2012
Posts: 3
Rep Power: 5
kmans76 is on a distinguished road
Papteo, thanks for the reply.

The UDF has worked for the person in my position before me. It compiled for him and he was able to get simulation results. However, he is no longer with us so I have tried to recreate any steps he may have tried. Essentially, we have other UDF's that were able to compile using this method, this just adds a 4th source file.

Additionally, I get different errors if I use a different compiler, for example, vcvarsall or vcvars32. The majority of the errors for this one is the 'undeclared identifier', whereas the other have 'syntax error', and they do not occcur together.

Any thoughts or suggested routes to take?
kmans76 is offline   Reply With Quote

Old   July 4, 2012, 02:41
Default UDF not VISIBLE
  #28
New Member
 
Nazir
Join Date: Jun 2012
Posts: 5
Rep Power: 5
Nazir426 is on a distinguished road
my udf regardin simulation of wave generation in tank,is built and loaded successfully, but is not shown in dynamic mesh control? can u guide me?
Nazir426 is offline   Reply With Quote

Old   October 30, 2012, 16:28
Default
  #29
New Member
 
S.M. Tabirul Hassan
Join Date: Oct 2012
Posts: 1
Rep Power: 0
antikk is on a distinguished road
Dear Rizwan
Hi I am antikk.Here is what I did to compile UDF(ansys fluent 13.0) in my XP86 pc
=> I installed(after installation of fluent) VS2010 like you said
C:\Microsoft Visual Studio 10.0\..
but no prompt was displayed asking for command line compiler..no reboot..
=> In the Environment Variables->system variables->path...I set the value
C:\Microsoft Visual Studio 10.0\Common7\Tools;C:\Microsoft Visual Studio
10.0\VC\bin;C:\Program Files\ANSYS Inc\v130\fluent\ntbin\ntx86

=> In fluent.inc when I build my udf.c it gives this message

> Deleted old libudf\ntx86\2d\libudf.dll
1 file(s) copied.
(system "copy "C:\PROGRA~1\ANSYSI~1\v130\fluent"\fluent13.0.0\sr c\makefile_nt.udf "libudf\ntx86\2d\makefile" ")
1 file(s) copied.
(chdir "libudf")()
(chdir "ntx86\2d")()

Done.

then when I press "load" then it says

Opening library "C:\Documents and Settings\antikk\Desktop\dynamic mesh\libudf"...
Error: The UDF library you are trying to load (libudf) is not compiled for 2d on the curent platform (ntx86).
The system cannot find the file specified.
C:\Documents and Settings\antikk\Desktop\dynamic mesh\libudf\ntx86\2d\libudf.dll
Error Object: #f

If I copy any libudf.dll ansys fluent directory(C:\Program Files\ANSYS Inc\v130\fluent\fluent13.0.0\addons\adjoint\ntx86\ 2d) and try to load then it says..

Opening library "C:\Documents and Settings\Anik\Desktop\try12\dynamic mesh\udf compile test\libudf"...
Library "C:\Documents and Settings\antikk\Desktop\dynamic mesh\libudf\ntx86\2d\libudf.dll" opened
dasSolutionReset
dasInitialize
dasIsStale
dasAdvance
dasUpdateShape
dasCheckShapeStatus
dasGradient
dasModify
dasCostValue
dasReport
dasGetResidualHistory
residualHistoryWriter
residualHistoryReader
resetting
updating
locations
adjustAll
reset
morphExpectedChange
getControlBB
printVersion
countMemoryLocations
naming
meshQuality
meshAdvance
meshReport
runTest
Done.

What should I do now?
Can you HELP? PLEASE...
........my apology for this lengthy post
antikk is offline   Reply With Quote

Old   January 29, 2013, 02:55
Default
  #30
New Member
 
mohamed
Join Date: Jul 2012
Location: Pune
Posts: 1
Rep Power: 0
mohamed s is on a distinguished road
plz check your mesh and geometry
mohamed s is offline   Reply With Quote

Old   March 21, 2014, 06:34
Smile WINDOWS SDk
  #31
Member
 
shahid
Join Date: Oct 2013
Posts: 74
Rep Power: 3
shahid nadeem is on a distinguished road
Quote:
Originally Posted by coalgas View Post
Hello everyone,
I saw some of our friends are looking for complete Visual Studio. I am using Visual C++ 2008 Express Edition, which is available for free and works perfect to compile UDF's.

regards
Chetan
whether windows SDK is not required
shahid nadeem is offline   Reply With Quote

Old   May 8, 2015, 05:29
Default What About SDK
  #32
Member
 
shahid
Join Date: Oct 2013
Posts: 74
Rep Power: 3
shahid nadeem is on a distinguished road
Dear Rizwan bhai,
What about the Windows SDK in one of the post i saw that Windows SDK has to be installed and Fluent has to be opened through Windows SDK. SO as per your advice no need to open fluent through SDK we can open it directly?
shahid nadeem is offline   Reply With Quote

Old   May 8, 2015, 06:05
Default
  #33
Senior Member
 
Join Date: Mar 2013
Location: B'lr
Posts: 115
Rep Power: 4
shivakumar is on a distinguished road
I tried that part but did not work for me. Install SDK your fluent will run smoothly.
cheers

shiv
shivakumar is offline   Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help! Compiled UDF problem 4 Wave tank tutorial Shane FLUENT 1 September 3, 2010 02:32
Problem with my udf july Fluent UDF and Scheme Programming 3 June 20, 2010 06:56
Error compile file udf czfluent Fluent UDF and Scheme Programming 24 September 26, 2009 13:24
UDF compile problem ak6g08 Fluent UDF and Scheme Programming 2 June 25, 2009 06:56
dynamic mesh and udf problem boboroo FLUENT 1 January 20, 2008 22:26


All times are GMT -4. The time now is 21:00.