CFD Online Discussion Forums

CFD Online Discussion Forums (
-   FLUENT (
-   -   help!!about udf,fortran and C! (

winall November 23, 2002 04:21

help!!about udf,fortran and C!
cause i have to use UDF and i have only the Fortran editon code, i wonder whether in fluent the udf can be in fortran? if not, can i using a simple c code inside which the fortran code is used?? please give me some advice!!! i am a newer here!!

ravi varma November 23, 2002 14:06

Re: help!!about udf,fortran and C!
the code can be written in Fortran as well according to UDF user guide. try a simple code in Fortran to see if it works. and then paste your entire code.

winall November 24, 2002 10:26

Re: help!!about udf,fortran and C!
but the help says that the udf can only be written in C !!help!!!

Greg Perkins November 25, 2002 02:03

Re: help!!about udf,fortran and C!
For version 5 and above you'll need to use C, as per the manual. You may still be able to link some Fortran code if you want, but at least the code that interfaces with Fluent will need to be in C.

For versions 4 you need to use Fortran, but can link some C code into the executable.


Joakim Majander November 27, 2002 12:17

Re: help!!about udf,fortran and C!
You can link Fortran into Fluent 5 and 6 UDF. I have done that several times. The current appliation has ~10 000 lines of Fortran. You have to do some machine dependent modifications to makefile and write the interface in C, since you can not use the UDF macros in Fortran. There are a few things to note when linking C and fortran. E.g. array indices and parameter types.


winall December 1, 2002 05:42

Re: help!!about udf,fortran and C!
can you give me some details about it??thanks!!

All times are GMT -4. The time now is 19:22.