CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   New with writing UDF/Need help pls (https://www.cfd-online.com/Forums/fluent/45027-new-writing-udf-need-help-pls.html)

mac June 14, 2007 03:44

New with writing UDF/Need help pls
 
Hi to all I am new with UDF I need to know if I want to write a UDF should I write it in C++ editor or it is possible to write it in another editor else?

Thanks for your reply mac


Susan June 14, 2007 03:52

Re: New with writing UDF/Need help pls
 
Yes, you can write it in C++ editor

Tomasz Bednarz June 14, 2007 04:30

Re: New with writing UDF/Need help pls
 
C++ is not editor, C++ is a programing language, but you can use any editor to write your code - the essence is to have compiler binaries in paths so the Fluent could compile your source :) I'm using personally Editor in FAR MANAGER + COLORER plugin... kindest regards, Tomash

mac June 14, 2007 04:46

Re: New with writing UDF/Need help pls
 
Thanks to the reply I mean can I write it in fortran 90 (usually with using C++ terms not fortran 90 terms) and use it in fluent? And if that possible which extension should i use for the file to call it in fluent?

Thanks so much mac


Tomasz Bednarz June 14, 2007 05:19

Re: New with writing UDF/Need help pls
 
mac, all Fluent source file are prepare to work with c, look at /Fluent.Inc/fluent6.3.26/src, where you have all standard header files... why should you use Fortran? There are no impossible things on this world - most probably you could try to link fortran libs with c++ libs, however try to use c, it's really not that difficult as you could feel at the begining... good luck, tomash


mac June 14, 2007 06:02

Re: New with writing UDF/Need help pls
 
ok tomasz thanks to the answer what did you think if i use C all what I need only to write the file (udf file) and save it hence it become ready to use in fluent? I am actually not use c plus before this time anymore.

mac


Tomasz Bednarz June 14, 2007 06:11

Re: New with writing UDF/Need help pls
 
mac, just create your .c file in the folder where you store case file. then the only thing you need to do is to compile it using interpreted or defined-user function... (check Define->User Defined->Functions->...). also try to study UDF user manual where you have all necessary information about creating, compiling and handling your mac-defined-functions ;) good luck



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