|
[Sponsors] |
November 22, 2010, 10:52 |
|
#21 |
Member
|
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" |
|
February 10, 2011, 16:58 |
Can anyone help with a UDF problem
|
#22 |
New Member
Dave Smith
Join Date: Jul 2010
Posts: 27
Rep Power: 16 |
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 |
|
October 17, 2011, 16:06 |
hi
|
#23 |
New Member
rohit mukare
Join Date: Aug 2011
Location: rourkela
Posts: 16
Rep Power: 15 |
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...
|
|
January 24, 2012, 10:44 |
UDF Compile Issues
|
#24 |
New Member
Khaled
Join Date: Jan 2012
Posts: 3
Rep Power: 14 |
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! |
|
January 24, 2012, 10:46 |
|
#25 |
New Member
Khaled
Join Date: Jan 2012
Posts: 3
Rep Power: 14 |
Sorry I forgot to add :
I am running a 64-bit edition of windows XP with Intel Xeon processor |
|
January 24, 2012, 12:40 |
|
#26 | |
Member
Theodoros Papadopoulos
Join Date: Mar 2011
Posts: 36
Rep Power: 15 |
Quote:
|
||
January 24, 2012, 13:09 |
|
#27 |
New Member
Khaled
Join Date: Jan 2012
Posts: 3
Rep Power: 14 |
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? |
|
July 4, 2012, 03:41 |
UDF not VISIBLE
|
#28 |
New Member
Nazir
Join Date: Jun 2012
Posts: 8
Rep Power: 14 |
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?
|
|
October 30, 2012, 16:28 |
|
#29 |
New Member
S.M. Tabirul Hassan
Join Date: Oct 2012
Posts: 1
Rep Power: 0 |
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 |
|
January 29, 2013, 02:55 |
|
#30 |
New Member
mohamed
Join Date: Jul 2012
Location: Pune
Posts: 1
Rep Power: 0 |
plz check your mesh and geometry
|
|
March 21, 2014, 06:34 |
WINDOWS SDk
|
#31 |
Member
Nazim
Join Date: Oct 2013
Posts: 93
Rep Power: 13 |
||
May 8, 2015, 06:29 |
What About SDK
|
#32 |
Member
Nazim
Join Date: Oct 2013
Posts: 93
Rep Power: 13 |
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? |
|
May 8, 2015, 07:05 |
|
#33 |
Senior Member
Join Date: Mar 2013
Location: B'lr
Posts: 130
Rep Power: 13 |
I tried that part but did not work for me. Install SDK your fluent will run smoothly.
cheers shiv |
|
February 16, 2017, 03:40 |
|
#34 |
Senior Member
Join Date: Jun 2014
Location: Taiwan
Posts: 100
Rep Power: 12 |
I found some information from a file "ANSYS FLUENT GUIDE Advanced FLUENT User-Defined Functions(2011)".
21.2 How to Set Environment Variables 21.2.1 On Windows 32 Bit • If you are using Windows 32 bit, it’s better to install Visual Studio 2005 (Just install Visual C++, deselect other components) • Then, Go to this address: “C:\Program Files\Microsoft Visual Studio\VC98\bin\” • Double click “VCVARS32.BAT” • Then go the FLUENT install address: “C:\fluent.inc\ntbin\ntx86\” • And double click “setenv.exe” 21.2.2 On Windows 64 Bit • If you are using Window 64 Bit, it’s better to install Visual Studio 2008 (Just install Visual C++, deselect other components) • Then, Go to this address: “C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\” ------> This may be wrong. It could be "...\amd64". • Double click “vcvars32.BAT” ------> This may be wrong. It could be "vcvars64.BAT". • Go to the FLUENT install add: “C:\Program Files\ANSYS Inc\v121\fluent\ntbin\win64\” • And double click “setenv.exe” |
|
March 2, 2017, 05:03 |
|
#35 |
New Member
Join Date: Dec 2015
Location: Japan
Posts: 25
Rep Power: 10 |
Hi all, I face this error while compiling the UDF.
Error: The UDF library you are trying to load (libudf) is not compiled for parallel use on the current platform (win64). The operation completed successfully. C:\Users\0wner\Desktop ry ken\libudf\win64\3d_host\libudf.dll Could I know how to solve it? Thank you. |
|
March 2, 2017, 05:10 |
|
#36 |
Senior Member
Join Date: Jun 2014
Location: Taiwan
Posts: 100
Rep Power: 12 |
RPHOST?
Please refer to: ANSYS Help→ Fluent→Customization Manual→ I. Creating and Using User Defined Functions→Parallel Considerations |
|
March 2, 2017, 08:12 |
|
#37 |
New Member
Join Date: Dec 2015
Location: Japan
Posts: 25
Rep Power: 10 |
Dear SJSW,
Thank you for your respond. But when I run it with serial, the same problem was encountered. The error as below: The UDF library you are trying to load (libudf) is not compiled for 3d on the curent platform (win64). The system cannot find the file specified. c:\users\0wner\desktop ry ken\libudf\win64\3d\libudf.dll At the moment, I think Im facing compiling issue with Window 10. Same approach goes well with Window 7. But not working on Window 10. I have installed Visual Studio 15 and NetFramework 4.5.1. Looking forward for the kind advise. |
|
March 2, 2017, 09:58 |
|
#38 |
Senior Member
Join Date: Jun 2014
Location: Taiwan
Posts: 100
Rep Power: 12 |
I installed VS2015(including c compiler) after ANSYS17 in Win10.
I didn't set up anything after installation. They worked well. In this way, I don't know what is wrong about your installation. @@ |
|
June 2, 2017, 05:23 |
Ansys udf-silidification problem
|
#39 |
New Member
Ibrahim Isah
Join Date: May 2017
Posts: 2
Rep Power: 0 |
I am working on a solidification project, I want 2 stir the molten metal for 5mins then stop the rotating region from rotating, then open d gate (i.e after 5mins of stir) so that the molten metal can flow out. I want 2 also control d mass flow rate of the solid metal at inlet such that I will introduce it within first 2 mins of impeller rotation i.e first 2 mins of stir.
Pls, I need help in writing d script for 1) d impeller or stirrer motion 2)d gate ctrl 3)mass flow ctrl The total mass of metal is 10kg |
|
October 18, 2017, 08:17 |
|
#40 | |
New Member
Anuja Vijayan
Join Date: Mar 2017
Location: Thiruvananthapuram
Posts: 23
Rep Power: 9 |
Quote:
Since this is a very old post, I would like to add few more points for the new users. I was stuck with compilation error for almost two weeks. Initially I had an nmake error(most common error) which got solved by setting the system variables correctly. Then compiler showed that my header files are missing. Here is my solution to the problem. (Depending on the platform, windows edition and MSVS edition, this solution may slightly change here and there.) For reducing post length, I am not repeating the steps Rizwan already told. Step1: no change Step2a edit: the latest versions of MSVS (for eg, VS community edition 2017) will take more than 10GB space. Since I did not know which files are required/not required, I downloaded all components (including optional files)which took 34GB space. If you are a programming expert, you may optimize the size on disc. Step2b edit: not required to change default path. step3 edit:No popups/prompts asking to check command line compiler in new versions of MSVS(i do not know about versions older than 2017). Step4,5,6 : no change Step7: Go to windows desktop and search for MSVS command prompt. Open VS2015x64 native tools command prompt(This will depend on your installed MSVS version,OS platform and the processor) Step8: check whether command prompt opens normally. In my case, it showed some error in script usage as "Error in script usage.The correct usage is C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat[option]" This is an issue with the latest MSVS edition. This error may also also come while upgrading from older to newer versions of MSVS. If latest installed/ upgraded MSVS version is 2017 on a 64-bit OS x64 processor, then run this. C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64\vcvars64.bat This will set all environment variables correctly. If not 64-bit OS x64 processor, then try running batch files(.bat) similar to "vcvars64.bat" available in C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC. (MSVS 2017 edition got installed in MSVS 14.0 folder and the command prompt will be shown as VS2015. Some mysterious way in which microsoft works. I am not a programming expert to tell you why ) step9: You will now be in the folder C:\Program Files (x86)\Microsoft Visual Studio 14.0 come out of all sub folders and go to the fluent folder and launch fluent as C:\Program Files\ANSYS Inc\v181\fluent\ntbin\win64>fluent.exe Step10: Fluent launcher will pop up. Change the working directory to your directory. Go to environment tab and make sure that you have the following as your path C:\Program Files\ANSYS Inc\v150<your version>\fluent\ntbin\win64\udf.bat Check the box>>set up compilation environment for UDF Launch fluent. Step:11 Compile your UDF as usual. Add udf file. Make sure that you delete your "libudf "folder from previous attempts from working directory before building. While building, if it shows that some "*.h"(eg, stdio.h is not a programmable file) files are missing, then you need to add one more path to the system variables. C:\Program Files (x86)\Windows Kits\10\Include Because, in latest MSVS editions, the header files are separately put in this folder. Now, repeat steps 7-11. Library will be successfully build. After build, load it. Thats it. Now you can run your case file. It does not matter whether you read case/data file before/ after compilation. Hope it helps someone. Last edited by anuarun; October 18, 2017 at 09:10. Reason: General solution |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Help! Compiled UDF problem 4 Wave tank tutorial | Shane | FLUENT | 1 | September 3, 2010 03:32 |
Problem with my udf | july | Fluent UDF and Scheme Programming | 3 | June 20, 2010 07:56 |
Error compile file udf | czfluent | Fluent UDF and Scheme Programming | 24 | September 26, 2009 14:24 |
UDF compile problem | ak6g08 | Fluent UDF and Scheme Programming | 2 | June 25, 2009 07:56 |
dynamic mesh and udf problem | boboroo | FLUENT | 1 | January 20, 2008 22:26 |