@adi.ptb
Thank you for reply, it worked. Computer --> Properties --> Avandced system setting --> Evironment Variables --> User variables for... --> New... 1. INCLUDE: C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include;C:\Program Files\Microsoft SDKs\Windows\v7.1\Include 2. LIB: C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\lib\amd64;C:\Program Files\Microsoft SDKs\Windows\v7.1\Lib\x64 3. Path: C:\Windows\System32;C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\amd64;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE;C:\Program Files\ANSYS Inc\v150\fluent\ntbin\win64 Regards |
Quote:
These are my Environmental variables: INCLUDE= C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include;C:\Program Files (x86)\Windows Kits\8.1\Include LIB=C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\lib\amd64;C:\Program Files (x86)\Windows Kits\8.1\Lib\winv6.3\um\x64 Path=C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\amd64;C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE;C:\Program Files\ANSYS Inc\v150\fluent\ntbin\win64 Still not working for me. Error: LINK : fatal error LNK1104: cannot open file 'kernel32.lib' PLEASE guys, help me! |
Also tried to add C:\Windows\System32; to the path variable. Not working yet...
|
Quote:
I have tried windows-8 and installed Ansys-15 without any problem. I dont remember the exact steps now. I used windows-8 for a very short time (only couple of days) and then switched to windows-7 again. |
vasava,
The directories do exist. I searched for the adresses in the windows explorer and just copied them to the environmental variables.But it is not working!:confused: Did you run Fluent from GUI or from the Windows SDK prompt? |
Well I had a case with UDF (with velocity profile and viscosity model) that I could run without any problem. But I dont remember if I used SDK to start fluent.
Anyways here are steps that I followed (both installation on win-7 and 8) along with links where I downloaded files. Hope they help. Step-1: Install visual studio 2008 from DVD. Step-2: Install .NET 4 from Microsoft website. Step-3: Install SDK. Download from following link. http://download.microsoft.com/downlo...DKX_EN_DVD.iso http://www.mydigitallife.info/window...download-link/ If your operating system language is not English then SDK may behave strangely. |
Hi everybody!
I haven't been work Windows 8 so that I don't know Environmental variables in Windows 8. Now, I don't work UDF in Fluent, i have Fortran in CFX. Please! |
Here is a link to some other post which might help.
http://www.cfd-online.com/Forums/flu...tml#post524392 |
Thank you for the answers!
Finally I did it! Please see below the variables I used in Windows 8.1. The path to adjust the variables: Control Panel/System and Security/System;Advanced System Settings/Environment Variables;System Variables The Variables: INCLUDE=C:\Program Files (x86)\Windows Kits\8.1\Include;C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\atlmfc\include;C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include LIB=C:\Program Files (x86)\Windows Kits\8.1\Lib\winv6.3\um\x64;C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\atlmfc\lib;C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\lib\amd64;C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\lib\arm LIBPATH=C:\Windows\Microsoft.NET\Framework64\v4.0. 30319;C:\Windows\Microsoft.NET\Framework64\v2.0.50 727;C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\atlmfc\lib;C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\lib\amd64;C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\lib\arm Path=C:\ProgramData\Oracle\Java\javapath;C:\Progra m Files\ANSYS Inc\v150\fluent\ntbin\win64;C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\amd64;C:\Windows\Microsoft.NET\Framewo rk64\v4.0.30319;C:\Windows\Microsoft.NET\Framework 64\v2.0.50727;C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcpackages;C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE;C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools;C:\Program Files (x86)\Windows Kits\8.1\bin\x64;C:\Program Files (x86)\Windows Kits\8.1\bin;C:\Windows\System32 Hope it helps! Renato. |
I have set the environment variables but getting the error like this.. What is the problem?. I would be thankful to you..
Deleted old libudf\win64\2ddp\libudf.dll 1 file(s) copied. Copied G:\shivakumar\shiva\RAE2822 ow_on/G:\shivakumar\shiva\RAE2822 ow_on\shock_sensor.c to libudf\src (system "copy "C:\PROGRA~1\ANSYSI~1\v140\fluent"\fluent14.0.0\sr c\makefile_nt.udf "libudf\win64\2ddp\makefile" ") 1 file(s) copied. (chdir "libudf")() (chdir "win64\2ddp")() # Generating ud_io1.h shock_sensor.c ..\..\src\shock_sensor.c(11) : error C2143: syntax error : missing ';' before 'type' ..\..\src\shock_sensor.c(12) : error C2143: syntax error : missing ';' before 'type' ..\..\src\shock_sensor.c(18) : error C2065: 'velocity' : undeclared identifier ..\..\src\shock_sensor.c(19) : error C2065: 'f_shock' : undeclared identifier ..\..\src\shock_sensor.c(19) : error C2065: 'velocity' : undeclared identifier ..\..\src\shock_sensor.c(19) : error C2297: '*' : illegal, right operand has type 'real [2]' ..\..\src\shock_sensor.c(19) : warning C4047: 'function' : 'int' differs in levels of indirection from 'real [2]' ..\..\src\shock_sensor.c(19) : warning C4024: 'abs' : different types for formal and actual parameter 1 ..\..\src\shock_sensor.c(21) : error C2065: 'f_shock' : undeclared identifier ..\..\src\shock_sensor.c(23) : error C2440: '=' : cannot convert from 'void (*)(void)' to 'real' Done. Thanks in advance.. |
I think these errors are due to problems with your UDF and has nothing to do with compilation.
|
1 Attachment(s)
Thanks for the reply. I tried to code the shock sensor algorithm which is attached below but getting errors like that..
Here is the code. #include "udf.h" #define A 340.26 DEFINE_ON_DEMAND(shock_sensor) { Domain *d; Thread *t; cell_t c; d=Get_Domain(1); real f_shock, velocity; thread_loop_c(t,d) { begin_c_loop(c,t) { velocity=(C_U(c,t)+C_V(c,t)); f_shock = (velocity*C_P_G(c,t))/(A*abs(C_P_G(c,t))); if(f_shock>=1) { C_UDMI(c,t,0)=f_shock; } } end_c_loop(c,t) } } Any help would be appreciated Thanks in advance |
I agree with vasava,The errors you are getting have nothing to do with compilation or environment variables.Some easy ones to solve are The missing ; (just add it to the end of the command in the line showed between parêntesis).Another one are the variables like 'velocity' that are being used without previous declaration.
Try to look up for threads for each error and go to the line to solve it. Good luck! |
1 Attachment(s)
Thanks for your reply.. you are right, little problem in UDF not in the compilation.
|
hi friends
I want to compile a udf and followed above steps but when I want to load it it gives this error: %1 is not a valid win32 application please help me. what is wrong? thanks |
Post your UDF and we can have a look at it.
|
i've just solved the problem, make sure you type all the path in the right position. If yes, go to "C:\Program Files\ANSYS Inc\v145\fluent\ntbin\win64" find a file named "udf", open it with note pad. In row 10, change the path "set MSVC_DEFAULT=%ProgramFiles(x86)%\Microsoft Visual Studio 11.0" to your current activated VS version. and i think that'll do. If no, please contact me.
|
Quote:
it has been solved just open fluent from mvs command prompt64 no sdk |
@tandeem
Did you ever find a solution that worked for you on this issue? (never mind, I now see the response thread) |
It worked well, since I added the xcopy.exe path too.:)
|
All times are GMT -4. The time now is 06:43. |