CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   FLUENT (http://www.cfd-online.com/Forums/fluent/)
-   -   need some basic help with fluent udf (http://www.cfd-online.com/Forums/fluent/47080-need-some-basic-help-fluent-udf.html)

aarti sekaran January 20, 2008 13:08

need some basic help with fluent udf
 
hi everyone..well i'm just starting off with fluent and seem to be getting stuck at this point over and over again. i have a udf(a .c file) and a .msh file and i am having trouble getting fluent to run from the visual studio prompt.i realise that i need 2 have fluent running from the visual studio prompt to complie my function and use it. each time i type "fluent 2d" i get an error saying fluent is not a recognised command ,no matter what directory i'm working from. would be of gr8 help if someone could guide me on how 2 proceed. thanks!!

Krishna C Ravi January 20, 2008 14:01

Re: need some basic help with fluent udf
 
Hi,

You can not run programs ,etc at the visual studio propmt like you are using the command prompt.

To use a UDf open the fluent load the mesh first and add udf in the interpreted or compiled udf and then compile the udf.

To know more about u can look into the udf help in fluent which gives all the steps in proper steps

happy programming in udf

aarti sekaran January 20, 2008 17:25

Re: need some basic help with fluent udf
 
hi! thanks for the help! i do however still have a question... can i still compile the udf if i dont run it from the visual studio prompt? the reason i'm asking is cause i read somewhere that i would have 2 start fluent from the prompt to do anything..thanks again!!

Krishna C Ravi January 20, 2008 23:29

Re: need some basic help with fluent udf
 
Hi,

I didnt get your question completely.But what i use to do was write the udf in visual studio and import the same in fluent.Then during importing i use to compile the udf in fluent not in visual studio.

If u need anything please provide some more clarity.....

Bye

aarti sekaran January 21, 2008 13:28

Re: need some basic help with fluent udf
 
hi! well, the thing is i already have the udf as a .c file. i just wanted to know if i could just run it from fluent (directly compiling it in fluent itself) or is there something else i have to do;because when i try compiling it in fluent, i keep getting an error saying nmake is not a recognised command.. thanks again for your time...

shehab abdelrahman January 22, 2008 23:44

Re: need some basic help with fluent udf
 
there are two ways to compile UDF. one of them is interpreted, is used for the simple UDFs and only need to compile it inside the fluent using the following:

define --> user-defined --> functions --> interpreted.

but if the UDF needs extra memory to use during the calculation then you must used visual studio to compile it first outside Fluent and then be sure to open the fluent through the visual studio command prompt then use:

define --> user-defined --> functions --> compiled and follow instructions in the UDF manual. the question is HOW to get the fluent opened from the visual studio prompt command ? thats I don't know and need to know too cause i'm in the same problem too....hope that help, and need another one to help us both...:)

aarti January 24, 2008 19:23

Re: need some basic help with fluent udf
 
hey! well i was able to get some help on opening fluent from the vs prompt. the main thing that needs to be done is that the path for fluent needs to be set. this is bascially how you do it - if u are using xp, go to control panel -> system->advanced->environment variables->system varibles->path. here click on edit path and then add a semicolon at the end and then the location for ur fluent exe. what this does is basically sets fluent as a command so that u can run it from the VS prompt. now if u rerun the vs prompt and say 'fluent' from any dir, it shud work.. hope this helps! thanks everyone!!

Ramesh. K January 25, 2008 06:50

Re: need some basic help with fluent udf
 
Hi For adding path in fluent u have followed a path which is long enough else in windows u can just go to the folder where fluent is placed using ur start menu and just click the set environment variable icon it does of its own

bye

Debamoy February 12, 2008 01:57

Re: need some basic help with fluent udf
 
your Environment is not set. Keep .msh file and .c file in working folder. From start prompt go to \programs\fluent inc and set environment. then go to Microsoft visual studio .net command prompt.. cd to the working directory...type fluent

and bingo!!!!!!!!!!!!! ur done



All times are GMT -4. The time now is 04:05.